-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/28/10 5:01 PM, Timothy Havel wrote:
> Thanks for the answers. Using the *_FALLBACK_* as you suggest does solve
> the problem, but I remain puzzled by the fact that I set
> DYLD_LIBRARY_PATH so that /sw/lib was searched before /usr/lib, so why
> did it grab something from there unless it couldn't find it in /sw/lib?
> In any case I install things I can't get from fink in /usr/local, so
> that should be searched first.
> 
> Please let me know if I've let myself in for further puzzles at some
> unknown future date, when this exchange will have faded from my memory ...
> 
> TFH
> 

Dave said it below:  DYLD_LIBRARY_PATH *overrides* the search order.  So
you're searching /usr/local/lib, then /sw/lib, then /usr/lib.

DYLD_FALLBACK_LIBRARY_PATH doesn't override the search order, but
appends to it.  (hence the name)

However, since as Dave said, binaries encode the full path to any
libraries, typically you don't even need to specify
DYLD_FALLBACK_LIBRARY_PATH.

Building using Fink with libraries in /usr/local/lib may well set you up
for problems down the road, BTW, if you get any cross-linkage.  We
recommend moving /usr/local out of the way while you do Fink builds.

- -- 
Alexander Hansen
Fink User Liaison

> On Jun 28, 2010, at 16:16 , David R. Morrison wrote:
> 
>>
>> On Jun 28, 2010, at 1:52 PM, Timothy Havel wrote:
>>>
>>> % printenv DYLD_LIBRARY_PATH
>>> /usr/local/lib:/sw/lib:/usr/lib:/lib
>>>
>>
>> This seems to be the source of your trouble.
>>
>> DYLD_LIBRARY_PATH *overrides* the natural search path which dyld uses.
>>  Unlike Linux (which you may be familiar with example), each library
>> contains a full path to all libraries it is linked to, and dyld
>> normally follows that path.  Setting DYLD_LIBRARY_PATH to *any*
>> nonempty value overrides the normal search.
>>
>> If something you have installed really needs to have a path specified
>> through an environment variable, DYLD_FALLBACK_LIBRARY_PATH is a much
>> better choice.
>>
>>   -- Dave
>>
> 




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwpIWIACgkQB8UpO3rKjQ9scACdHYJIAXg+t9KE+SWtuOFy19sp
+10AnRVr1XVW8Ky+6pWbIIKxrr/EVEdg
=W+34
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to