Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>install_name_tool works by overwriting the path strings, so any new one has to be the same length or shorter than the original one.</p> <p>Because "/usr/local/lib/testlib.dylib" is 28 characters long and ""$TARGET_BUILD_DIR"/../../testlib.dylib" is at least 20 characters long, if the $TARGET_BUILD_DIR variable expands to a string of 9 characters or more then the replacement will probably be too long to use.</p> <p>I say probably because you can add the flag -headerpad_max_install_names to the linker so that it will add padding after each path so the space will exist to allow longer replacements (I believe up to 1,024 characters). Though as install_name_tool is failing then this was probably not used.</p> <p>As for the /usr/local/lib path, technically /usr (/usr/bin, /usr/lib etc.) is used for software that applies to any machine and which can be mounted on a network, while the /usr/local root (/usr/local/bin, /usr/local/lib) is for anything specific to just the local machine. In practice it is more the case that packages supplied via an OS distribution users /usr and custom installs use /use/local. For the most part it does not matter. On the Mac specifically the Homebrew package manager uses the /usr/local root (while MacPorts uses /opt and Fink /sw).</p> <p>It just happens that whatever you did to originally install it used that location over any of the other options. But so long as whatever requires it knows where to look, it is no more or less a valid location.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload