[lldb-dev] lldb-server link failure with shared library configuration

Tamas Berghammer via lldb-dev lldb-dev at lists.llvm.org
Wed Aug 30 05:12:35 PDT 2017


I tried to build using the following command what should be a reasonably
close approximation to the one you used (I don't have ICU installed at the
moment) and it still links fine for me:
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -G Ninja ../../llvm
-DBUILD_SHARED_LIBS=true -DLLVM_TARGETS_TO_BUILD='X86'
-DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=TRUE
-DLLVM_OPTIMIZED_TABLEGEN=ON

It would be great to understand what exactly causes the difference between
the 2 cases by some sort of bisecting as I see nothing in the source code
what would explain this. If changing from -DCMAKE_BUILD_TYPE=Debug to
-DCMAKE_BUILD_TYPE=Release
fixes the issue then it would be nice to diff the ninja build graph and the
different cmake caches to try to figure out where the different starts.

Tamas

On Wed, Aug 30, 2017 at 12:17 PM Peeter Joot <peeterjoot at protonmail.com>
wrote:

> Hi Tamas,
>
> It looks like lldb-server only fails if I build with a Debug
> configuration, which I didn't realize until now.  In Release configuration,
> I don't need any changes to CMakefiles and lldb-server links without
> error.  My full build configuration in debug mode was:
>
> mkdir lldb50.1708110153
>
> cd lldb50.1708110153
>
> PATH=$PATH:/opt/lzlabs/bin
>
> CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake \
>
> -G \
>
> Ninja \
>
> ../llvm \
>
> -DBUILD_SHARED_LIBS=true \
>
> -DLLVM_TARGETS_TO_BUILD='X86' \
>
> -DCMAKE_BUILD_TYPE=Debug \
>
> -DLLVM_ENABLE_ASSERTIONS=TRUE \
>
> -DCMAKE_INSTALL_PREFIX=/home/pjoot/clang/lldb50.1708110153 \
>
> -DLLVM_OPTIMIZED_TABLEGEN=ON \
>
> -DICU_LIBRARY=/opt/lzlabs/lib64 \
>
> -DICU_INCLUDE_DIR=/opt/lzlabs/include
> Without any changes LLVMRuntimeDyld is not in the lldb-server link list,
> so this is not an ordering issue.  I'm not sure why this ends up as an
> issue only with Debug.
>
> --
> Peeter
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20170830/17e3b317/attachment.html>


More information about the lldb-dev mailing list