System: x86_64-pc-linux-gnu GCC: 4.1.2 CFLAGS:-march=k8 -O2 -pipe writing node 'lib/FAPIfontmap' len=1468 writing node 'lib/FAPIconfig' len=805 writing node 'lib/FAPIcidfmap' len=1483 writing node 'lib/FCOfontmap-PCLPS2' len=3018 writing node 'lib/gs_cet.ps' len=1817 Total %rom% structure size is 3458264 bytes. x86_64-pc-linux-gnu-gcc -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FILE64 -DHAVE_FONTCONFIG -O2 -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -fno-builtin -fno-common -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long int" -march=k8 -O2 -pipe -I./obj/../soobj -I./src -o ./obj/../soobj/gsromfs.o -c ./obj/../soobj/gsromfs.c x86_64-pc-linux-gnu-gcc -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FILE64 -DHAVE_FONTCONFIG -O2 -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -fno-builtin -fno-common -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long int" -march=k8 -O2 -pipe -I./src -I./obj/../soobj -I./obj/../soobj -I./src -o ./obj/../soobj/iccinit1.o -c ./src/iccinit1.c ./obj/../soobj/echogs -w ./obj/../soobj/ldt.tr -n - x86_64-pc-linux-gnu-gcc -L/usr/lib64 -L/usr/lib64 -shared -Wl,-soname=libgs.so.8 -o ./bin/../sobin/libgs.so.8.60 ./obj/../soobj/echogs -a ./obj/../soobj/ldt.tr -n -s ./obj/../soobj/gs.o -s cat ./obj/../soobj/ld.tr >>./obj/../soobj/ldt.tr ./obj/../soobj/echogs -a ./obj/../soobj/ldt.tr -s - -lcupsimage -lcups -L/usr/lib64 -lgnutls -L/usr/lib64 -ltasn1 -L/usr/lib64 -lgcrypt -L/usr/lib64 -lgpg-error -lz -lpthread -lm -lcrypt -ldl -lm -lstdc++ -lfontconfig -lm if [ x != x ]; then LD_RUN_PATH=; export LD_RUN_PATH; fi; \ XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \ FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \ DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \ DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \ DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \ DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \ DEVICE_DEVS_EXTRA= \ /bin/sh <./obj/../soobj/ldt.tr /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: ./obj/../soobj/gs.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC ./obj/../soobj/gs.o: could not read symbols: Bad value collect2: ld gab 1 als Ende-Status zurück make[1]: *** [bin/../sobin/libgs.so.8.60] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-text/ghostscript-gpl-8.60/work/ghostscript-8.60' make: *** [so] Error 2 Attached is a patch which adds -fPIC to the shared libs compilation.
Created attachment 3268 [details] ghostscript-fPIC-64bit.patch
While I am aware of the need of the extra -fPIC occasionally in 64-bit compilation, I don't think the place where the submitted patch modified is the appropriate place... the appropriate place is probably in the configure script.
Uh, I should have looked at the configure script before. Many thanks for your suggestion! I attached a working configure patch, but I also discovered that I can pass --enable-dynamic to configure to activate -fPIC. So what is the preffered way to handle this?
Created attachment 3273 [details] ghostscript-fPIC-64bit.patch
I get it to work by adding "-fPIC" to the general CFLAGS: CFLAGS="$CFLAGS -fPIC" ./configure ...
*** Bug 689527 has been marked as a duplicate of this bug. ***
*** Bug 689575 has been marked as a duplicate of this bug. ***
*** Bug 689834 has been marked as a duplicate of this bug. ***
Grabbing a Ralph's bugs.
Both "./configure --enable-dynamic && make so" and "ln -s base/unix-gcc.mak makefile && make so" are documented. (I updated the documentation in r11253 for the former). The latter has not been working for a while but a few commits leading up to r11258 makes it work again.
(In reply to comment #10) > Both > "./configure --enable-dynamic && make so" it works fine for me on the SVN version (21/05/2010) on Suse Linux 11.2 X86_64 (the release 8.71 failed on "make so" even with both --enable-dynamic as configure option and an environment variable CFLAGS="-fPIC")