[MacPorts] #22423: radlib doesn't use MacPorts libraries

Daniel J. Luke dluke at geeklair.net
Wed Nov 11 14:39:59 PST 2009


On Nov 11, 2009, at 4:54 PM, Ryan Schmidt wrote:
>> /bin/sh ../libtool --tag=CC   --mode=link /usr/bin/gcc-4.2  -O2 -arch x86_64 -L../src/.libs   -L/usr/lib -L/usr/local/lib  -L/opt/local/lib -o raddebug raddebug.o -lc -lm -lrad   -lsqlite3 -lm -lc
>> 
>> Maybe I'm wrong here, but I thought the -L option added directories to the *beginning* of the search path, so shouldn't /opt/local/lib be first in the search path?
> 
> As far as I understand, -L adds directories to the end of the search path. But I haven't tested that extensively.

The manpage for ld says "Directories specified with -L are searched in the order they appear on the command line and before the default search path."

So, the problem above is that -L/usr/lib is before -L${prefix}/lib (getting ${prefix} before -L/usr/local/lib could also help prevent problems for people who have stuff in /usr/local)

--
Daniel J. Luke                                                                   
+========================================================+                        
| *---------------- dluke at geeklair.net ----------------* |                          
| *-------------- http://www.geeklair.net -------------* |                          
+========================================================+                        
|   Opinions expressed are mine and do not necessarily   |                          
|          reflect the opinions of my employer.          |                          
+========================================================+





More information about the macports-dev mailing list