Problems installing Python Imaging Library

N

Nick Day

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
 
Z

zutesmog

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top