[Image-SIG] ld problem with libImaging

Terry Hancock hancock@anansispaceworks.com
Thu, 14 Feb 2002 21:40:36 -0800


Hi,

I'm trying to build PIL on a Debian Linux system, with
a number of source packages installed under a single
directory "/usr/local/narya" -- the reasoning is that
I have to port all of these onto another, rather different
system, and I want to keep these development packages
together.

So, for example, I have libjpeg and libpng installed
under /usr/local/narya/lib .  For some reason, "ld" can't
seem to find these, as invoked in the libImaging makefile,
so my build ends like this:

gcc -o coretest coretest.o libImaging.a -lz -ljpeg  -lm
/usr/bin/ld: cannot find -ljpeg
collect2: ld returned 1 exit status
make: *** [coretest] Error 1

However:

% cat /etc/ld.so.conf
/usr/X11R6/lib
/usr/local/narya/lib

and

% echo $LD_LIBRARY_PATH
/usr/local/narya/lib:/usr/local/narya/mysql/lib/mysql:/usr/local/narya/lib:/usr/local/narya/mysql/lib/mysql:

and I've already run "/sbin/ldconfig -v", which shows
the /usr/local/narya/lib directory and the jpeg and png
libraries (among others):
...
/usr/local/narya/lib:
	libMagick.so.5 => libMagick.so.5.0.42
	libfreetype.so.6 => libfreetype.so.6.2.0
	libpng.so.3 => libpng.so.3.1.2.1
	libxml2.so.2 => libxml2.so.2.4.15
	libjpeg.so.62 => libjpeg.so.62.0.0
	libz.so.1 => libz.so.1.1.3
...

Furthermore:

gcc -o coretest coretest.o libImaging.a -lz -ljpeg  -lm

fails, as above, but adding the search path with the -L
flag works:

gcc -o coretest coretest.o libImaging.a -lz -ljpeg -lm
-L/usr/local/narya/lib

But I can't seem to get this to happen without the flag,
and I'm not sure where to define such an option so that
the makefile will use it.  I'm not sure if this is really
a PIL problem, but it's the only package that's giving
me this kind of trouble (for example, the libMagick
library, which also depends on these libraries, built
without problems).

So why can't the loader find it?  Any recommendations on
how I can finish the install?  Are there some missing
options I can put somewhere, or have I missed a step
in making the libraries available?  I'm pretty stumped.

Any help or suggestions would be much appreciated, thanks!

Terry

-- 
------------------------------------------------------
Terry Hancock
hancock@anansispaceworks.com       
Anansi Spaceworks                 
http://www.anansispaceworks.com 
------------------------------------------------------