[comp.sys.sun] X11R4 build problem on sun3/os 4.0.1

chrise@beaver.cs.washington.edu (Chris Esposito) (02/15/90)

Forgive me if this has already been discussed to death, but I don't have
time to read this group as much as I would like.  I am encountering the
following problem when trying to build X11R4 on a Sun 3/260 running 4.0.1.
I have already applied fix-1 and fix-2.

1) I have GCC 1.35, so HasGcc is set to yes in config/sun.cf, and CcCmd in
   config/site.def looks like: 
   #define CcCmd gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -O

2) DefaultCCOptions in sun.cf is commented out.
    /* #define DefaultCCOptions -f68881 -O2 */

When I do a `make World >& make.world &', gcc is being passed an argument
(-sun3) it doesn't know how to handle, so it quits.  The relevant portion
of make.world follows below.

----------------------------------------------
[lots of presumably irrelevant stuff deleted]
make depend
depending in ./config...
checking .././util/makedepend/makedepend over in .././util/makedepend first...
gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -O -O   -I../../. -I../.././config     '-DINCLUDEDIR="/usr/include"'    -sun3 -c  include.c
gcc: unrecognized option `-sun3'
gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -O -O   -I../../. -I../.././config     '-DINCLUDEDIR="/usr/include"'    -sun3 -c  main.c
gcc: unrecognized option `-sun3'
gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -O -O   -I../../. -I../.././config     '-DINCLUDEDIR="/usr/include"'    -sun3 -c  parse.c
gcc: unrecognized option `-sun3'
gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -O -O   -I../../. -I../.././config     '-DINCLUDEDIR="/usr/include"'    -sun3 -c  pr.c
gcc: unrecognized option `-sun3'
gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -O -O   -I../../. -I../.././config     '-DINCLUDEDIR="/usr/include"'    -sun3 -c  cppsetup.c
gcc: unrecognized option `-sun3'
rm -f makedepend
gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -O -o makedepend include.o main.o parse.o pr.o cppsetup.o -O     
okay, continuing in ./config
.././util/makedepend/makedepend -s "# DO NOT DELETE" --  -I../.       -- imake.c
sh: 5516 Memory fault - core dumped
*** Error code 139
make: Fatal error: Command failed for target `depend'
Current working directory /home/pierce1/x11r4/mit/config
*** Error code 1
make: Fatal error: Command failed for target `depend'
Current working directory /home/pierce1/x11r4/mit
*** Error code 1
make: Fatal error: Command failed for target `World'

Since the string `sun3' appeared nowhere that I could find, I concluded
that it was a symbol that was defined by cpp, so in sun.cf and site.def I
put:

#ifndef StandardCppDefines
#define StandardCppDefines -Usun3 
#endif

but the make died as it did above.  I then discovered that tcsh defines a
environment variable named HOSTTYPE, whose value was `sun3'.  Even after
unsetting the variable, the make still died as above.  At this point, I am
out of ideas on what to try next.  Any suggestions?

Thanks,
Chris Esposito                      | CSNET: chrise@atc.boeing.com
Boeing Advanced Technology Center   | uucp: ...!uw-june!bcsaic!chrise

moraes@cs.toronto.edu (Mark Moraes) (02/16/90)

>When I do a `make World >& make.world &', gcc is being passed an argument
>(-sun3) it doesn't know how to handle, so it quits.  The relevant portion
>of make.world follows below.

	setenv TARGET_ARCH

should fix it.

Alternatively, add

TARGET_ARCH =

to your site.def and rebuild all Makefiles.