public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* I cannot compile gcc 3.x in Mac OS X
@ 2008-08-24 19:03 Da Zheng
  2008-08-24 20:38 ` Segher Boessenkool
  0 siblings, 1 reply; 3+ messages in thread
From: Da Zheng @ 2008-08-24 19:03 UTC (permalink / raw)
  To: gcc-help

Hello,

I need to install gcc 3.x in Mac OS X 10.5.
I download gcc3.3, and here are the steps I compile gcc.
I create a folder "mkdir gcc-build",
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).
compile "make bootstrap",
There I get the error like this:

mv objc/*.o stage1/objc
mv: rename objc/*.o to stage1/objc/*.o: No such file or directory
make[2]: [objc.stage1] Error 1 (ignored)
mv cc1obj stage1
mv: rename cc1obj to stage1/cc1obj: No such file or directory
make[2]: [objc.stage1] Error 1 (ignored)
echo timestamp > stage1_copy
echo stage2_build > stage_last
make CC=" stage1/xgcc -Bstage1/ 
-B/Users/dazheng/unix//i686-apple-darwin9/bin/" \
         STAGE_PREFIX=stage1/ \
         ADAC="\$(CC)" CFLAGS="-g -O2" LDFLAGS="" 
WARN_CFLAGS="\$(GCC_WARN_CFLAGS)" STRICT_WARN="-Wtraditional -pedantic 
-Wno-long-long" libdir=/Users/dazheng/unix//lib LANGUAGES="c gcov objc" 
MAKEOVERRIDES= OUTPUT_OPTION="-o \$@"
stage1/xgcc -Bstage1/ -B/Users/dazheng/unix//i686-apple-darwin9/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-//ccejHfF9.s:3013:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccejHfF9.s:3030:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccejHfF9.s:3047:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccejHfF9.s:3064:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccejHfF9.s:3081:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccejHfF9.s:3098:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccejHfF9.s:3115:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccejHfF9.s:3132:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccejHfF9.s:3149:indirect 
jmp without `*'
/var/folders/Je/JeO55QobFy8j6wwp8Pc2hk+++TI/-Tmp-//ccejHfF9.s:3166:indirect 
jmp without `*'
stage1/xgcc -Bstage1/ -B/Users/dazheng/unix//i686-apple-darwin9/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

I wonder why there is this kind of error.
How to disable all other languages?
Actually, I even tried macports to install gcc 3.3, and I get the 
similar error:

stage1/xgcc -Bstage1/ -B/opt/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
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

Can anyone tell me how to install gcc 3.x in Mac OS X 10.5?
Thank you in advance.

Zheng Da

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: I cannot compile gcc 3.x in Mac OS X
  2008-08-24 19:03 I cannot compile gcc 3.x in Mac OS X Da Zheng
@ 2008-08-24 20:38 ` Segher Boessenkool
  2008-08-25  9:40   ` Da Zheng
  0 siblings, 1 reply; 3+ messages in thread
From: Segher Boessenkool @ 2008-08-24 20:38 UTC (permalink / raw)
  To: Da Zheng; +Cc: gcc-help

> 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


Segher

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: I cannot compile gcc 3.x in Mac OS X
  2008-08-24 20:38 ` Segher Boessenkool
@ 2008-08-25  9:40   ` Da Zheng
  0 siblings, 0 replies; 3+ messages in thread
From: Da Zheng @ 2008-08-25  9:40 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: gcc-help

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-24 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-24 19:03 I cannot compile gcc 3.x in Mac OS X Da Zheng
2008-08-24 20:38 ` Segher Boessenkool
2008-08-25  9:40   ` Da Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).