libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Adding dirs for installed libraries to temp_rpath is breakin


From: Peter O'Gorman
Subject: Re: [PATCH] Adding dirs for installed libraries to temp_rpath is breaking builds on darwin8
Date: Wed, 02 Feb 2005 08:05:55 +0900
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

Ralf Wildenhues wrote:
What's the name of the lib?  Am I being dense?


Okay to apply (all branches, patch against branch-1-5)?


I guess, but: for a non-Darwin user like me, your patch below bears
almost no apparent relation to the explanation above.  Care to elaborate
(and maybe put that elaboration into the ChangeLog entry as well)?


Hi Ralf,
On darwin the dynamic linker knows only one location for a library, so if I had a libjpeg.dylib at /my/lib/libjpeg.dylib the full path is encoded into libraries and applications that need it. DYLD_LIBRARY_PATH is always searched before the encoded path. Setting DYLD_LIBRARY_PATH to e.g. "/foo/lib:/bar/lib" the loader will look for /foo/lib/libjpeg.dylib, /bar/lib/libjpeg.dylib, and assuming it didn't find a libjpeg in either place it will look for /my/lib/libjpeg.dylib.

This means that encoding a library's installed libdir into DYLD_LIBRARY_PATH in the wrapper script (or anywhere else) is not necessary. It never has been necessary, but it didn't really bother anyone until Apple's very own libjpeg.dylib became required to start an application!

The patch simply avoids putting the installed libs libdir into temp_rpath on darwin, since the temp_rpath is what is used to decide what goes in DYLD_LIBRARY_PATH the problem goes away.

Is this any clearer?

Note that Apple may change this behavior prior to an actual release of the OS (I hope), but the patch is "harmless" anyway.

I'll look at improving the ChangeLog entry after work.

Thanks,
Peter
--
Peter O'Gorman - http://www.pogma.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]