I get this when I build gs 8.53 on Solaris 9: cc -DHAVE_MKSTEMP -DHAVE_HYPOT -O -KPIC -I/usr/local/include -DSYS_TYPES_HAS_STDINT_TYPES -DGX_COLOR_INDEX_TYPE="unsigned long long" -I./src -I./obj/../soobj -I./obj/../soobj -I./src -o ./obj/../soobj/iccinit0.o -c ./src/iccinit0.c ./obj/../soobj/echogs -w ./obj/../soobj/ldt.tr -n - cc -L/usr/local/lib -R/usr/local/lib -KPIC -shared -Wl,-soname=libgs.so.8 -o ./bin/../sobin/libgs.so.8.53 ./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 - -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 ld: fatal: option -h and building a dynamic executable are incompatible ld: fatal: Flags processing errors make[1]: *** [bin/../sobin/libgs.so.8.53] Error 1 Here is my build environment: PATH="/opt/SUNWspro/bin:${PATH}" \ CC="cc" CXX="CC" CPPFLAGS="-I/usr/local/include" \ LD="/usr/ccs/bin/ld" \ LDFLAGS="-L/usr/local/lib -R/usr/local/lib" \ export PATH CC CXX CPPFLAGS LD LDFLAGS ./configure --prefix=/usr/local --disable-nls --without-jbig2dec mv Makefile Makefile.wrong sed -e 's/-fPIC/-KPIC/g' Makefile.wrong > Makefile (It also incorrectly uses fPIC instead of KPIC, which I've fixed above.
We don't really support the 'make so' target; it assumes it's talking to GNU ld and you must modify the flags manually to build on solaris. Patches to make this work based on an autoconf substitution are welcome. *** This bug has been marked as a duplicate of 686865 ***