Problems installing Python Imaging Library

zutesmog at gmail.com zutesmog at gmail.com
Wed Mar 12 08:17:48 CET 2008


On Mar 10, 3:06 am, Nick Day <n... at njday.com> wrote:
> Hi,
>
> I'm trying to install PIL from source on my CentOS 4.5 server. The
> build summary reports that I have everything installed...
>
> --------------------------------------------------------------------
> PIL 1.1.6 BUILD SUMMARY
> --------------------------------------------------------------------
> version       1.1.6
> platform      linux2 2.3.4 (#1, Dec 11 2007, 05:28:55)
>               [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)]
> --------------------------------------------------------------------
> --- TKINTER support ok
> --- JPEG support ok
> --- ZLIB (PNG/ZIP) support ok
> --- FREETYPE2 support ok
>
> ... but if I try and build it I receive the following error:
>
> /usr/bin/ld: /usr/local/lib/libjpeg.a(jcparam.o): relocation
> R_X86_64_32 against `a local symbol' can not be used when making a
> shared object; recompile with -fPIC
>
> How do I fix this?  I am currently running "python setup.py build" and
> don't understand how I would change the compiling options to add the "-
> fPIC" flag.  I'm quite a newbie when it comes to Linux/Python so any
> help you could give me would be great.
>
> Thanks,
> Nick

You should be linking against a dynamic version of libjpeg rather than
the static version.  ie libjpeg.so   Looks like you have locally
installed libjpeg but only built a static version.

Rgds

Tim



More information about the Python-list mailing list