When compile gcc a get error 'Undefined symbol: .vec_gc_o_reserve'

Kai Ruottu karuottu@mbnet.fi
Thu Apr 19 11:39:00 GMT 2007


PETER IVARSSON wrote :
> When I try to compile the gcc package I get an error below.
> I am using the cc complier on AIX 5.3.
>   
 What is this 'cc'?  Is it a prebuilt GCC ?
> cc   -g  -DIN_GCC     -DHAVE_CONFIG_H  -o jvgenmain java/jvgenmain.o
> java/mangle_name.o errors.o intl.o ../libcpp/libcpp.a ./../intl/libintl.a -liconv
> ../libiberty/libiberty.a
> ld: 0711-317 ERROR: Undefined symbol: .vec_gc_o_reserve
> ld: 0711-317 ERROR: Undefined symbol: .vec_heap_p_reserve
> ld: 0711-317 ERROR: Undefined symbol: .vec_gc_p_reserve
>   
 Most probably your 'cc' MUST be GCC when producing the Java compiler!

 The previous may sound being a 'Catch 22' but it isn't!  What I mean is :

1. produce only a C compiler via '--enable-languages=c' in configure
2. install the C compiler. Now you have GCC !
3. produce GCC once again,  now for C++,  Java etc. using the step 1 GCC
   to "compile itself"

If the 'cc' really is a GCC, then this simple guess isn't right and 
there is some other problem...

The 'gcc/vec.c' has functions like these, whether AIX uses a dot as a 
prefix in the
symbol name is not known by me.... Does your '$build/gcc' now have a 
'vec.o'?
And it having something like here (with the dots) :

Dell:/data1/home/src/gcc-4.1.2/build/gcc # nm vec.o
         U fancy_abort
         U ggc_realloc_stat
00000014 T vec_gc_o_reserve
00000000 T vec_gc_p_reserve
000000d5 T vec_heap_o_reserve
000000c1 T vec_heap_p_reserve
         U xrealloc

(for some other target build)...  I tried to track whether the 'vec.o' 
should be linked in
'jvgenmain' but that was too hard :-(  You can easily see that in your 
build logfile, the
one you will get if writing :

  CFLAGS="-g -v" make > LogFile 2>&1

and then seeing if 'vec.o' was tried to be linked in 'jvgenmain'....  
Your error msgs are
not very informative when not telling WHAT in the listed (to be linked 
in) stuff would
need those undefined symbols....





More information about the Gcc-help mailing list