Bug 688684 - Sun ld is given wrong parameters
Summary: Sun ld is given wrong parameters
Status: RESOLVED DUPLICATE of bug 686865
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: 8.53
Hardware: Sun Solaris
: P4 critical
Assignee: Ralph Giles
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-28 15:50 UTC by Leo Zhadanovsky
Modified: 2007-12-13 12:55 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 Leo Zhadanovsky 2006-04-28 15:50:35 UTC
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.
Comment 1 Ralph Giles 2006-05-01 15:03:19 UTC
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 ***