Building gdmodule-0.23 under Python2.1.1

Joe Kelly joek at
Wed Sep 5 19:38:19 CEST 2001

I am trying to build 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: python: fatal: relocation error: file
./ symbol gdImageCreateFromJpeg: referenced symbol not

I build via:
gcc -fPIC -g -O2 -Wall -Wstrict-prototypes
-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 ./

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

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