DYLD_FALLBACK_LIBRARY_PATH changed in OpenJDK (was Re: How to load dylib on Mac?)

Landon Fuller landonf at plausiblelabs.com
Fri Jul 24 09:53:19 PDT 2009

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?
> If the libjpeg.dylib is in DYLD_LIBRARY_PATH, it will be loaded
> instead of /usr/lib/libjpeg.dylib.

[resending with a list-subscribed address]

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 / 

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://mail.openjdk.java.net/pipermail/bsd-port-dev/attachments/20090724/df5d162c/PGP.sig 

More information about the bsd-port-dev mailing list