gcc 3.3 fails to build: "cannot exec `cc1'"
The gcc33 port fails to build on my machine: bembo:~$ sudo port install gcc33 ---> Configuring gcc33 Error: Target com.apple.configure returned: configure failure: shell command "cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc33/work/build" && CC=/usr/bin/gcc-3.3 /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc33/work/gcc-3.3.6/configure --prefix=/opt/local --enable-languages=c,c++,f77,objc --libdir=/opt/local/lib/gcc-3.3 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-dp-3.3 --with-gxx-include-dir=/opt/local/include/gcc-3.3/c++/" returned error 1 Command output: Configuring for a i686-apple-darwin8.8.3 host. Created "Makefile" in /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc33/work/build gcc-3.3: installation problem, cannot exec `cc1': No such file or directory *** The command '/usr/bin/gcc-3.3 -o conftest -g conftest.c' failed. *** You must set the environment variable CC to a working compiler. It seems to be attempting to compile gcc33 using gcc33, which doesn't seem to be properly installed. It's my understanding that XCode 2.4.1 on Intel does not provide a working gcc < 4.0; I get the same "cannot exec `cc1'" with a simple test.c: bembo:tmp$ gcc_select Current default compiler: gcc version 4.0.1 (Apple Computer, Inc. build 5367) bembo:tmp$ cat test.c #include "stdio.h" int main(){ printf("Hello world\n"); return 0; } bembo:tmp$ gcc -o test test.c bembo:tmp$ ./test Hello world bembo:tmp$ sudo gcc_select 3.3 Default compiler has been set to: gcc version 3.3 20030304 (Apple Computer, Inc. build 1819) bembo:tmp$ gcc -o test test.c gcc: installation problem, cannot exec `cc1': No such file or directory I need access to 3.3 to build and test a generic (but old) scientific simulation code, which is why I'm trying to install it using MacPorts. I would welcome any advice. Should XCode 2.4.1 on Intel be able to provide me with a working gcc < 4.0? Failing that, how can I build gcc 3.3 using MacPorts without gcc 3.3? Thanks, -- Mike Williams University of Oxford
don't the developer tools include gcc40 and gcc33? On Feb 14, 2007, at 11:25 PM, Michael Williams wrote:
The gcc33 port fails to build on my machine:
bembo:~$ sudo port install gcc33 ---> Configuring gcc33 Error: Target com.apple.configure returned: configure failure: shell command "cd "/opt/local/var/db/dports/build/ _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ dports_lang_gcc33/work/build" && CC=/usr/bin/gcc-3.3 /opt/local/var/ db/dports/build/ _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ dports_lang_gcc33/work/gcc-3.3.6/configure --prefix=/opt/local -- enable-languages=c,c++,f77,objc --libdir=/opt/local/lib/gcc-3.3 -- infodir=/opt/local/share/info --mandir=/opt/local/share/man --with- local-prefix=/opt/local --with-system-zlib --disable-nls --program- suffix=-dp-3.3 --with-gxx-include-dir=/opt/local/include/gcc-3.3/c+ +/" returned error 1 Command output: Configuring for a i686-apple-darwin8.8.3 host. Created "Makefile" in /opt/local/var/db/dports/build/ _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ dports_lang_gcc33/work/build gcc-3.3: installation problem, cannot exec `cc1': No such file or directory *** The command '/usr/bin/gcc-3.3 -o conftest -g conftest.c' failed. *** You must set the environment variable CC to a working compiler.
It seems to be attempting to compile gcc33 using gcc33, which doesn't seem to be properly installed. It's my understanding that XCode 2.4.1 on Intel does not provide a working gcc < 4.0; I get the same "cannot exec `cc1'" with a simple test.c:
bembo:tmp$ gcc_select Current default compiler: gcc version 4.0.1 (Apple Computer, Inc. build 5367) bembo:tmp$ cat test.c #include "stdio.h"
int main(){ printf("Hello world\n"); return 0; } bembo:tmp$ gcc -o test test.c bembo:tmp$ ./test Hello world bembo:tmp$ sudo gcc_select 3.3 Default compiler has been set to: gcc version 3.3 20030304 (Apple Computer, Inc. build 1819) bembo:tmp$ gcc -o test test.c gcc: installation problem, cannot exec `cc1': No such file or directory
I need access to 3.3 to build and test a generic (but old) scientific simulation code, which is why I'm trying to install it using MacPorts. I would welcome any advice. Should XCode 2.4.1 on Intel be able to provide me with a working gcc < 4.0? Failing that, how can I build gcc 3.3 using MacPorts without gcc 3.3?
Thanks, -- Mike Williams University of Oxford _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
/me withdraws that last mail (sorry) On Feb 14, 2007, at 11:25 PM, Michael Williams wrote:
The gcc33 port fails to build on my machine:
bembo:~$ sudo port install gcc33 ---> Configuring gcc33 Error: Target com.apple.configure returned: configure failure: shell command "cd "/opt/local/var/db/dports/build/ _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ dports_lang_gcc33/work/build" && CC=/usr/bin/gcc-3.3 /opt/local/var/ db/dports/build/ _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ dports_lang_gcc33/work/gcc-3.3.6/configure --prefix=/opt/local -- enable-languages=c,c++,f77,objc --libdir=/opt/local/lib/gcc-3.3 -- infodir=/opt/local/share/info --mandir=/opt/local/share/man --with- local-prefix=/opt/local --with-system-zlib --disable-nls --program- suffix=-dp-3.3 --with-gxx-include-dir=/opt/local/include/gcc-3.3/c+ +/" returned error 1 Command output: Configuring for a i686-apple-darwin8.8.3 host. Created "Makefile" in /opt/local/var/db/dports/build/ _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ dports_lang_gcc33/work/build gcc-3.3: installation problem, cannot exec `cc1': No such file or directory *** The command '/usr/bin/gcc-3.3 -o conftest -g conftest.c' failed. *** You must set the environment variable CC to a working compiler.
It seems to be attempting to compile gcc33 using gcc33, which doesn't seem to be properly installed. It's my understanding that XCode 2.4.1 on Intel does not provide a working gcc < 4.0; I get the same "cannot exec `cc1'" with a simple test.c:
bembo:tmp$ gcc_select Current default compiler: gcc version 4.0.1 (Apple Computer, Inc. build 5367) bembo:tmp$ cat test.c #include "stdio.h"
int main(){ printf("Hello world\n"); return 0; } bembo:tmp$ gcc -o test test.c bembo:tmp$ ./test Hello world bembo:tmp$ sudo gcc_select 3.3 Default compiler has been set to: gcc version 3.3 20030304 (Apple Computer, Inc. build 1819) bembo:tmp$ gcc -o test test.c gcc: installation problem, cannot exec `cc1': No such file or directory
I need access to 3.3 to build and test a generic (but old) scientific simulation code, which is why I'm trying to install it using MacPorts. I would welcome any advice. Should XCode 2.4.1 on Intel be able to provide me with a working gcc < 4.0? Failing that, how can I build gcc 3.3 using MacPorts without gcc 3.3?
Thanks, -- Mike Williams University of Oxford _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
$which gcc-4.0 /usr/bin/gcc-4.0 $which gcc-3.3 /usr/bin/gcc-3.3 $ $gcc-3.3 --version | grep build gcc-3.3 (GCC) 3.3 20030304 (Apple Computer, Inc. build 1819) $gcc-4.0 --version | grep build powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367) $ $gcc-3.3 -o test1 test.c $ $gcc-4.0 -o test2 test.c $ $ls -Al | grep test -rw-r--r-- 1 pipping pipping 76 Feb 14 23:35 test.c -rwxr-x--- 1 pipping pipping 9848 Feb 15 00:00 test1 -rwxr-x--- 1 pipping pipping 14212 Feb 15 00:00 test2 $ $cat test.c #include "stdio.h" int main(){ printf("Hello world\n"); return 0; $ $./test1 Hello world $./test2 Hello world $ works just fine for me. On Feb 14, 2007, at 11:25 PM, Michael Williams wrote:
The gcc33 port fails to build on my machine:
bembo:~$ sudo port install gcc33 ---> Configuring gcc33 Error: Target com.apple.configure returned: configure failure: shell command "cd "/opt/local/var/db/dports/build/ _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ dports_lang_gcc33/work/build" && CC=/usr/bin/gcc-3.3 /opt/local/var/ db/dports/build/ _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ dports_lang_gcc33/work/gcc-3.3.6/configure --prefix=/opt/local -- enable-languages=c,c++,f77,objc --libdir=/opt/local/lib/gcc-3.3 -- infodir=/opt/local/share/info --mandir=/opt/local/share/man --with- local-prefix=/opt/local --with-system-zlib --disable-nls --program- suffix=-dp-3.3 --with-gxx-include-dir=/opt/local/include/gcc-3.3/c+ +/" returned error 1 Command output: Configuring for a i686-apple-darwin8.8.3 host. Created "Makefile" in /opt/local/var/db/dports/build/ _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ dports_lang_gcc33/work/build gcc-3.3: installation problem, cannot exec `cc1': No such file or directory *** The command '/usr/bin/gcc-3.3 -o conftest -g conftest.c' failed. *** You must set the environment variable CC to a working compiler.
It seems to be attempting to compile gcc33 using gcc33, which doesn't seem to be properly installed. It's my understanding that XCode 2.4.1 on Intel does not provide a working gcc < 4.0; I get the same "cannot exec `cc1'" with a simple test.c:
bembo:tmp$ gcc_select Current default compiler: gcc version 4.0.1 (Apple Computer, Inc. build 5367) bembo:tmp$ cat test.c #include "stdio.h"
int main(){ printf("Hello world\n"); return 0; } bembo:tmp$ gcc -o test test.c bembo:tmp$ ./test Hello world bembo:tmp$ sudo gcc_select 3.3 Default compiler has been set to: gcc version 3.3 20030304 (Apple Computer, Inc. build 1819) bembo:tmp$ gcc -o test test.c gcc: installation problem, cannot exec `cc1': No such file or directory
I need access to 3.3 to build and test a generic (but old) scientific simulation code, which is why I'm trying to install it using MacPorts. I would welcome any advice. Should XCode 2.4.1 on Intel be able to provide me with a working gcc < 4.0? Failing that, how can I build gcc 3.3 using MacPorts without gcc 3.3?
Thanks, -- Mike Williams University of Oxford _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Hi Michael, On Feb 14, 2007, at 5:25 PM, Michael Williams wrote:
The gcc33 port fails to build on my machine:
<snip>
I need access to 3.3 to build and test a generic (but old) scientific simulation code, which is why I'm trying to install it using MacPorts. I would welcome any advice. Should XCode 2.4.1 on Intel be able to provide me with a working gcc < 4.0? Failing that, how can I build gcc 3.3 using MacPorts without gcc 3.3?
There is no supported way to do this, and the gcc33 port should fail with a more informative error if you try to do this on an Intel mac. The problem is not really macports, but that 1) Building an earlier compiler with a later one is not a supported configuration with gcc (so problems reported to them will not be treated as bugs), and 2) When the gcc3.3 series was developed there were no OS X/intel machines to test it on, and no one has invested the substantial effort to backport gcc3.3 to OS X/intel. Xcode on OS X/intel provides only gcc 4.0 (or later) for compiling native binaries. It does ship with a "gcc33" but that is a cross compiler for generating ppc binaries only. The best use of your time is probably to update your code to compile under the gcc 4.0.x compiler that comes with your installed Xcode. Best Wishes, Greg
Thanks, -- Mike Williams University of Oxford _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
On Wed, Feb 14, 2007 at 11:42:00PM -0500, Gregory Wright wrote:
There is no supported way to do this, and the gcc33 port should fail with a more informative error if you try to do this on an Intel mac. The problem is not really macports, but that
1) Building an earlier compiler with a later one is not a supported configuration with gcc (so problems reported to them will not be treated as bugs), and
2) When the gcc3.3 series was developed there were no OS X/intel machines to test it on, and no one has invested the substantial effort to backport gcc3.3 to OS X/intel.
Xcode on OS X/intel provides only gcc 4.0 (or later) for compiling native binaries. It does ship with a "gcc33" but that is a cross compiler for generating ppc binaries only.
Thanks. So I can build using gcc-3.3 with, e.g. "gcc-3.3 -o test test.c -arch ppc", and "./test" will run under Rosetta. As you say, this is far from optimal, and the best use of my time is probably to bite the bullet and migrate to 4.0. However, I may have a play with a vanilla gcc-3.3.tar.gz and see if I can get it to build. Since all I need is something that can build POSIX code (I don't need any of the fancy Darwin ABI stuff), this _should_ be possible. Thanks for your help, -- Mike
participants (3)
-
Elias Pipping
-
Gregory Wright
-
Michael Williams