[cl-gd-devel] problem compiling cl-gd-glue.c on 64-bit sytem
Has anyone had a problem compiling the cl-gd-glue.c into the shared library on a 64-bit system? It's never given me any problem on 32-bit systems, and I could swear I've done it on a 64-bit AMD Debian system before, but I just tried it on a new one and got this error: make gcc -I/usr/local/include -fPIC -c cl-gd-glue.c ld -shared -lgd -lz -lpng -ljpeg -lfreetype -liconv -lm -lc cl-gd-glue.o -o cl-gd-glue.so -L/usr/local/lib ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libz.a: could not read symbols: Bad value make: *** [cl-gd-glue.so] Error 1 I'm trying to install cl-gd-0.5.6 straight from Edi's site. gd-2.0.35 is installed, along with the other dependencies. This is puzzling. Jeff
Jeff Cunningham wrote:
Has anyone had a problem compiling the cl-gd-glue.c into the shared library on a 64-bit system? It's never given me any problem on 32-bit systems, and I could swear I've done it on a 64-bit AMD Debian system before, but I just tried it on a new one and got this error:
make gcc -I/usr/local/include -fPIC -c cl-gd-glue.c ld -shared -lgd -lz -lpng -ljpeg -lfreetype -liconv -lm -lc cl-gd-glue.o -o cl-gd-glue.so -L/usr/local/lib ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libz.a: could not read symbols: Bad value make: *** [cl-gd-glue.so] Error 1
I'm trying to install cl-gd-0.5.6 straight from Edi's site. gd-2.0.35 is installed, along with the other dependencies. This is puzzling.
Jeff
Well, I have a solution, but its a hack (for the benefit of anyone else faced with a similar problem). Clearly, the linker is prefering to use the static library libz.a instead of the dynamic one libz.so. Why, I don't know. It works when I modify the Makefile to this: cl-gd-glue.so: gcc -I/usr/local/include -fPIC -c cl-gd-glue.c ld -shared -lgd /usr/lib/libz.so -lpng -ljpeg -lfreetype -liconv -lm -lc cl-gd-glue.o -o cl-gd-glue.so -L/usr/local/lib rm cl-gd-glue.o Jeff
participants (1)
-
Jeff Cunningham