GCC 3.4 on Mac OS X: compilable, but with problems

Bojan Antonovic bojan@antonovic.com
Tue May 11 21:24:00 GMT 2004


Hi!

1. I was able to successfully compile (bootstrap) GCC 3.4 on Mac OS X! 
Here the information:

uname -a
Darwin Bojan-Antonovics-Computer.local 7.3.0 Darwin Kernel Version 
7.3.0: Fri Mar  5 14:22:55 PST 2004; 
root:xnu/xnu-517.3.15.obj~4/RELEASE_PPC  Power Macintosh powerpc

gcc-3.4 -v
Reading specs from /usr/local/lib/gcc/powerpc-apple-darwin7.3.0/3.4.0/specs
Configured with: ./configure --enable-languages=java : (reconfigured) 
./configure --program-suffix=-3.4 --enable-languages=c,c++,java
Thread model: posix
gcc version 3.4.0

/usr/bin/gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1635) (-mlongcall)
2. multiple definitions of symbol _sqrt:
When compling GCC 3.4, at the end the following report came:
creating rmic
/bin/sh ./libtool --tag=GCJ --mode=link 
/Volumes/Leopard/gcc-3.4.0/gcc/gcj 
-B/Volumes/Leopard/gcc-3.4.0/powerpc-apple-darwin7.3.0/libjava/ 
-B/Volumes/Leopard/gcc-3.4.0/gcc/ 
-L/Volumes/Leopard/gcc-3.4.0/powerpc-apple-darwin7.3.0/libjava -g -O2  
-o rmiregistry --main=gnu.java.rmi.registry.RegistryImpl -rpath 
/usr/local/lib -shared-libgcc   
-L/Volumes/Leopard/gcc-3.4.0/powerpc-apple-darwin7.3.0/libjava/.libs 
libgcj.la
/Volumes/Leopard/gcc-3.4.0/gcc/gcj 
-B/Volumes/Leopard/gcc-3.4.0/powerpc-apple-darwin7.3.0/libjava/ 
-B/Volumes/Leopard/gcc-3.4.0/gcc/ -g -O2 -o .libs/rmiregistry 
--main=gnu.java.rmi.registry.RegistryImpl -shared-libgcc   
-L/Volumes/Leopard/gcc-3.4.0/powerpc-apple-darwin7.3.0/libjava 
-L/Volumes/Leopard/gcc-3.4.0/powerpc-apple-darwin7.3.0/libjava/.libs 
./.libs/libgcj.dylib 
-L/Volumes/Leopard/gcc-3.4.0/powerpc-apple-darwin7.3.0/libstdc++-v3/src 
-L/Volumes/Leopard/gcc-3.4.0/powerpc-apple-darwin7.3.0/libstdc++-v3/src/.libs 
-lpthread -ldl
/usr/bin/ld: warning multiple definitions of symbol _sqrt
./.libs/libgcj.dylib(libgcj.5.0.0.dylib-master.o) definition of _sqrt
/usr/lib/libpthread.dylib(sqrt970.o) definition of _sqrt
creating rmiregistry

This seems to be commonly reported.

Also compiling HelloWorld.java produced the same problem:

gcj-3.4 --main=HelloWorld -o HelloWorld HelloWorld.java
/usr/bin/ld: warning multiple definitions of symbol _sqrt
/usr/local/lib/gcc/powerpc-apple-darwin7.3.0/3.4.0/../../../libgcj.dylib(libgcj.5.0.0.dylib-master.o) 
definition of _sqrt
/usr/lib/libm.dylib(sqrt970.o) definition of _sqrt

Bytheway: Call it with

./HelloWord

worked! Great job, people !!!

4. Building GCC 3.4 by

  % mkdir objdir
  % cd objdir
  % srcdir/configure [options] [target]
did _never_ work

greetings

Bojan




More information about the Gcc mailing list