[Image-SIG] error compiling PIL 1.1.4 on Solaris 2.8 with python
2.2.3
Ziying Sherwin
sherwin at lhc.nlm.nih.gov
Fri Jun 27 16:58:38 EDT 2003
We are trying to build Python Imaging Library(PIL 1.1.4) with Python 2.2.3 and
gcc 3.3 on our Solaris 2.8 machine. Everything went on smoothly until when we
tried to build dynamic library at the top level directory. We got the following
error messages:
gcc -shared ./_imaging.o ./decode.o ./encode.o ./map.o ./display.o ./outline.o ./path.o libImaging/libImaging.a -L/depot/lib -ljpeg -L/depot/lib -lz -o ./_imaging.so
Text relocation remains referenced
against symbol offset in file
<unknown> 0x168 libImaging/libImaging.a(Unpack.o)
<unknown> 0x16c libImaging/libImaging.a(Unpack.o)
<unknown> 0x170 libImaging/libImaging.a(Unpack.o)
<unknown> 0x174 libImaging/libImaging.a(Unpack.o)
<unknown> 0x178
....
libImaging/libImaging.a(ZipDecode.o)
inflateInit_ 0xa4 libImaging/libImaging.a(ZipDecode.o)
inflateEnd 0x410 libImaging/libImaging.a(ZipDecode.o)
<unknown> 0x178 libImaging/libImaging.a(ZipEncode.o)
<unknown> 0x17c libImaging/libImaging.a(ZipEncode.o)
deflateInit2_ 0x194 libImaging/libImaging.a(ZipEncode.o)
deflate 0x70c libImaging/libImaging.a(ZipEncode.o)
deflate 0x7b8 libImaging/libImaging.a(ZipEncode.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `_imaging.so'
So we have to manually compile the dynamic library by using the command:
ld -G ./decode.o ./encode.o ./map.o ./display.o ./outline.o ./path.o -L./libImaging -L/depot/lib -R/depot/lib -ljpeg -L/depot/lib -lz -o ./_imaging.so ./_imaging.o -lImaging -lc -L/depot/package/python_2.2.3/lib/python2.2/config -lpython2.2 -lm -ldl
It compiled, but if we tried to test the build by import the library, we got
the following error message:
nob[root]csh:410>nob[root]csh:410>python
Python 2.2.3 (#6, Jun 26 2003, 17:11:25)
[GCC 3.3] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import _imaging
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: ld.so.1: python: fatal: relocation error: file ./_imaging.so: symbol deflateSetDictionary: referenced symbol not found
Any ideas how we can fix it? Thanks in advance.
Ziying Sherwin
More information about the Image-SIG
mailing list