[lldb-dev] lldb is failing to start on OSX

Ryan Brown ribrdb at google.com
Wed Feb 11 15:32:51 PST 2015


Did you ever figure this out? I'm getting the same thing after updating my
lldb sources and rebuilding:

$
/Users/ribrdb/Documents/git/lldb/DerivedData/lldb/Build/Products/Debug/lldb
dyld: Library not loaded: @rpath/LLDB.framework/LLDB
  Referenced from:
/Users/ribrdb/Documents/git/lldb/DerivedData/lldb/Build/Products/Debug/lldb
  Reason: image not found
Trace/BPT trap: 5
$ otool -lv
/Users/ribrdb/Documents/git/lldb/DerivedData/lldb/Build/Products/Debug/lldb|grep
-A2 LC_RPATH
          cmd LC_RPATH
      cmdsize 32
         path @loader_path (offset 12)
$ file
/Users/ribrdb/Documents/git/lldb/DerivedData/lldb/Build/Products/Debug/LLDB.framework/LLDB
/Users/ribrdb/Documents/git/lldb/DerivedData/lldb/Build/Products/Debug/LLDB.framework/LLDB:
Mach-O 64-bit dynamically linked shared library x86_64


On Mon Feb 02 2015 at 11:38:32 AM Greg Clayton <gclayton at apple.com> wrote:

> As long as you don't build the BuildAndIntegration build you should be
> good. Build the "Debug" or "Release" configurations and you should be good.
>
> To find out where the "lldb" binary will search for its @rpath binaries
> you can type:
>
> % otool -lv lldb | grep -A2 LC_RPATH
>           cmd LC_RPATH
>       cmdsize 32
>          path @loader_path (offset 12)
>
> We see the path for a "Debug" configuration is to look in the current
> directory (@loader_path). If you look at the installed lldb:
>
> % otool -lv `xcrun -find lldb` | grep -A2 LC_RPATH | grep path
>          path @loader_path/../../Library/PrivateFrameworks (offset 12)
>          path @loader_path/../../../SharedFrameworks (offset 12)
>          path @loader_path/../../System/Library/PrivateFrameworks (offset
> 12)
>          path @loader_path/../../Library/PrivateFrameworks (offset 12)
>
> You can see it will look relative to the lldb binary (@loader_path) in a
> variety of different directories. This is how the BuildAndIntegration
> version is setup because you would install LLDB in a "bin" folder somewhere
> (like "/Applications/Xcode.app/Contents/Developer/usr/bin") and it will
> look for LLDB.framework and any other @rpath binaries using the paths
> mentioned in the LC_RPATH load commands of the executable.
>
> Greg
>
>
> > On Feb 2, 2015, at 9:29 AM, Oleksiy Vyalov <ovyalov at google.com> wrote:
> >
> > Hello,
> >
> > I'm facing some weird problems while trying to run lldb on OSX (10.9.5)
> > It was okay up until recently but now lldb is complaining about not
> found dependencies:
> >
> > ovyalov-macpro2:Debug ovyalov$ ./lldb
> > dyld: Library not loaded: @rpath/LLDB.framework/LLDB
> >   Referenced from: /Users/ovyalov/google/lldb/git/lldb/DerivedData/lldb/
> Build/Products/Debug/./lldb
> >   Reason: image not found
> > Trace/BPT trap: 5
> >
> > I'm running lldb binary from DerivedData/lldb/Build/Products/Debug
> directory. It started to fail for me yesterday and I'm wondering whether
> it's XCode or MacOS SDK updates.
> > However, if I set "Linking/Runpath search paths" option as
> ..../DerivedData/lldb/Build/Products/Debug then lldb is running without
> issues.
> >
> > Please advise what might be wrong here.
> > Thank you in advance.
> >
> >
> > --
> > Oleksiy Vyalov | Software Engineer | ovyalov at google.com
> > _______________________________________________
> > 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/20150211/13e8cb47/attachment.html>


More information about the lldb-dev mailing list