On this platform, "make" builds gs fine, but "make so" fails with the following bizarre messages: "make" builds gs fine; but a subsequent "make so" fails with the following bizarre messages: ./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 - -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= \ /bin/sh <./obj/../soobj/ldt.tr ld: warning: option -o appears more than once, first setting taken ld: fatal: file libgs.so.8: open failed: No such file or directory ld: fatal: File processing errors. No output written to ./bin/../sobin/libgs.so.8.0 collect2: ld returned 1 exit status gnumake[1]: *** [bin/../sobin/libgs.so.8.0] Error 1 gnumake[1]: Leaving directory `/cis/opt/src/tex/src/ghostscript-8.00' gnumake: *** [so] Error 2 I get this using the Makefile produced by the configure script; I've also tried adding XLDFLAGS=-R /opt/SUNWspro/lib:/usr/openwin/lib:/usr/local/tex/lib EXTRALIBS=-lnsl -lsocket -lposix4 with the same result.
*** Bug 686849 has been marked as a duplicate of this bug. ***
This bug was first reported in May. Since then nothing has happened except that ghostscript-8.11 has been released and it has the same problem. Hello out there! Is anybody listening? I suppose with almost 700000 bugs you've got enough to do, but really, don't you think you could at least attempt to confirm the bug or will it remain NEW forever?
Sorry for not responding. We don't support the 'so' target on SunOS; I've just left this open to record that fact until someone sends us a patch or we get around to fixing it. Contributions welcome. :)
The fix seems to be to change line 77 of src/unix-dll.mak from SODEFS=LDFLAGS='$(LDFLAGS) $(CFLAGS_SO) -shared -Wl,-soname,$(GS_SONAME_MAJOR)'\ to SODEFS=LDFLAGS='$(LDFLAGS) $(CFLAGS_SO) -shared -Wl,-soname=$(GS_SONAME_MAJOR)'\
Thanks for the fix. It looks like this is a typo and -soname= is the proper syntax for GNU ld; the solaris linker seems to just ignore the option. I've committed. Is that the only issue you have? I'm still getting: make: Fatal error: Don't know how to make target `bin/../sobin/gsc'
Created attachment 469 [details] patch (hack) for unix-dll.mak I don't recommend applying this patch to CVS, but along with the following diff, you should be able to "make bin/libgs.so" on Solaris
Created attachment 470 [details] changes made to ./configure generated Makefile
What shells are other people trying to build this using? I was initially using standard sh, but our sysadmin recently installed bash for me and a number of the problems I was having have disappeared.
Created attachment 472 [details] changes made to ./configure-generated Makefile added optimization flag back in
Created attachment 473 [details] improved patch for unix-dll.mak This patch allows a proper "make so", but I stubbed out gsc and gsx executable builds. Maybe add a separate "make so-all" for those?
Ok, I just did a "make soclean" followed by a "make so" for 8.0.0 and everything was compiled properly into sobin. Could somebody who knows autoconf/configure could take a look at the differences in the generated Makefile and get those in (for 8.14)?. The definition of platform-specific flags in unix-dll.mak is bad, so maybe that should be moved into the generated Makefile (in some sort of LDFLAGS_SO field), but that still leaves GS_SONAME_MAJOR and friends. Anyway, successful build with cc using: Machine hardware: sun4u OS version: 5.7 Processor type: sparc Hardware: SUNW,Ultra-5_10 Sun Visual WorkShop C++ 5.0 GNU bash, version 2.05.0(1)-release (sparc-sun-solaris2.7)
It seems reasonable to always build gsc to me. Likewise with gsx provided we check at configure time for gtk. Do you have a particular objection? Re shells, the makefiles are supposed to use vanilla shell, but we all use bash so it's easy for "bashisms" to creep in. If do do encounter a problem with a non-bash sh, please file a bug for it. (certainly if we did require bash we could simplify a lot of the code!)
Adam: yes, a proper change would set the SO_LDFLAGS (and whatever else needed doing) from the configure script through Makefile.in. So do Bob T.'s fix with the slightly different -soname syntax not work for you? I'm just curious about the difference.
I have no opposition to gsc or gsx; at the end of the day I could get it compiling without them (and we don't use them), so I did. I'm not sure "make so" respects the "exists(gtk)" logic you describe. I'll see about performing the build in sh and identifying problems that do not exist for bash. IIRC, my sh build was having trouble identifying build rules for targets like "./bin/../sobin/gsc". The -soname syntax fix was exactly that; it fixed syntax, but not content. http://developers.sun.com/tools/cc/documentation/s1s7cc_documentation/man1/CC.1. html does not list -soname as a valid switch; instead -Bdynamic serves that purpose. The other changes I made to unix-dll.mak were similar. I just looked up the meaning of the gcc switch and then pored over the cc manual and Googled for the corresponding parameter.
Whoops, I meant -h serves for -soname. The -Bdynamic replaces -shared.
With no additional changes to the Makefile or unix-dll.mak, the same "make so" that works for bash generates the following for sh: make LDFLAGS=' -KPIC -Bdynamic -G -hlibgs.so.8' GS_XE=./bin/../sobin/libgs.so.8.0 STDIO_IMPLEMENTATION=c DISPLAY_DEV=./obj/../so obj/display.dev BINDIR=./bin/../sobin GLGENDIR=./obj/../soobj GLOBJDIR=./obj/../soobj PSGENDIR=./obj/../soobj PSOBJDIR=./obj/../ soobj CFLAGS='-xO2 -KPIC -DGX_COLOR_INDEX_TYPE="unsigned long long" ' prefix=/usr/local ./bin/../sobin/libgs.so make: Fatal error: Don't know how to make target `bin/../sobin/libgs.so' Current working directory /engine_space/aheinz/gs-8.00 *** Error code 1 make: Fatal error: Command failed for target `so'
*** Bug 688684 has been marked as a duplicate of this bug. ***
*** Bug 688785 has been marked as a duplicate of this bug. ***
*** Bug 689872 has been marked as a duplicate of this bug. ***
*** Bug 689758 has been marked as a duplicate of this bug. ***
bug noted in Bug ID 689758 is still not resolved in the latest 8.63 version, and the changes noted in this bug do not fix the problem (because they are already implemented) Last working Shared object version of ghostscript on solaris is 8.57 (available via sourceforge.net)
Grabbing a Ralph's bugs.
Rev. 11984 uses correct -fPIC option when Ghostscript is compiled by gcc on Solaris. The rest seems to work just fine in the current development version. Configuration and build process has been tested for all combinations of gcc 3.4.3 vs. Sun Studio 12.2, bash vs. sh, default, debug, and so targets. $ uname -a SunOS opensolaris 5.11 snv_111b i86pc i386 i86pc Solaris Most likely, all build problems in Solaris are fixed now. If not, feel free to re-open this bug report or file a new one.
Downloaded and compiled without a hitch on a OpenSolaris/OpenIndiana box. I downloaded the 9.0.0 pdl, ran autogen.sh, configure --prefix ... had to modify the Makefile manually to change to -fPIC ... with that tweak "gmake so" compiled fine on a Solaris 10 u5 box (still had to tweak the compile LDFLAGS to add -R$(libdir), but that's a different issue). cheers for your help. Jon