[lldb-dev] Building lldb with llvm BUILD_SHARED_LIBS

Azat Khuzhin a3at.mail at gmail.com
Mon Feb 23 04:18:38 PST 2015


Hi all,

I've just trying to build the latest lldb/llvm with
BUILD_SHARED_LIBS/DEBUG On linux:
- llvm: 1f22900
- lldb: 942b4a2
- ld: 2.24.51 (binutils for debian)

And got some errors about undefined references, for most of additional
libraries, that exist in lldbCore mostly.
And then I came with the patch [ADD_LLDB_LIBRARY.PATCH], but even after
this patch lldb didn't built successfully for me, and the reason was in
inter-libs dependencies, and here is the cmake error message after I add
tried to resolve them:
CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
  "lldbTarget" of type SHARED_LIBRARY
    depends on "lldbCore" (weak)
  "lldbCore" of type SHARED_LIBRARY
    depends on "lldbTarget" (weak)
At least one of these targets is not a STATIC_LIBRARY.  Cyclic dependencies are allowed only among static libraries.

Indeed:
- lldbCore depends from lldbTarget
- lldbTarget depends from lldbCore

So after this I came with another patch, that just allows undefined
references in object files [CMAKE_SHARED_LINKER_FLAGS.PATCH].
But it is a bit hackish, and so if somebody have ideas/existing solution
for this problem please post here.

Cheers,
Azat.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMAKE_SHARED_LINKER_FLAGS.PATCH
Type: text/x-diff
Size: 749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150223/be931af9/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ADD_LLDB_LIBRARY.PATCH
Type: text/x-diff
Size: 3662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150223/be931af9/attachment-0001.diff>


More information about the lldb-dev mailing list