Bug 689575 - 8.61 does not build on linux x64
Summary: 8.61 does not build on linux x64
Status: RESOLVED DUPLICATE of bug 689396
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: 0.00
Hardware: PC Linux
: P4 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-25 13:25 UTC by Albert Astals Cid
Modified: 2007-12-13 12:55 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Astals Cid 2007-11-25 13:25:35 UTC
make so fails

ghostscript-8.61$ LC_ALL=C make so
make LDFLAGS=' -shared -Wl,-soname=libgs.so.8' 
GS_XE=./bin/../sobin/libgs.so.8.61 STDIO_IMPLEMENTATION=c 
DISPLAY_DEV=./obj/../soobj/display.dev BINDIR=./bin/../sobin 
GLGENDIR=./obj/../soobj GLOBJDIR=./obj/../soobj PSGENDIR=./obj/../soobj 
PSOBJDIR=./obj/../soobj 
CFLAGS='-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"  ' 
prefix=/home/tsdgeos/borrame/ ./bin/../sobin/gsc ./bin/../sobin/gsx
make[1]: Entering directory `/home/tsdgeos/descargues/ghostscript-8.61'
./obj/../soobj/echogs -w ./obj/../soobj/ldt.tr -n - 
gcc -shared -Wl,-soname=libgs.so.8 -o ./bin/../sobin/libgs.so.8.61
./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 - -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/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 returned 1 exit status
make[1]: *** [bin/../sobin/libgs.so.8.61] Error 1
Comment 1 Hin-Tak Leung 2007-11-26 15:22:05 UTC
The error message is as it says...

I think there is a work around:

make XCFLAGS="-fPIC" XLDFLAGS="-fPIC" so

But I am surprised that it happens again - did you just do 'make so'
without running ./configure ? I thought this problem was fixed some time ago...
Comment 2 Albert Astals Cid 2007-11-26 15:41:18 UTC
./configure
make

that's exactly what i did, and yes, i know how to workaround it, just that it 
should work, that's why i reported the bug.
Comment 3 Albert Astals Cid 2007-11-26 15:41:39 UTC
"make so" instead of "make" on last comment :D
Comment 4 Marcos H. Woehrmann 2007-11-27 09:43:08 UTC
I can confirm the problem and that adding -fPIC to the command line as in
Comment #1 works for buiding the libgs.so.8.61.  However, the is problem
reported after that file is finished:

.
.
.
        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
rm -f ./bin/../sobin/libgs.so.8 
ln -s libgs.so.8.61 ./bin/../sobin/libgs.so.8 
rm -f ./bin/../sobin/libgs.so
ln -s libgs.so.8.61 ./bin/../sobin/libgs.so
gcc  -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FILE64 -DHAVE_MKSTEMP64
-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"  -fPIC
-I./obj/../soobj -I./src  -g -o ./bin/../sobin/gsc ./src/dxmainc.c
-L./bin/../sobin -lgs
gcc  -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FILE64 -DHAVE_MKSTEMP64
-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"  -fPIC
-I./obj/../soobj -I./src  -g -DPNG_NO_MMX_CODE -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libpng12   -o ./bin/../sobin/gsx
./src/dxmain.c \
        -L./bin/../sobin -lgs -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
-lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama
-lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11
-lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  
In file included from /usr/include/gtk-2.0/gtk/gtkactiongroup.h:34,
                 from /usr/include/gtk-2.0/gtk/gtk.h:38,
                 from ./src/dxmain.c:32:
/usr/include/gtk-2.0/gtk/gtkitemfactory.h:50: warning: function declaration
isn't a prototype
./src/dxmain.c:387: warning: initialization from incompatible pointer type
./src/dxmain.c:388: warning: initialization from incompatible pointer type
./src/dxmain.c:389: warning: initialization from incompatible pointer type
./src/dxmain.c:390: warning: initialization from incompatible pointer type
./src/dxmain.c:391: warning: initialization from incompatible pointer type
./src/dxmain.c:392: warning: initialization from incompatible pointer type
./src/dxmain.c:393: warning: initialization from incompatible pointer type
./src/dxmain.c:395: warning: initialization from incompatible pointer type
./src/dxmain.c: In function 'display_size':
./src/dxmain.c:654: warning: passing argument 3 of 'gtk_signal_connect_full'
from incompatible pointer type
make[1]: Leaving directory `/home/marcos/Desktop/artifex/ghostscript-8.61'
Comment 5 Ralph Giles 2007-11-27 09:51:14 UTC
It's not fixed. I've not yet worked out how to resolve this properly.

*** This bug has been marked as a duplicate of 689396 ***