DYLD_LIBRARY_PATH has a “look here first before usual places” semantics, in order to let users use an alternative version of a shared library. On the other side, DYLD_FALLBACK_LIBRARY_PATH has a “look here if not found in usual places” semantics, in order to let users specify additional locations where a shared library is found. In our case, if a binary refers to a common shared library found in usual places, we want to use it; we simply want to specify additional locations where BLS/MCL/OpenSSL libraries are found. So it is more appropriate to use DYLD_FALLBACK_LIBRARY_PATH. This also fixes a nasty symbol table mismatch, which is the main reason for this change: Certain commonly used shared libraries - such as libJPEG.dylib, co-located within the ImageIO framework and expected by the main ImageIO library – are often also found in Homebrew or MacPorts root (/opt/local//lib for MacPort). If DYLD_LIBRARY_PATH included /opt/local/lib for OpenSSL, many system programs linked against ImageIO will erroneously pick up libJPEG.dylib in /opt/local/lib, which lacks certain internal symbols that the framework version has. Using DYLD_FALLBACK_LIBRARY_PATH makes dyld honor the full path to the framework version of libJPEG, which is hardcoded in the main ImageIO framework library.pull/429/head
parent
a9e9a73114
commit
bd0f4401de
Loading…
Reference in new issue