GCC 4.x fails to build
I'm trying to install a non-Apple version of GCC because a program I'm trying to install uses nested functions, and the version of GCC Apple ships has compiling nested functions disabled. The following is the output from version 4.3, but I get pretty much the same error from versions 4.2, 4.1, and 4.0. Has anyone had success compiling GCC? Do I need to do anything special? Thanks, Evan claptop:~ evan$ sudo port install gcc43 Password: ---> Fetching gcc43 ---> Attempting to fetch gcc-core-4.3-20070831.tar.bz2 from ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/4.3-20070831/ ---> Attempting to fetch gcc-fortran-4.3-20070831.tar.bz2 from ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/4.3-20070831/ ---> Attempting to fetch gcc-g++-4.3-20070831.tar.bz2 from ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/4.3-20070831/ ---> Attempting to fetch gcc-java-4.3-20070831.tar.bz2 from ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/4.3-20070831/ ---> Attempting to fetch gcc-objc-4.3-20070831.tar.bz2 from ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/4.3-20070831/ ---> Verifying checksum(s) for gcc43 ---> Extracting gcc43 ---> Configuring gcc43 ---> Building gcc43 with target bootstrap Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc43/work/build" && make bootstrap -j 8 " returned error 2 Command output: config.status: executing default commands Adding multilib support to Makefile in ../../../gcc-4.3-20070831/libgcc multidirs=x86_64 with_multisubdir= Running configure in multilib subdirs x86_64 pwd: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc43/work/build/i386-apple-darwin8.10.1/libgcc Running configure in multilib subdir x86_64 pwd: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc43/work/build/i386-apple-darwin8.10.1 mkdir x86_64 configure: creating cache ./config.cache checking for --enable-version-specific-runtime-libs... no checking for a BSD-compatible install... /usr/bin/install -c checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking build system type... i386-apple-darwin8.10.1 checking host system type... i386-apple-darwin8.10.1 checking for i386-apple-darwin8.10.1-ar... ar checking for i386-apple-darwin8.10.1-lipo... lipo checking for i386-apple-darwin8.10.1-nm... /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc43/work/build/./gcc/nm checking for i386-apple-darwin8.10.1-ranlib... ranlib -c checking for i386-apple-darwin8.10.1-strip... strip checking whether ln -s works... yes checking for i386-apple-darwin8.10.1-gcc... /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc43/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc43/work/build/./gcc/ -B/opt/local/i386-apple-darwin8.10.1/bin/ -B/opt/local/i386-apple-darwin8.10.1/lib/ -isystem /opt/local/i386-apple-darwin8.10.1/include -isystem /opt/local/i386-apple-darwin8.10.1/sys-include -m64 checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. make[2]: *** [configure-stage1-target-libgcc] Error 1 make[1]: *** [stage1-bubble] Error 2 make: *** [bootstrap] Error 2 Error: Status 1 encountered during processing.
On 02.09.2007, at 04:11, Evan Ward wrote:
Has anyone had success compiling GCC?
Definitely many had success, icluding myself. I have installed GCC 4.2 using macports:
gcc-mp-4.2 -v Using built-in specs. Target: i386-apple-darwin8.10.1 Configured with: ../gcc-4.2.1/configure --prefix=/opt/local --enable- languages=c,c++,java,objc,obj-c++,fortran --libdir=/opt/local/lib/ gcc42 --includedir=/opt/local/include/gcc42 --infodir=/opt/local/ share/info --mandir=/opt/local/share/man --with-local-prefix=/opt/ local --with-system-zlib --disable-nls --disable-multilib --program- suffix=-mp-4.2 --with-gxx-include-dir=/opt/local/include/gcc42/c++/ -- with-gmp=/opt/local --with-mpfr=/opt/local Thread model: posix gcc version 4.2.1
Maybe you can rerun the install using sudo port -dv install gcc42 Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen- Kuepper.de Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D Sex, drugs and rock-n-roll
Jochen Küpper wrote:
On 02.09.2007, at 04:11, Evan Ward wrote:
Has anyone had success compiling GCC?
Definitely many had success, icluding myself. I have installed GCC 4.2 using macports:
Yes, I also compiled this version on Mac OS X 10.4 on my MacBook.
Rainer
So did I. Eckhard.
participants (4)
-
Eckhard Wiemann
-
Evan Ward
-
Jochen Küpper
-
Rainer Müller