On Jul 24, 2009, at 8:11 AM, Max (Weijun) Wang wrote:

In fact, why is DYLD_FALLBACK_LIBRARY_PATH updated in src/solaris/bin/
java_md.c? Why not DYLD_LIBRARY_PATH?

DYLD_LIBRARY_PATH should be preferred than DYLD_FALLBACK_LIBRARY_PATH.
If the libjpeg.dylib is in DYLD_LIBRARY_PATH, it will be loaded
instead of /usr/lib/libjpeg.dylib.

If DYLD_LIBRARY_PATH is set, it can cause library name conflicts. By default, Mach-O records the path to libraries, rather than only their name. Setting DYLD_LIBRARY_PATH results in this path being overridden, and case insensitive name matching occurs first, instead.

One example of this is the JDK's libjpeg.dylib, which conflicts with / System/Library/Frameworks/ApplicationServices.framework/Versions/A/ Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib

This should probably be revisited, as it may be possible to remove the use of DYLD_* variables via the use of executable/library-relative @rpath, @executable_path, and/or @loader_path install_name values.

-landonf

Attachment: PGP.sig
Description: This is a digitally signed message part



Reply via email to