[lldb-dev] Building lldb with llvm BUILD_SHARED_LIBS

Zachary Turner zturner at google.com
Mon Feb 23 07:59:46 PST 2015


I think the correct fix is to make lldbCore not depend on lldbTarget. The
next best fix would be to make core and target not build as shared libs
On Mon, Feb 23, 2015 at 4:20 AM Azat Khuzhin <a3at.mail at gmail.com> wrote:

> 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.
> _______________________________________________
> 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/20150223/71088928/attachment.html>


More information about the lldb-dev mailing list