Operating System - HP-UX
1822350 Members
4769 Online
109642 Solutions
New Discussion юеВ

Link error building ghostscript 8.62 shared library

 
Main Group
Advisor

Link error building ghostscript 8.62 shared library

Has anybody had success trying to build the ghostscript 8.62 shared library for use with gsview? During a 'make so' (using HP's C/aC++ C.11.23.14 and gmake 3.81) I get the following error message:

ld: Unrecognized argument: -soname=libgs.so.8

This argument is somehow generated by the make process; it doesn't seem to be something I can manually alter.

We need to have this built from the source, rather than using the download site. I was able to build the standard ghostscript binary without a problem. Any suggestions would be appreciated. Thank you!

--Bob
5 REPLIES 5
Dennis Handly
Acclaimed Contributor

Re: Link error building ghostscript 8.62 shared library

>ld: Unrecognized argument: -soname=libgs.so.8
>This argument is somehow generated by the make process; it doesn't seem to be something I can manually alter.

You don't see this in the makefile?
Basically -soname=libgs.so.8 seems to be the same as ld's "+h libgs.so.8".
Main Group
Advisor

Re: Link error building ghostscript 8.62 shared library

It seems to be auto-generating the compile commands on the fly. If I attempt to fix it, the file just gets overwritten.

----
root ghostscript-8.62$ make so
make LDFLAGS=' -shared -Wl,-soname=libgs.so.8' GS_XE=./bin/../sobin/libgs.so.8.62 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='-O -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long long" ' prefix=/opt/ghostscript ./bin/../sobin/gsc ./bin/../sobin/gsx
make[1]: Entering directory `/root/ghostscript-8.62'
./obj/../soobj/echogs -w ./obj/../soobj/ldt.tr -n - cc -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 -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
cc: warning 901: unknown option: `-hared': use +help for online documentation.
ld: Unrecognized argument: -soname
Fatal error.
make[1]: *** [bin/../sobin/libgs.so.8.62] Error 1
make[1]: Leaving directory `/root/ghostscript-8.62'
make: *** [so] Error 2
----

The resulting ldt.tr file looks like this:

----
cc -shared -Wl,-soname=libgs.so.8 -o ./bin/../sobin/libgs.so.8.62 ./obj/../soobj
/gsromfs1.o ./obj/../soobj/gs.o ./obj/../soobj/gp_getnv.o \
./obj/../soobj/gp_unix.o \
./obj/../soobj/gp_unifs.o \
&etc.
----
Main Group
Advisor

Re: Link error building ghostscript 8.62 shared library

P.S. I do not find a libgs in any of the Makefiles in the ghostscript-8.62 tree.
Dennis Handly
Acclaimed Contributor

Re: Link error building ghostscript 8.62 shared library

>It seems to be auto-generating the compile commands on the fly.

Is there a configure script that you can tell you are using HP-UX?
Otherwise you'll need to edit ldt.tr.
Main Group
Advisor

Re: Link error building ghostscript 8.62 shared library

>>It seems to be auto-generating the compile commands on the fly.

>Is there a configure script that you can tell you are using HP-UX?
>Otherwise you'll need to edit ldt.tr.

Alas I already tried that. Unfortunately it is generating ldt.tr during the make, so it overwrites my changes.

My understanding is that running the ghostscript configure script is supposed to establish the system requirements, as seems to be usual for open source. The only system dependency I can set (per ./configure --help) is the printer drivers.