Fwd: Trying to compile GHC under Ubuntu as a cross-compiler for ARM

eng. Vassil Ognyanov Keremidchiev varosi at gmail.com
Thu Apr 3 18:13:12 UTC 2014


I would like to build GHC as a cross-compiler. So it can still run on x86
Ubuntu, but producing code for ARM v7.
What should I do?


2014-04-03 21:05 GMT+03:00 Karel Gardas <karel.gardas at centrum.cz>:

>
> I don't understand why you are trying to cross-compile LLVM? I've though
> you'd like to cross-compile GHC itself...
>
> Karel
>
>
> On 04/ 3/14 08:00 PM, eng. Vassil Ognyanov Keremidchiev wrote:
>
>> May be the problem is:
>> arm-linux-gnueabi-gcc --version
>> gives me 4.6.3 ?
>>
>> Is it possible to install earlier LLVM version?
>>
>> 2014-04-03 20:47 GMT+03:00 eng. Vassil Ognyanov Keremidchiev
>> <varosi at gmail.com <mailto:varosi at gmail.com>>:
>>
>>
>>     I'm trying to compile LLVM as is described in:
>>     http://bgamari.github.io/posts/cross-compiling_llvm.html
>>     without success. This is the error:
>>
>>     llvm[1]: Compiling StringMatcher.cpp for Debug+Asserts build
>>     llvm[1]: Compiling TGLexer.cpp for Debug+Asserts build
>>     llvm[1]: Compiling TGParser.cpp for Debug+Asserts build
>>     llvm[1]: Compiling TableGenBackend.cpp for Debug+Asserts build
>>     llvm[1]: Building Debug+Asserts Archive Library libLLVMTableGen.a
>>     make[1]: Leaving directory
>>     `/home/varosi/haskell/llvm/build/lib/TableGen'
>>     make[1]: Entering directory `/home/varosi/haskell/llvm/build/utils'
>>     make[2]: Entering directory
>>     `/home/varosi/haskell/llvm/build/utils/FileCheck'
>>     llvm[2]: Compiling FileCheck.cpp for Debug+Asserts build
>>     llvm[2]: Linking Debug+Asserts executable FileCheck
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::Option::Option(llvm::cl::NumOccurrencesFlag,
>>     llvm::cl::OptionHidden)':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:242:
>>     undefined reference to `vtable for llvm::cl::Option'
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:242:
>>     undefined reference to `llvm::cl::GeneralCategory'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::Option::~Option()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:281:
>>     undefined reference to `vtable for llvm::cl::Option'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::GenericOptionValue::~GenericOptionValue()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:356:
>>     undefined reference to `vtable for llvm::cl::GenericOptionValue'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::OptionValue<std::string>::OptionValue()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:461:
>>     undefined reference to `vtable for llvm::cl::OptionValue<std::
>> string>'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::basic_parser_impl::~basic_parser_impl()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:702:
>>     undefined reference to `vtable for llvm::cl::basic_parser_impl'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function
>>     `llvm::PrettyStackTraceProgram::PrettyStackTraceProgram(int, char
>>     const* const*)':
>>     /home/varosi/haskell/llvm/include/llvm/Support/PrettyStackTrace.h:63:
>> undefined
>>     reference to `llvm::PrettyStackTraceEntry::PrettyStackTraceEntry()'
>>     /home/varosi/haskell/llvm/include/llvm/Support/PrettyStackTrace.h:63:
>> undefined
>>     reference to `vtable for llvm::PrettyStackTraceProgram'
>>     /home/varosi/haskell/llvm/include/llvm/Support/PrettyStackTrace.h:64:
>> undefined
>>     reference to `llvm::EnablePrettyStackTrace()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::raw_ostream::operator<<(char)':
>>     /home/varosi/haskell/llvm/include/llvm/Support/raw_ostream.h:136:
>>     undefined reference to `llvm::raw_ostream::write(unsigned char)'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::raw_ostream::operator<<(llvm::StringRef)':
>>     /home/varosi/haskell/llvm/include/llvm/Support/raw_ostream.h:161:
>>     undefined reference to `llvm::raw_ostream::write(char const*,
>>     unsigned long)'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::raw_ostream::operator<<(std::string const&)':
>>     /home/varosi/haskell/llvm/include/llvm/Support/raw_ostream.h:177:
>>     undefined reference to `llvm::raw_ostream::write(char const*,
>>     unsigned long)'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `Pattern::ParsePattern(llvm::StringRef, llvm::StringRef,
>>     llvm::SourceMgr&, unsigned int)':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:176:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:182:
>>     undefined reference to `llvm::StringRef::find(llvm::StringRef,
>>     unsigned long) const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:183:
>>     undefined reference to `llvm::StringRef::find(llvm::StringRef,
>>     unsigned long) const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:198:
>>     undefined reference to `llvm::StringRef::find(llvm::StringRef,
>>     unsigned long) const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:202:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:234:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:247:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:260:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:269:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:/home/varosi/haskell/llvm/utils/
>> FileCheck/FileCheck.cpp:277:
>>     more undefined references to
>>     `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const' follow
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `Pattern::ParsePattern(llvm::StringRef, llvm::StringRef,
>>     llvm::SourceMgr&, unsigned int)':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:313:
>>     undefined reference to `llvm::StringRef::find(llvm::StringRef,
>>     unsigned long) const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:314:
>>     undefined reference to `llvm::StringRef::find(llvm::StringRef,
>>     unsigned long) const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:315:
>>     undefined reference to `llvm::Regex::escape(llvm::StringRef)'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `Pattern::AddRegExToRegEx(llvm::StringRef, unsigned
>>     int&, llvm::SourceMgr&)':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:324:
>>     undefined reference to `llvm::Regex::Regex(llvm::StringRef, unsigned
>>     int)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:326:
>>     undefined reference to `llvm::Regex::isValid(std::string&)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:328:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:333:
>>     undefined reference to `llvm::Regex::getNumMatches() const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:334:
>>     undefined reference to `llvm::Regex::~Regex()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `Pattern::Match(llvm::StringRef, unsigned long&,
>>     llvm::StringMap<llvm::StringRef, llvm::MallocAllocator>&) const':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:376:
>>     undefined reference to `llvm::StringRef::find(llvm::StringRef,
>>     unsigned long) const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:403:
>>     undefined reference to `llvm::Regex::escape(llvm::StringRef)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:418:
>>     undefined reference to `llvm::Regex::Regex(llvm::StringRef, unsigned
>>     int)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:418:
>>     undefined reference to `llvm::Regex::match(llvm::StringRef,
>>     llvm::SmallVectorImpl<llvm::StringRef>*)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:418:
>>     undefined reference to `llvm::Regex::~Regex()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `Pattern::ComputeMatchDistance(llvm::StringRef,
>>     llvm::StringMap<llvm::StringRef, llvm::MallocAllocator> const&)
>> const':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:452:
>>     undefined reference to
>>     `llvm::StringRef::edit_distance(llvm::StringRef, bool, unsigned int)
>>     const'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `Pattern::PrintFailureInfo(llvm::SourceMgr const&,
>>     llvm::StringRef, llvm::StringMap<llvm::StringRef,
>>     llvm::MallocAllocator> const&) const':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:462:
>>     undefined reference to
>>     `llvm::raw_svector_ostream::raw_svector_ostream(llvm::
>> SmallVectorImpl<char>&)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:468:
>>     undefined reference to
>>     `llvm::raw_ostream::write_escaped(llvm::StringRef, bool)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:469:
>>     undefined reference to
>>     `llvm::raw_ostream::write_escaped(llvm::StringRef, bool)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:472:
>>     undefined reference to
>>     `llvm::raw_ostream::write_escaped(llvm::StringRef, bool)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:480:
>>     undefined reference to
>>     `llvm::raw_ostream::write_escaped(llvm::StringRef, bool)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:483:
>>     undefined reference to
>>     `llvm::raw_ostream::write_escaped(llvm::StringRef, bool)'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:/home/varosi/haskell/llvm/utils/
>> FileCheck/FileCheck.cpp:484:
>>     more undefined references to
>>     `llvm::raw_ostream::write_escaped(llvm::StringRef, bool)' follow
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `Pattern::PrintFailureInfo(llvm::SourceMgr const&,
>>     llvm::StringRef, llvm::StringMap<llvm::StringRef,
>>     llvm::MallocAllocator> const&) const':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:489:
>>     undefined reference to `llvm::raw_svector_ostream::str()'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:489:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:490:
>>     undefined reference to
>>     `llvm::raw_svector_ostream::~raw_svector_ostream()'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:527:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `Pattern::FindRegexVarEnd(llvm::StringRef,
>>     llvm::SourceMgr&)':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:558:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `CanonicalizeInputFile':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:655:
>>     undefined reference to
>>     `llvm::MemoryBuffer::getMemBufferCopy(llvm::StringRef,
>> llvm::StringRef)'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `CheckTypeSize':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:687:
>>     undefined reference to `llvm::llvm_unreachable_internal(char const*,
>>     char const*, unsigned int)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:690:
>>     undefined reference to `llvm::llvm_unreachable_internal(char const*,
>>     char const*, unsigned int)'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `FindFirstCandidateMatch':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:748:
>>     undefined reference to `llvm::StringRef::find(llvm::StringRef,
>>     unsigned long) const'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `ReadCheckFile':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:825:
>>     undefined reference to
>>     `llvm::MemoryBuffer::getFileOrSTDIN(llvm::StringRef,
>>     std::unique_ptr<llvm::MemoryBuffer,
>>     std::default_delete<llvm::MemoryBuffer> >&, long)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:827:
>>     undefined reference to `llvm::error_code::message() const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:826:
>>     undefined reference to `llvm::errs()'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:868:
>>     undefined reference to
>>     `llvm::StringRef::find_first_not_of(llvm::StringRef, unsigned long)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:871:
>>     undefined reference to
>>     `llvm::StringRef::find_first_of(llvm::StringRef, unsigned long)
>> const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:886:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:897:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:926:
>>     undefined reference to `llvm::errs()'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:930:
>>     undefined reference to `llvm::errs()'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:932:
>>     undefined reference to `llvm::errs()'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:935:
>>     undefined reference to `llvm::errs()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `PrintCheckFailed':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:947:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:951:
>>     undefined reference to
>>     `llvm::StringRef::find_first_not_of(llvm::StringRef, unsigned long)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:954:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `CountNumNewlinesBetween':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:972:
>>     undefined reference to
>>     `llvm::StringRef::find_first_of(llvm::StringRef, unsigned long)
>> const'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `CheckString::CheckNext(llvm::SourceMgr const&,
>>     llvm::StringRef) const':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1036:
>>     undefined reference to
>>     `llvm::SourceMgr::FindBufferContainingLoc(llvm::SMLoc) const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1046:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1048:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1050:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1056:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1058:
>>     undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:/home/varosi/haskell/llvm/utils/
>> FileCheck/FileCheck.cpp:1060:
>>     more undefined references to
>>     `llvm::SourceMgr::PrintMessage(llvm::SMLoc,
>>     llvm::SourceMgr::DiagKind, llvm::Twine const&,
>>     llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool)
>>     const' follow
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `ValidateCheckPrefix':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1170:
>>     undefined reference to `llvm::Regex::Regex(llvm::StringRef, unsigned
>>     int)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1171:
>>     undefined reference to `llvm::Regex::match(llvm::StringRef,
>>     llvm::SmallVectorImpl<llvm::StringRef>*)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1171:
>>     undefined reference to `llvm::Regex::~Regex()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `main':
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1199:
>>     undefined reference to `llvm::sys::PrintStackTraceOnErrorSignal()'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1201:
>>     undefined reference to `llvm::cl::ParseCommandLineOptions(int, char
>>     const* const*, char const*)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1204:
>>     undefined reference to `llvm::errs()'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1222:
>>     undefined reference to
>>     `llvm::MemoryBuffer::getFileOrSTDIN(llvm::StringRef,
>>     std::unique_ptr<llvm::MemoryBuffer,
>>     std::default_delete<llvm::MemoryBuffer> >&, long)'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1224:
>>     undefined reference to `llvm::error_code::message() const'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1223:
>>     undefined reference to `llvm::errs()'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1229:
>>     undefined reference to `llvm::errs()'
>>     /home/varosi/haskell/llvm/utils/FileCheck/FileCheck.cpp:1298:
>>     undefined reference to `llvm::SourceMgr::~SourceMgr()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::GenericOptionValue::GenericOptionValue()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:355:
>>     undefined reference to `vtable for llvm::cl::GenericOptionValue'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::OptionValue<std::string>::~OptionValue()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:458:
>>     undefined reference to `vtable for llvm::cl::OptionValue<std::
>> string>'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::basic_parser_impl::basic_parser_impl()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:700:
>>     undefined reference to `vtable for llvm::cl::basic_parser_impl'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::basic_parser<std::string>::~basic_parser()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:739:
>>     undefined reference to `vtable for llvm::cl::basic_parser<std::
>> string>'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::parser<std::string>::~parser()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:912:
>>     undefined reference to `vtable for llvm::cl::parser<std::string>'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::opt<std::string, false,
>>     llvm::cl::parser<std::string> >::opt<llvm::cl::FormattingFlags,
>>     llvm::cl::desc,
>>     llvm::cl::NumOccurrencesFlag>(llvm::cl::FormattingFlags const&,
>>     llvm::cl::desc const&, llvm::cl::NumOccurrencesFlag const&)':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1225:
>>     undefined reference to `vtable for llvm::cl::opt<std::string, false,
>>     llvm::cl::parser<std::string> >'
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1225:
>>     undefined reference to `vtable for llvm::cl::parser<std::string>'
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1227:
>>     undefined reference to `llvm::cl::opt<std::string, false,
>>     llvm::cl::parser<std::string> >::done()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::opt<std::string, false,
>>     llvm::cl::parser<std::string> >::opt<char [11], llvm::cl::desc,
>>     llvm::cl::initializer<char [2]>, llvm::cl::value_desc>(char const
>>     (&) [11], llvm::cl::desc const&, llvm::cl::initializer<char [2]>
>>     const&, llvm::cl::value_desc const&)':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1232:
>>     undefined reference to `vtable for llvm::cl::opt<std::string, false,
>>     llvm::cl::parser<std::string> >'
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1232:
>>     undefined reference to `vtable for llvm::cl::parser<std::string>'
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1234:
>>     undefined reference to `llvm::cl::opt<std::string, false,
>>     llvm::cl::parser<std::string> >::done()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::list<std::string, bool,
>>     llvm::cl::parser<std::string> >::list<char [13],
>>     llvm::cl::desc>(char const (&) [13], llvm::cl::desc const&)':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1385:
>>     undefined reference to `vtable for llvm::cl::parser<std::string>'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::basic_parser<bool>::basic_parser()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:739:
>>     undefined reference to `vtable for llvm::cl::basic_parser<bool>'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::basic_parser<bool>::~basic_parser()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:739:
>>     undefined reference to `vtable for llvm::cl::basic_parser<bool>'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::parser<bool>::parser()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:749:
>>     undefined reference to `vtable for llvm::cl::parser<bool>'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::parser<bool>::~parser()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:749:
>>     undefined reference to `vtable for llvm::cl::parser<bool>'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
>>      >::opt<char [18], llvm::cl::desc>(char const (&) [18],
>>     llvm::cl::desc const&)':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1217:
>>     undefined reference to `vtable for llvm::cl::opt<bool, false,
>>     llvm::cl::parser<bool> >'
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1219:
>>     undefined reference to `llvm::cl::opt<bool, false,
>>     llvm::cl::parser<bool> >::done()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `std::enable_if<std::numeric_limits<int>::is_signed,
>>     bool>::type llvm::StringRef::getAsInteger<int>(unsigned int, int&)
>>     const':
>>     /home/varosi/haskell/llvm/include/llvm/ADT/StringRef.h:346:
>>     undefined reference to `llvm::getAsSignedInteger(llvm::StringRef,
>>     unsigned int, long long&)'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::StringMap<llvm::StringRef,
>>     llvm::MallocAllocator>::find(llvm::StringRef)':
>>     /home/varosi/haskell/llvm/include/llvm/ADT/StringMap.h:274:
>>     undefined reference to
>>     `llvm::StringMapImpl::FindKey(llvm::StringRef) const'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::StringMap<llvm::StringRef,
>>     llvm::MallocAllocator>::find(llvm::StringRef) const':
>>     /home/varosi/haskell/llvm/include/llvm/ADT/StringMap.h:280:
>>     undefined reference to
>>     `llvm::StringMapImpl::FindKey(llvm::StringRef) const'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::list<std::string, bool,
>>     llvm::cl::parser<std::string> >::done()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1362:
>>     undefined reference to `llvm::cl::Option::addArgument()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::StringMapEntry<llvm::StringRef>&
>>     llvm::StringMap<llvm::StringRef,
>>     llvm::MallocAllocator>::GetOrCreateValue<llvm::
>> StringRef>(llvm::StringRef,
>>     llvm::StringRef)':
>>     /home/varosi/haskell/llvm/include/llvm/ADT/StringMap.h:345:
>>     undefined reference to
>>     `llvm::StringMapImpl::LookupBucketFor(llvm::StringRef)'
>>     /home/varosi/haskell/llvm/include/llvm/ADT/StringMap.h:362:
>>     undefined reference to `llvm::StringMapImpl::RehashTable()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::SmallVectorTemplateCommon<char,
>>     void>::grow_pod(unsigned long, unsigned long)':
>>     /home/varosi/haskell/llvm/include/llvm/ADT/SmallVector.h:82:
>>     undefined reference to `llvm::SmallVectorBase::grow_pod(void*,
>>     unsigned long, unsigned long)'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::StringMapEntry<char>& llvm::StringMap<char,
>>     llvm::MallocAllocator>::GetOrCreateValue<char>(llvm::StringRef,
>> char)':
>>     /home/varosi/haskell/llvm/include/llvm/ADT/StringMap.h:345:
>>     undefined reference to
>>     `llvm::StringMapImpl::LookupBucketFor(llvm::StringRef)'
>>     /home/varosi/haskell/llvm/include/llvm/ADT/StringMap.h:362:
>>     undefined reference to `llvm::StringMapImpl::RehashTable()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `void llvm::cl::initializer<char
>>     [2]>::apply<llvm::cl::opt<std::string, false,
>>     llvm::cl::parser<std::string> > >(llvm::cl::opt<std::string, false,
>>     llvm::cl::parser<std::string> >&) const':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:315:
>>     undefined reference to `llvm::cl::opt<std::string, false,
>>     llvm::cl::parser<std::string> >::setInitialValue(std::string const&)'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:(.data.rel.ro._ZTVN4llvm2cl4listISsbNS0_
>> 6parserISsEEEE[_ZTVN4llvm2cl4listISsbNS0_6parserISsEEEE]+0x20):
>>     undefined reference to `llvm::cl::Option::anchor()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:(.data.rel.ro._ZTVN4llvm2cl11OptionValueIbEE[_
>> ZTVN4llvm2cl11OptionValueIbEE]+0x28):
>>     undefined reference to `llvm::cl::GenericOptionValue::anchor()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:(.data.rel.ro._ZTVN4llvm2cl15OptionValueBaseI
>> bLb0EEE[_ZTVN4llvm2cl15OptionValueBaseIbLb0EEE]+0x28):
>>     undefined reference to `llvm::cl::GenericOptionValue::anchor()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:(.data.rel.ro._ZTVN4llvm2cl15OptionValueCopyIbEE[_
>> ZTVN4llvm2cl15OptionValueCopyIbEE]+0x28):
>>     undefined reference to `llvm::cl::GenericOptionValue::anchor()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:(.data.rel.ro._ZTVN4llvm2cl15OptionValueCopyISsEE[_
>> ZTVN4llvm2cl15OptionValueCopyISsEE]+0x28):
>>     undefined reference to `llvm::cl::GenericOptionValue::anchor()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::opt<std::string, false,
>>     llvm::cl::parser<std::string> >::~opt()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1156:
>>     undefined reference to `vtable for llvm::cl::opt<std::string, false,
>>     llvm::cl::parser<std::string> >'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
>>      >::~opt()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1156:
>>     undefined reference to `vtable for llvm::cl::opt<bool, false,
>>     llvm::cl::parser<bool> >'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::PrettyStackTraceProgram::~
>> PrettyStackTraceProgram()':
>>     /home/varosi/haskell/llvm/include/llvm/Support/PrettyStackTrace.h:58:
>> undefined
>>     reference to `vtable for llvm::PrettyStackTraceProgram'
>>     /home/varosi/haskell/llvm/include/llvm/Support/PrettyStackTrace.h:58:
>> undefined
>>     reference to `llvm::PrettyStackTraceEntry::~PrettyStackTraceEntry()'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::list<std::string, bool,
>>     llvm::cl::parser<std::string> >::getOptionWidth() const':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1352:
>>     undefined reference to
>>     `llvm::cl::basic_parser_impl::getOptionWidth(llvm::cl::Option
>>     const&) const'
>>     /home/varosi/haskell/llvm/build/utils/FileCheck/Debug+
>> Asserts/FileCheck.o:
>>     In function `llvm::cl::list<std::string, bool,
>>     llvm::cl::parser<std::string> >::printOptionInfo(unsigned long)
>> const':
>>     /home/varosi/haskell/llvm/include/llvm/Support/CommandLine.h:1354:
>>     undefined reference to
>>     `llvm::cl::basic_parser_impl::printOptionInfo(llvm::cl::Option
>>     const&, unsigned long) const'
>>     collect2: error: ld returned 1 exit status
>>     make[2]: ***
>>     [/home/varosi/haskell/llvm/build/Debug+Asserts/bin/FileCheck] Error 1
>>     make[2]: Leaving directory
>>     `/home/varosi/haskell/llvm/build/utils/FileCheck'
>>     make[1]: *** [FileCheck/.makeall] Error 2
>>     make[1]: Leaving directory `/home/varosi/haskell/llvm/build/utils'
>>     make: *** [all] Error 1
>>
>>
>>
>>     Another thing is that the link from:
>>     http://www.haskell.org/haskellwiki/ARM
>>
>>     which is:
>>     http://www.haskell.org/pipermail/cvs-ghc/2012-February/070791.html
>>
>>     Is invalid and there could be some more information on the topic.
>>     I had to install GCC 4.7 to compile latest LLVM on my Ubuntu 12.
>>
>>     What could be the problem with LLVM?
>>
>>
>>     2014-04-03 17:13 GMT+03:00 Karel Gardas <karel.gardas at centrum.cz
>>     <mailto:karel.gardas at centrum.cz>>:
>>
>>
>>         On 04/ 3/14 04:05 PM, eng. Vassil Ognyanov Keremidchiev wrote:
>>
>>             Yes, but I don't know what is missing in my workflow.
>>
>>             I did not know if I need LLVM runtime on my target ARM
>> machine.
>>
>>
>>         No, you don't need LLVM runtime. You just need LLVM llc/opt if
>>         you'd like to cross-compile and build registerised ARM binaries.
>>
>>
>>               Do I
>>             need? I read that there is unregisterised version for ARM
>>             that doesn't
>>             need LLVM. So I just could build Haskell cross-compiler that
>>             could work
>>             on my Ubuntu and create binaries for my ARM v7 machine.
>>
>>
>>         If you'd like to use unregisterised /via-C binaries, then you
>>         don't need LLVM at all, you just need to configure with
>>         --enable-unregisterised IIRC, but I've not tested that so you
>>         are on your own.
>>
>>         Also it comes with its own performance penalty of course:
>>         http://ghcarm.wordpress.com/__2011/08/07/nofib-benchmarking/
>>         <http://ghcarm.wordpress.com/2011/08/07/nofib-benchmarking/>
>>
>>         Karel
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140403/1d59e775/attachment-0001.html>


More information about the ghc-devs mailing list