<div dir="ltr">It happens to me from time to time but I don't know exactly why - as a workaround, set <span style="color:rgb(0,0,0);font-family:arial,sans,sans-serif;font-size:13px;white-space:pre-wrap">DYLD_FRAMEWORK_PATH  to your output build directory, e.g. </span><span style="color:rgb(0,0,0);font-family:arial,sans,sans-serif;font-size:13px;white-space:pre-wrap">export DYLD_FRAMEWORK_PATH=/Users/ovyalov/google/lldb/git/lldb/DerivedData/lldb/Build/Products/Debug</span> </div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 11, 2015 at 3:32 PM, Ryan Brown <span dir="ltr"><<a href="mailto:ribrdb@google.com" target="_blank">ribrdb@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Did you ever figure this out? I'm getting the same thing after updating my lldb sources and rebuilding:<br><br><div>$ /Users/ribrdb/Documents/git/lldb/DerivedData/lldb/Build/Products/Debug/lldb</div><span class=""><div>dyld: Library not loaded: @rpath/LLDB.framework/LLDB</div></span><div>  Referenced from: /Users/ribrdb/Documents/git/lldb/DerivedData/lldb/Build/Products/Debug/lldb</div><span class=""><div>  Reason: image not found</div><div>Trace/BPT trap: 5</div></span><div>$ otool -lv /Users/ribrdb/Documents/git/lldb/DerivedData/lldb/Build/Products/Debug/lldb|grep -A2 LC_RPATH</div><span class=""><div>          cmd LC_RPATH</div><div>      cmdsize 32</div><div>         path @loader_path (offset 12)</div></span><div><span style="line-height:1.5;font-size:13.1999998092651px">$ file /Users/ribrdb/Documents/git/lldb/DerivedData/lldb/Build/Products/Debug/LLDB.framework/LLDB</span><br></div><div>/Users/ribrdb/Documents/git/lldb/DerivedData/lldb/Build/Products/Debug/LLDB.framework/LLDB: Mach-O 64-bit dynamically linked shared library x86_64</div><div><br></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote">On Mon Feb 02 2015 at 11:38:32 AM Greg Clayton <<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>
<br>
To find out where the "lldb" binary will search for its @rpath binaries you can type:<br>
<br>
% otool -lv lldb | grep -A2 LC_RPATH<br>
          cmd LC_RPATH<br>
      cmdsize 32<br>
         path @loader_path (offset 12)<br>
<br>
We see the path for a "Debug" configuration is to look in the current directory (@loader_path). If you look at the installed lldb:<br>
<br>
% otool -lv `xcrun -find lldb` | grep -A2 LC_RPATH | grep path<br>
         path @loader_path/../../Library/<u></u>PrivateFrameworks (offset 12)<br>
         path @loader_path/../../../<u></u>SharedFrameworks (offset 12)<br>
         path @loader_path/../../System/<u></u>Library/PrivateFrameworks (offset 12)<br>
         path @loader_path/../../Library/<u></u>PrivateFrameworks (offset 12)<br>
<br>
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/<u></u>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.<br>
<br>
Greg<br>
<br>
<br>
> On Feb 2, 2015, at 9:29 AM, Oleksiy Vyalov <<a href="mailto:ovyalov@google.com" target="_blank">ovyalov@google.com</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> I'm facing some weird problems while trying to run lldb on OSX (10.9.5)<br>
> It was okay up until recently but now lldb is complaining about not found dependencies:<br>
><br>
> ovyalov-macpro2:Debug ovyalov$ ./lldb<br>
> dyld: Library not loaded: @rpath/LLDB.framework/LLDB<br>
>   Referenced from: /Users/ovyalov/google/lldb/<u></u>git/lldb/DerivedData/lldb/<u></u>Build/Products/Debug/./lldb<br>
>   Reason: image not found<br>
> Trace/BPT trap: 5<br>
><br>
> I'm running lldb binary from DerivedData/lldb/Build/<u></u>Products/Debug directory. It started to fail for me yesterday and I'm wondering whether it's XCode or MacOS SDK updates.<br>
> However, if I set "Linking/Runpath search paths" option as ..../DerivedData/lldb/Build/<u></u>Products/Debug then lldb is running without issues.<br>
><br>
> Please advise what might be wrong here.<br>
> Thank you in advance.<br>
><br>
><br>
> --<br>
> Oleksiy Vyalov | Software Engineer | <a href="mailto:ovyalov@google.com" target="_blank">ovyalov@google.com</a><br>
> ______________________________<u></u>_________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-dev</a><br>
<br>
<br>
______________________________<u></u>_________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-dev</a><br>
</blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><span style="color:rgb(85,85,85);font-family:sans-serif;line-height:20px;background-color:rgb(255,255,255);border-width:2px 0px 0px;border-style:solid;border-color:rgb(213,15,37);padding-top:2px;margin-top:2px">Oleksiy Vyalov |</span><span style="color:rgb(85,85,85);font-family:sans-serif;line-height:20px;background-color:rgb(255,255,255);border-width:2px 0px 0px;border-style:solid;border-color:rgb(51,105,232);padding-top:2px;margin-top:2px"> Software Engineer |</span><span style="color:rgb(85,85,85);font-family:sans-serif;line-height:20px;background-color:rgb(255,255,255);border-width:2px 0px 0px;border-style:solid;border-color:rgb(0,153,57);padding-top:2px;margin-top:2px"> <a href="mailto:ovyalov@google.com" target="_blank">ovyalov<font color="#1155cc">@google.com</font></a></span></div></div>
</div>