Building gdmodule-0.23 under Python2.1.1

Joe Kelly joek at quantiva.com
Wed Sep 5 13:38:19 EDT 2001


I am trying to build gdmodule.so into Python2.1.1. And it is failing.

Has anyone done this successfully?

It builds correctly, but when I try to import gd I get:
10026>mach(joek)$ python
Python 2.1.1 (#1, Aug 31 2001, 20:46:16)
[GCC 2.95.2 19991024 (release)] on sunos5
Type "copyright", "credits" or "license" for more information.
>>> import gd
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: ld.so.1: python: fatal: relocation error: file
./gdmodule.so: symbol gdImageCreateFromJpeg: referenced symbol not
found
>>>

I build gdmodule.so via:
gcc -fPIC -g -O2 -Wall -Wstrict-prototypes
-I/home/joek/build/python/pkg/python/reloc/include/python2.1
-I/home/joek/build/python/pkg/python/reloc/include/python2.1
-DHAVE_CONFIG_H  -I./install/include -c ././gdmodule.c -o ./gdmodule.o

ld -G  ./gdmodule.o  -L./install/lib -L/usr/lib/X11 -L/usr/X11R6/lib
-lgd -lz -lpng -ljpeg -lttf -lX11 -lXpm  -o ./gdmodule.so


Libgd.a should have the gdImageCreateFromJpeg:
It is in gd_jpeg.c:
gcc -I. -I/home/joek/build/gd/gd-1.8.3/../current/install/include -O 
-c  gd_jpeg.c


ar rc libgd.a gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o \
        gd_io_file.o gd_ss.o gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o \
        gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \
        gdtables.o gdttf.o gdcache.o gdkanji.o wbmp.o gd_wbmp.o
ranlib libgd.a

We have successfully built it with Python1.5.2, but not with
Python2.1.1.

The platform is Solaris on Intel.
SunOS mach 5.8 Generic_108529-03 i86pc i386 i86pc

Any help would be greatly appreciated.



More information about the Python-list mailing list