[lldb-dev] lldb fails to compile on Linux x86-64

İsmail Dönmez ismail at donmez.ws
Tue Nov 25 05:25:28 PST 2014


Hi,

For the last week or so my combined llvm+clang+lldb build fails while
linking lldb-gdbserver:

 lib/liblldbHost.a(Host.cpp.o): In function
`lldb_private::Host::RunShellCommand(char const*, char const*, int*, int*,
std::
__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >*, unsigned int, bool)':
 /home/abuild/rpmbuild/BUILD/llvm/stage2/../tools/lldb/source/Host/common/Host.cpp:578:
warning: the use of `mktemp' is dang
erous, better use `mkstemp'
 lib/liblldbExpression.a(ClangExpressionParser.cpp.o): In function
`ClangExpressionParser':
 /home/abuild/rpmbuild/BUILD/llvm/stage2/../tools/lldb/source/Expression/ClangExpressionParser.cpp:127:
undefined reference
to `llvm::sys::getDefaultTargetTriple()'
 lib/liblldbExpression.a(ClangExpressionParser.cpp.o): In function
`lldb_private::ClangExpressionParser::Parse(lldb_private:
:Stream&)':
 /home/abuild/rpmbuild/BUILD/llvm/stage2/../tools/lldb/source/Expression/ClangExpressionParser.cpp:315:
undefined reference
to `llvm::sys::fs::createTemporaryFile(llvm::Twine const&, llvm::StringRef,
int&, llvm::SmallVectorImpl<char>&)'
 /home/abuild/rpmbuild/BUILD/llvm/stage2/../tools/lldb/source/Expression/ClangExpressionParser.cpp:311:
undefined reference
to `llvm::sys::fs::createUniqueFile(llvm::Twine const&, int&,
llvm::SmallVectorImpl<char>&, unsigned int)'
 /home/abuild/rpmbuild/BUILD/llvm/stage2/../tools/lldb/source/Expression/ClangExpressionParser.cpp:339:
undefined reference
to `llvm::MemoryBuffer::getMemBufferCopy(llvm::StringRef, llvm::Twine
const&)'
 tools/lldb/tools/lldb-gdbserver/CMakeFiles/lldb-gdbserver.dir/__/__/source/lldb.cpp.o:
In function `lldb_private::Initializ
e()':
 /home/abuild/rpmbuild/BUILD/llvm/stage2/../tools/lldb/source/lldb.cpp:130:
undefined reference to `llvm::install_fatal_erro
r_handler(void (*)(void*, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool),
void*
)'

[lots of similar errors]

This seems to be due to failing to link to LLVMSupport library which could
be fixed by

--- lldb/cmake/LLDBDependencies.cmake
+++ lldb/cmake/LLDBDependencies.cmake
@@ -161,6 +161,7 @@ set( LLVM_LINK_COMPONENTS
   mcdisassembler
   executionengine
   option
+  support
   )


but then I hit more undefined symbols elsewhere. So I am wondering if I am
the only one hitting this error.

Regards,
ismail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20141125/38017180/attachment.html>


More information about the lldb-dev mailing list