I cannot compile gcc 3.x in Mac OS X

Da Zheng zhengda1936@gmail.com
Mon Aug 25 09:40:00 GMT 2008


Segher Boessenkool wrote:
>> configure it "../gcc-3.3/configure --prefix=/Users/dazheng/unix/ 
>> --target=i686-apple-darwin9 --enable-languages=objc" (actually I only 
>> want  the C compiler, but I don't know how to disable all other 
>> language, so I only enable objc).
>
> --enable-languages=c

Thank you, Segher.

I tried again, only building C compiler of GCC.
But I still get the same error:

mv *.o insn-flags.h insn-config.h insn-codes.h insn-output.c 
insn-recog.c insn-emit.c insn-extract.c insn-peep.c insn-attr.h 
insn-attrtab.c insn-opinit.c insn-constants.h tm-preds.h tree-check.h 
insn-conditions.c s-flags s-config s-codes s-mlib s-genrtl s-gtype 
gtyp-gen.h s-output s-recog s-emit s-extract s-peep s-check s-conditions 
s-attr s-attrtab s-opinit s-preds s-constants s-crt0 genemit genoutput 
genrecog genextract genflags gencodes genconfig genpeep genattrtab 
genattr genopinit gengenrtl gencheck genpreds genconstants gengtype 
genconditions genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c xgcc cpp 
cc1  crt2.o  gcc-cross cc1obj protoize unprotoize specs collect2 
collect2 gcov *.[0-9][0-9].* *.[si] libcpp.a libbackend.a libgcc.mk  stage1
mv: rename s-crt0 to stage1/s-crt0: No such file or directory
mv: crt2.o: No such file or directory
mv: rename gcc-cross to stage1/gcc-cross: No such file or directory
mv: rename cc1obj to stage1/cc1obj: No such file or directory
mv: rename protoize to stage1/protoize: No such file or directory
mv: rename unprotoize to stage1/unprotoize: No such file or directory
mv: collect2: No such file or directory
mv: rename gcov to stage1/gcov: No such file or directory
mv: rename *.[0-9][0-9].* to stage1/*.[0-9][0-9].*: No such file or 
directory
mv: rename *.[si] to stage1/*.[si]: No such file or directory
make[2]: [stage1-start] Error 1 (ignored)
mv intl/*.o stage1/intl
if [ -f as ] ; then (cd stage1 && ln -s ../as .) ; else true ; fi
if [ -f ld ] ; then (cd stage1 && ln -s ../ld .) ; else true ; fi
if [ -f collect-ld ] ; then (cd stage1 && ln -s ../collect-ld .) ; else 
true ; fi
rm -f stage1/libgcc.a stage1/libgcc_eh.a
cp libgcc.a stage1
if [ -f ` if [ -f 
/Users/dazheng/Desktop/gcc-build/gcc/../binutils/ranlib ] ; then echo 
/Users/dazheng/Desktop/gcc-build/gcc/../binutils/ranlib ; else if [ 
"i686-apple-darwin9.4.0" = "i686-apple-darwin9.4.0" ] ; then echo 
ranlib; else t='s,^,i686-apple-darwin9.4.0-,'; echo ranlib | sed -e $t ; 
fi; fi` ] || ( [ "i686-apple-darwin9.4.0" = "i686-apple-darwin9.4.0" ] 
&& [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ) ; then \
      ` if [ -f /Users/dazheng/Desktop/gcc-build/gcc/../binutils/ranlib 
] ; then echo /Users/dazheng/Desktop/gcc-build/gcc/../binutils/ranlib ; 
else if [ "i686-apple-darwin9.4.0" = "i686-apple-darwin9.4.0" ] ; then 
echo ranlib; else t='s,^,i686-apple-darwin9.4.0-,'; echo ranlib | sed -e 
$t ; fi; fi` stage1/libgcc.a; \
    else true; fi
if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage1; \
      if [ -f ` if [ -f 
/Users/dazheng/Desktop/gcc-build/gcc/../binutils/ranlib ] ; then echo 
/Users/dazheng/Desktop/gcc-build/gcc/../binutils/ranlib ; else if [ 
"i686-apple-darwin9.4.0" = "i686-apple-darwin9.4.0" ] ; then echo 
ranlib; else t='s,^,i686-apple-darwin9.4.0-,'; echo ranlib | sed -e $t ; 
fi; fi` ] || ( [ "i686-apple-darwin9.4.0" = "i686-apple-darwin9.4.0" ] 
&& [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ) ; then \
       ` if [ -f /Users/dazheng/Desktop/gcc-build/gcc/../binutils/ranlib 
] ; then echo /Users/dazheng/Desktop/gcc-build/gcc/../binutils/ranlib ; 
else if [ "i686-apple-darwin9.4.0" = "i686-apple-darwin9.4.0" ] ; then 
echo ranlib; else t='s,^,i686-apple-darwin9.4.0-,'; echo ranlib | sed -e 
$t ; fi; fi` stage1/libgcc_eh.a; \
      else true; fi; fi
for f in .. ; do if [ x${f} != x.. ]; then \
      cp stage1/${f} . ; \
    else true; \
    fi; done
echo timestamp > stage1_copy
echo stage2_build > stage_last
make CC=" stage1/xgcc -Bstage1/ -B/usr/local/i686-apple-darwin9.4.0/bin/" \
         STAGE_PREFIX=stage1/ \
         ADAC="\$(CC)" CFLAGS="-g -O2" LDFLAGS="" 
WARN_CFLAGS="\$(GCC_WARN_CFLAGS)" STRICT_WARN="-Wtraditional -pedantic 
-Wno-long-long" libdir=/usr/local/lib LANGUAGES="c gcov " MAKEOVERRIDES= 
OUTPUT_OPTION="-o \$@"
stage1/xgcc -Bstage1/ -B/usr/local/i686-apple-darwin9.4.0/bin/ -c   -g 
-O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long   
-DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I. -I../../gcc-3.3/gcc 
-I../../gcc-3.3/gcc/. -I../../gcc-3.3/gcc/config 
-I../../gcc-3.3/gcc/../include ../../gcc-3.3/gcc/gengenrtl.c -o gengenrtl.o
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccknWwcJ.s:3013:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccknWwcJ.s:3030:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccknWwcJ.s:3047:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccknWwcJ.s:3064:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccknWwcJ.s:3081:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccknWwcJ.s:3098:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccknWwcJ.s:3115:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccknWwcJ.s:3132:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccknWwcJ.s:3149:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccknWwcJ.s:3166:indirect 
jmp without `*'
stage1/xgcc -Bstage1/ -B/usr/local/i686-apple-darwin9.4.0/bin/   -g -O2 
-DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long   
-DHAVE_CONFIG_H -DGENERATOR_FILE  -o gengenrtl \
     gengenrtl.o ../libiberty/libiberty.a
xgcc: installation problem, cannot exec `c++filt3': No such file or 
directory
Undefined symbols:
  "__init_keymgr", referenced from:
      ___darwin_gcc3_preregister_frame_info in crt2.o
ld: symbol(s) not found for inferred architecture i386
collect2: ld returned 1 exit status
make[2]: *** [gengenrtl] Error 1
make[1]: *** [stage2_build] Error 2
make: *** [bootstrap] Error 2

Does anyone know what the problem is? or does anyone have the experience 
of building gcc 3.x in Leopard?
Please help me! Thank you!

Zheng Da



More information about the Gcc-help mailing list