compile gcc on unixware 2.1.3 failed!

Robert Lipe robertlipe@usa.net
Sat Sep 8 15:40:00 GMT 2001


tao wrote:
> hi,When i compile gcc on unixware 2.1.3(i  need use multithread.
> ),it show me some errors as follows:

I was just about to ding you with an RTFM answer, but it looks like you
DID do the right thing and the tools did the wrong thing bechind your back.

> /home/genfep/bin/make bootstrap
[ ... ] 
> if [ -f lang-f77 ]; then \
>   cc  -DIN_GCC     -g  -DHAVE_CONFIG_H  -o g77 gcc.o g77spec.o g77version.o \
>    version.o prefix.o intl.o  obstack.o alloca.o       ../libiberty/libiberty.a; \
> else true; fi
> cc  -DIN_GCC     -g  -DHAVE_CONFIG_H  -o gen-protos \
>   gen-protos.o scan.o libcpp.a ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case "alloca.o" in ?*) echo alloca.o ;;
>  esac ` ` case "" in ?*) echo  ;; esac `  ` case "" in ?*) echo  ;; esac ` ` case "" in ?*) echo  ;; esac `
> Undefined                       first referenced
>  symbol                             in file
> alloca                              libcpp.a(cpphash.o)
> UX:ld: ERROR: gen-protos: fatal error: Symbol referencing errors. No output written to gen-protos

Somehow, either 
  A) cpphash is using alloca when it shouldn't or 
  B) this code is being built with the "wrong" compiler - /bin/cc doesn't
     have alloca bug GCC does have this as an extension that's turned on 
     by default.
  C) you configured with one compiler (gcc-ish) and built with 
     another (/bin/cc) which is, I suppose, a variation of "B".

What does the following command return on your system?

$ grep -i alloca config.cache ; grep ALLOC gcc/auto-host.h
ac_cv_func_alloca_works=${ac_cv_func_alloca_works='no'}
ac_cv_header_alloca_h=${ac_cv_header_alloca_h='no'}
#define C_ALLOCA 1
/* #undef HAVE_ALLOCA */
/* #undef HAVE_ALLOCA_H */
#define HAVE_MALLOC_H 1
#define HAVE_DECL_MALLOC 1
#define HAVE_DECL_REALLOC 1
#define HAVE_DECL_CALLOC 1


RJL



More information about the Gcc mailing list