[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Problems installing Python Imaging Library

Nick Day

3/9/2008 6:07:00 PM

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
1 Answer

zutesmog

3/12/2008 7:18:00 AM

0

On Mar 10, 3:06 am, Nick Day <n...@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