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

Zachary Turner zturner at google.com
Tue Nov 25 07:52:48 PST 2014


Looks to me like its not linking llvmsupport.a. Not sure why though. Can
you try removing

-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \

On Tue, Nov 25, 2014 at 7:30 AM İsmail Dönmez <ismail at donmez.ws> wrote:

> This is from the openSUSE buildbot so its always a clean build. lldb is
> placed under tools along with clang (libcxx, libcxxabi is enabled too
> fwiw). Exact compile line is:
>
> cmake -G "Ninja" \
>       -DBUILD_SHARED_LIBS=ON \
>       -DCMAKE_BUILD_TYPE=RelWithDebInfo \
>       -DCMAKE_INSTALL_PREFIX=%{_prefix} \
>       -DLLVM_LIBDIR_SUFFIX=64 \
>       -DLLVM_REQUIRES_RTTI=ON \
>       -DLLVM_ENABLE_TIMESTAMPS=OFF \
>       -DLLVM_ENABLE_ASSERTIONS=ON \
>       -DLLVM_ENABLE_PIC=ON \
>       -DLLVM_BINUTILS_INCDIR=/usr/include \
>       -DLLVM_TARGETS_TO_BUILD=all \
>       -DLLVM_ENABLE_FFI=ON \
>       -DLLVM_INCLUDE_TESTS=OFF \
>       -DLLVM_ENABLE_LIBCXX=ON \
>       ..
>
> Thanks.
>
>
> On Tue, Nov 25, 2014 at 5:04 PM, Vince Harron <vharron at google.com> wrote:
>
>> The debian buildbot and many others are able to build.  What is your
>> exact build process?
>>
>> Have you tried doing a clean checkout/build?
>> On Nov 25, 2014 5:27 AM, "İsmail Dönmez" <ismail at donmez.ws> wrote:
>>
>>> 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
>>>
>>>
>>> _______________________________________________
>>> lldb-dev mailing list
>>> lldb-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>>
>>>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20141125/678217dd/attachment.html>


More information about the lldb-dev mailing list