Bug 689872 - shared object build fails
Summary: shared object build fails
Status: RESOLVED DUPLICATE of bug 686865
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: 8.62
Hardware: Sun Solaris
: P4 blocker
Assignee: Ralph Giles
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-26 23:52 UTC by P.Donche
Modified: 2008-08-28 05:27 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description P.Donche 2008-05-26 23:52:26 UTC
Hi,

I want to install GPL Ghostscript, latest version 8.62
I have SUN Solaris 10 (SPARC), gcc version 3.4.6

I was able to make the single executable version:
-rwxr-xr-x    1 root     root     12123736 Apr 29 11:25 /usr/local/bin/gs
All files in the example directory show up OK.

Now I want to make also a shared object version, following the
directives in http://www.cs.wisc.edu/~ghost/doc/, "Current CVS".
 "How to build Ghostscript from source (Unix version)" / Shared Object
I added -DSVR4 to XCFLAGS, -lnsl -lsocket -lposix4 to EXTRALIBS
and set XLIBDIRS=-L/usr/openwin/lib -R/usr/openwin/lib
as it is recommended for Solaris 10
# make so
goes on for 10 minutes, then
..
make[1]: Entering directory `/home/wins/builds/src/other/ghostscript-8.62'
./obj/../soobj/echogs -w ./obj/../soobj/ldt.tr -n - gcc -L/usr/openwin/lib -
shared -Wl,-soname=libgs.so.8 -o ./bin/../sobin/libgs.so.8.62
./obj/../soobj/echogs -a ./obj/../soobj/ldt.tr -n -
s ./obj/../soobj/gsromfs1.o .
/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  -liconv -lstdc++
-lfontconfig -lnsl -lsocket -lposix4  -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
ld: warning: option -o appears more than once, first setting taken
Text relocation remains                         referenced
    against symbol                  offset      in file
<unknown>                           0x0         ./obj/../soobj/iscanbin.o
<unknown>                           0x4         ./obj/../soobj/iscanbin.o
<unknown>                           0x8         ./obj/../soobj/iscanbin.o
...
it throws out thousands of such messages for many different
./obj/../soobj/*.o  files and finally ends with
...
__ashrdi3                           0xb3f0      ./obj/../soobj/gxhintn.o
__ashrdi3                           0xb668      ./obj/../soobj/gxhintn.o
__ashrdi3                           0xb67c      ./obj/../soobj/gxhintn.o
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
make[1]: *** [bin/../sobin/libgs.so.8.62] Error 1
make[1]: Leaving directory `/home/wins/builds/src/other/ghostscript-8.62'
make: *** [so] Error 2

What's wrong and how to fix this ?

(in previous years I have compiled several versions of AFPL Ghostscript
both single executable and shared object - I now switched to GPL since
AFPL seems to have stopped development at version 8.54, GPL continues ...)
Comment 1 Hin-Tak Leung 2008-08-28 05:27:12 UTC
While bug 686865 isn't addressed properly yet, the issue is the same and I
believe the work-arounds there applies.

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