Martin Costabel wrote:

Daniel Macks wrote:
[]

I wonder if when linking against that .dylib the linker is picking
/sw/lib/libnetpbm.dylib instead of the one just compiled as part of
the nascent package?


I don't think this happens in this case. The package goes to some lengths to avoid this, -isystem and such. The actual linker line where the undefined symbol appeared was

 > cc -no-cpp-precomp -L/sw/lib -o pnmtopng pnmtopng.o pngtxt.o \
 >   `/sw/src/netpbm10-10.24-1/netpbm-10.24/buildtools/libopt
 > /sw/src/netpbm10-10.24-1/netpbm-10.24/lib/libnetpbm.dylib libpng.dylib
 > libz.dylib` \
 >   -lm    -L/sw/lib
 > libopt results: ' -L/sw/src/netpbm10-10.24-1/netpbm-10.24/lib -lnetpbm
 > -lpng -lz'
 > ld: warning prebinding disabled because of undefined symbols
 > ld: Undefined symbols:
 > _pm_seek2
 > _pm_tell2

So the good library was there with its full name. The only thing that puzzles me there (apart from the missing symbols that I am not able to reproduce) is the "libopt results:" line. I don't know who is talking there.

OK, after looking what libopt does and rereading that linker line, I see now that it is actually possible that the wrong library got picked, because the real linker line (which is not shown) would have been


> cc -no-cpp-precomp -L/sw/lib -o pnmtopng pnmtopng.o pngtxt.o \
> -L/sw/src/netpbm10-10.24-1/netpbm-10.24/lib -lnetpbm -lpng -lz \
>   -lm    -L/sw/lib

and so, despite all the efforts, the -lnetpbm will pick up the library in /sw/lib.

This libopt stuff is actually more harmful than useful. On darwin, it is superfluous, because we have the install_names. It is a replacement of the install_names construction for those systems where the path that gets hardcoded into the executable is taken from the linker line.

--
Martin





-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to