[lldb-dev] [OS X]: building lldb with cmake

René J.V. Bertin via lldb-dev lldb-dev at lists.llvm.org
Sat Sep 10 03:54:02 PDT 2016


There's another issue with the standalone build.

I call cmake with -DDCMAKE_INSTALL_PREFIX=/opt/local/libexec/llvm-3.9, so that lldb gets installed with the rest of llvm 3.9, into /opt/local/libexec/llvm-3.9 . It looks like liblldb.${version} is generated with the wrong install path recorded:

%> otool -L /opt/local/libexec/llvm-3.9/lib/liblldb.dylib 
/opt/local/libexec/llvm-3.9/lib/liblldb.dylib:
        /opt/local/lib/liblldb.3.9.0.dylib (compatibility version 0.0.0, current version 3.9.0)
        /opt/local/lib/libedit.0.dylib (compatibility version 1.0.0, current version 1.51.0)
        /opt/local/lib/libncurses.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /opt/local/lib/libform.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /opt/local/lib/libpanel.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)
        /opt/local/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.2.0)
        /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 157.0.0)
        /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1056.17.0)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.17.0)
        /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)
        /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 55471.14.40)
        /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols (compatibility version 1.0.0, current version 106.0.0)
        /opt/local/lib/libffi.6.dylib (compatibility version 7.0.0, current version 7.4.0)
        /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
        /opt/local/libexec/llvm-3.9/lib/libLLVM.dylib (compatibility version 1.0.0, current version 3.9.0)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
        /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

and thus

%> otool -L /opt/local/libexec/llvm-3.9/bin/lldb
/opt/local/libexec/llvm-3.9/bin/lldb:
        /opt/local/lib/liblldb.3.9.0.dylib (compatibility version 0.0.0, current version 3.9.0)
        /opt/local/lib/libncurses.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
        /opt/local/libexec/llvm-3.9/lib/libLLVM.dylib (compatibility version 1.0.0, current version 3.9.0)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)

so

%> /opt/local/libexec/llvm-3.9/bin/lldb
dyld: Library not loaded: /opt/local/lib/liblldb.3.9.0.dylib
  Referenced from: /opt/local/libexec/llvm-3.9/bin/lldb
  Reason: image not found
Trace/BPT trap

I also seems that the actual path to liblldb is not added to lldb's rpath.

R.


More information about the lldb-dev mailing list