[Zope] Failure to install PIL on a Linux server

Dominik Wezel dominik.wezel at datenpark.ch
Tue Aug 23 07:58:32 EDT 2005


Hi all

I'm aware that PIL is not easy to install, primarily due to the
prerequisites.  I've studied and applied as well as possible
http://mail.zope.org/pipermail/zope/2002-December/128364.html and
http://www.zope.org/Members/regebro/PIL_zope/, both of which seem
slightly medieval: the setup and test processes are very different
today.  I didn't find any other information pertaining to my problem, so
I considered this posting.  I hope I'm on the right list here.



Setup
=====
- debian 3.1 (sarge) on a UML (user mode linux) dedicated ZOPE instance
- /usr/src/Imaging-1.1.5 (from Imaging-1.1.5.tar.gz, 2005-03-28)
- /usr/src/freetype-2.1.10 (from freetype-2.1.10.tar.bz2, 2005-06-12)
- /usr/src/jpeg-6b (from jpegsrc.v6b.tar.gz, 2005-03-28)



Symptom
=======
root at zope-server:/usr/src/Imaging-1.1.5# python setup.py build_ext -i
|running build_ext
|--------------------------------------------------------------------
|PIL 1.1.5 BUILD SUMMARY
|--------------------------------------------------------------------
|version       1.1.5
|platform      linux2 2.3.5 (#1, Apr 22 2005, 15:12:06)
|              [GCC 3.3.5 (Debian 1:3.3.5-8)]
|--------------------------------------------------------------------
|*** TKINTER support not available
|--- JPEG support ok
|--- ZLIB (PNG/ZIP) support ok
|--- FREETYPE2 support ok
|--------------------------------------------------------------------
|To add a missing option, make sure you have the required
|library, and set the corresponding ROOT variable in the
|setup.py script.
|
|To check the build, run the selftest.py script.

root at zope-server:/usr/src/Imaging-1.1.5# python selftest.py
|*****************************************************************
|Failure in example: _info(Image.open("Images/lena.jpg"))
|from line #24 of selftest.testimage
|Exception raised:
|Traceback (most recent call last):
|  File "./doctest.py", line 499, in _run_examples_inner
|    exec compile(source, "<string>", "single") in globs
|  File "<string>", line 1, in ?
|  File "./selftest.py", line 21, in _info
|    im.load()
|  File "PIL/ImageFile.py", line 180, in load
|    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
|  File "PIL/Image.py", line 328, in _getdecoder
|    raise IOError("decoder %s not available" % decoder_name)
|IOError: decoder jpeg not available
|1 items had failures:
|   1 of  55 in selftest.testimage
|***Test Failed*** 1 failures.
|*** 1 tests of 55 failed.

It looks like JPEG support is enabled, but still the selftest doesn't
find the decoder.


Additional Info
===============

In /usr/src/Imaging-1.1.5/setup.py
# --------------------------------------------------------------------
# Library pointers.
#
<snip>
FREETYPE_ROOT = "/usr/local/lib"
JPEG_ROOT = "/usr/lib"
TIFF_ROOT = None
ZLIB_ROOT = None
TCL_ROOT = None

root at zope-server:/usr/src/Imaging-1.1.5# ls /usr/local/lib
|total 4168
|-rw-r--r--  1 root staff 2544356 Jun 27 18:08 libfreetype.a
|-rwxr-xr-x  1 root staff     824 Jun 27 18:08 libfreetype.la
|lrwxrwxrwx  1 root staff      20 Jun 27 18:08 libfreetype.so ->
libfreetype.so.6.3.8
|lrwxrwxrwx  1 root staff      20 Jun 27 18:08 libfreetype.so.6 ->
libfreetype.so.6.3.8
|-rwxr-xr-x  1 root staff 1546147 Jun 27 18:08 libfreetype.so.6.3.8
|-rw-r--r--  1 root staff  162324 Aug 23 09:37 libjpeg.a
|drwxr-sr-x  2 root staff      80 Jun 27 18:08 pkgconfig
|drwxrwsr-x  3 root staff      80 Jun 17 16:05 python2.3

root at zope-server:/usr/src/Imaging-1.1.5# ls /usr/local/lib
|<snip>
|-rw-r--r--   1 root root     161160 Mar  2 13:26 libjpeg.a
|-rw-r--r--   1 root root        802 Mar  2 13:26 libjpeg.la
|lrwxrwxrwx   1 root root         17 Aug 18 15:26 libjpeg.so ->
libjpeg.so.62.0.0
|lrwxrwxrwx   1 root root         17 Jun 17 17:54 libjpeg.so.62 ->
libjpeg.so.62.0.0
|-rwxr-xr-x   1 root root     140022 Jun 17 17:54 libjpeg.so.62.0.0
|<snip>

root at zope-server:/usr/src/Imaging-1.1.5# ld -L/usr/lib -ljpeg -nostdlib
|ld: warning: libc.so.6, needed by /usr/lib/libjpeg.so, not found (try
|using -rpath or -rpath-link)
|ld: warning: cannot find entry symbol _start; not setting start address
|/usr/lib/libjpeg.so: undefined reference to `getenv at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `free at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `fread at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `sprintf at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `fflush at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `memset at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `sscanf at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `memcpy at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `malloc at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `exit at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `fprintf at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `stderr at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `fwrite at GLIBC_2.0'
|/usr/lib/libjpeg.so: undefined reference to `ferror at GLIBC_2.0'

root at zope-server:/usr/src/Imaging-1.1.5# ld -L/usr/lib -ljpeg -nostdlib
-Bshareable
root at zope-server:/usr/src/Imaging-1.1.5#

Maybe the problem is that libjpeg is a shareable library?  How can I
install it otherwise?  READMEs coming along with the source are not
expanding on alternatives.


Non-topics
==========
I'm aware that debian has a ZOPE-Package, even a PIL-Package, but there
are various reasons not to use them here, but rather to setup the whole
stuff manually.



Thanks for any help!
-- 

Gruß, Dominik Wezel

---------------------------------------------

DATENPARK
Badenerstraße 69, Postfach
CH-8026 Zürich

Tel +41 1 299 33 66
Fax +41 1 299 33 91
dominik.wezel at datenpark.ch   www.datenpark.ch

---------------------------------------------



More information about the Zope mailing list