-Q8O- Why am I getting errors on my SGI Indigo workstation?

From: -VIII- Questions on building Tcl and friends on your system

A8O. From Gordon Lack <gml4410@ggr.co.uk> we are told that
the SGI c compiler has some bugs with variable arguments.

tclVar.c must be compiled with -O0 at IRIX C 4.0.1 because of a
compiler bug with varargs.
 
   Done by placing specific rule into Makefile.
 
> # GGR SG needs -O0 for varargs at 4.0.1
>
> CC_SWITCHES0 =  -O0 -I. -I${SRC_DIR} ${AC_FLAGS} ${MATH_FLAGS} \
> ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
> -DTCL_LIBRARY=\"${TCL_LIBRARY}\"
>
> tclVar.o: tclVar.c
>         $(CC) -c $(CC_SWITCHES0) $<

Peter NEELIN <neelin@pet.mni.mcgill.ca> also noted that:

I get tclX 7.3a to compile on an SGI (irix 4.0.5) with the following
changes to the Config.mk file:
 
71c71
< CFLAGS=-cckr -D__GNU_LIBRARY__
---
> #CFLAGS=
106,107c106,107
< TCL_PLUS_BUILD=TCL_PLUS
< CCPLUS=g++
---
> #TCL_PLUS_BUILD=TCL_PLUS
> CCPLUS=CC
191,193c191
< MAN_DIR_SEPARATOR=
< 
< LIBOBJS=strftime.o
---
> #MAN_DIR_SEPARATOR=.
 
The -D__GNU_LIBRARY solves the srandom problem and I think that the -cckr gets
around the prototype error with waitpid (it's crude, but it works).
I've forgotten why I needed the strftime.
 
If you want the version of Config.mk that worked for me, send me mail.
Go Back Up

Go To Previous

Go To Next