Beginner question -- how to resolve dependent dylib's when linking

Ryan Schmidt ryandesign at macports.org
Mon Jan 7 13:03:32 PST 2008


On Jan 7, 2008, at 09:14, William Davis wrote:

> possible useful  info from uni-porting list;
>
> Begin forwarded message:
>
>> From: Martin Costabel <costabel at wanadoo.fr>
>> Date: December 30, 2007 8:12:57 AM EST
>> To: kelsey at slac.stanford.edu
>> Cc: unix-porting at lists.apple.com
>> Subject: Re: Beginner question -- how to resolve dependent dylib's  
>> when	linking
>>
>> Peter O'Gorman wrote:
>>> Mike Kelsey wrote:
>>>> Is there an option I can give to |libtool| or/and |ld|, such  
>>>> that dependent
>>>> libraries mentioned inside .dylib's will be resolved via the -L  
>>>> options?
>>> See -dylib_file in the ld(1) manpage.
>>
>> If you are on Leopard, you probably don't have to do anything in  
>> this case. It is standard behavior there (in most situations  
>> perceived as an annoying bug, though) that indirect libraries are  
>> *not* looked up according to their install_name, but in the  
>> directories defined by -L.
>>
>> Perversely, you are forced to use -dylib_file, or explicit -L -l  
>> references, if you want them to be looked up at the path mentioned  
>> in the referencing dylib. This wreaks all kinds of havoc if you  
>> have several dylibs of the same name on your system, but in your  
>> situation this may be the behavior you are wishing for.

Presumably you are sending this as information for solving the "cycle  
in dylib re-exports" problem we see with some software under Leopard?

But isn't the solution provided by Apple in their technote already  
sufficient to resolve this?

http://developer.apple.com/qa/qa2007/qa1567.html

Or am I misunderstanding your message?



More information about the macports-dev mailing list