|
|
Subscribe / Log in / New account

libtool and root

libtool and root

Posted Apr 27, 2019 21:37 UTC (Sat) by ballombe (subscriber, #9523)
In reply to: Quote of the week by nix
Parent article: Quote of the week

There is an issue with darwin compatibility: darwin ignores rpath and instead uses the path to the library on the command line at link time. So to avoid this issue, some Makefiles first install the library and then relink the binary with the installed library. Usually as root.


to post comments

libtool and root

Posted Apr 29, 2019 13:20 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

It doesn't care about the command line name given to the library. Each library has an ID which is how it should be looked up. Usually this is done with `@rpath/`, but this requires that *consumers* add the proper LC_RPATH entries to the consuming libraries otherwise it cannot be found. Note that LC_RPATH is ignored is @rpath/ is not used (e.g., absolute path, @executable_path/, or @loader_path/ each of which has its uses). And relinking is not required; install_name_tool can edit the files in-place before or after installation (provided -header_max_path or whatever flag was passed to ensure you have enough space to actually edit the library).


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