[Image-SIG] PIL's configure bug -- from 2002
Terry Hancock
hancock at anansispaceworks.com
Fri Feb 20 19:37:11 EST 2004
On Friday 20 February 2004 04:45 pm, Terry Hancock wrote:
> On Friday 20 February 2004 01:20 pm, Bill Janssen wrote:
> > You should be able to set the env vars LIBS and CPPFLAGS to the
> > appropriate -L and -I switches before running configure, and they will
> > be picked up.
>
> I agree that they *should* do that. They *should* also be set by
> options to configure. They are not and they do not.
Just to prove I'm not imagining things . . .
After unpacking 1.1.4:
% setenv LIBS "-L/usr/local/narya/lib -ljpeg -lz -lpng"
% setenv CPPFLAGS "-I/usr/local/narya/include -L/usr/local/narya/lib"
cd libImaging
./configure --prefix=/usr/local/narya --with-jpeg=/usr/local/narya/lib --with-zlib=/usr/local/narya/lib
make
cd ..
python ./setup.py build_ext -i
This at least *does* build and install.
Now, test it:
Python 2.3.3 (#1, Feb 17 2004, 16:56:55)
[GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import Image
>>> a = Image.open("astronomer.jpg")
>>> b = a.convert("P")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/narya/lib/python2.3/site-packages/PIL/Image.py", line 566, in convert
self.load()
File "/usr/local/narya/lib/python2.3/site-packages/PIL/ImageFile.py", line 165, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "/usr/local/narya/lib/python2.3/site-packages/PIL/Image.py", line 309, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
See? Still no JPEG decoder. It did not compile support for JPEG. I know
this can be fixed -- I've done it before with Python 2.1 and 2.2, using
the Makefile.pre.in instructions. But those don't work with 2.3 apparently.
I think this deserves a permanent fix.
Cheers,
Terry
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
More information about the Image-SIG
mailing list