LWN.net Logo

Ubuntu discussing moving to LTS + rolling release model

Ubuntu discussing moving to LTS + rolling release model

Posted Mar 1, 2013 23:21 UTC (Fri) by mathstuf (subscriber, #69389)
In reply to: Ubuntu discussing moving to LTS + rolling release model by dashesy
Parent article: Ubuntu discussing moving to LTS + rolling release model

> some rpath trickery

Ha! OS X has the most complicated rpath logic I've ever seen. The library has to declare that it supports rpath for anything to apply, which seems…backwards. Not to mention that libA.dylib having "libB.dylib" as a dependent library is resolved relative to the executable opening libA.dylib, and not at all relative to libA.dylib :( . I can see why no one wants to rely on anyone else setting the paths via otool properly and instead just ships everything they need.


(Log in to post comments)

Ubuntu discussing moving to LTS + rolling release model

Posted Mar 2, 2013 0:02 UTC (Sat) by dashesy (subscriber, #74652) [Link]

Yes, it is backward. Since 10.5 OSX has @rpath that more resembles Linux rpath however. I am not an expert in OSX but had to do some fiddling when porting some library. This is what I figured out, if libA.dylib depends on @rpath/libB.dylib (shown in otool -L) then you can use install_name_tool to add_rpath of @loader_path/. which should make the path relative to libA.dylib.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds