jkeenan1 has asked for the wisdom of the Perl Monks concerning the following question:
I have a 2-1/2 year old iBook which I have upgraded from Mac OS X 10.3 to 10.4.8; the kernel is now Darwin 8.8.0. As best as I can determine, the C compiler that came when I installed Developer Tools was Apple's build 1495 of gcc version 3.3.
lrwxr-xr-x 1 root wheel 7 Aug 9 2004 /usr/bin/cc -> gcc-3.3 lrwxr-xr-x 1 root wheel 7 Aug 9 2004 /usr/bin/gcc -> gcc-3. +3 [bin] 524 $ gcc-3.3 -v Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs Thread model: posix gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
In April of this year, in an abortive attempt to install a Perl module that needed the GMP library, I decided to upgrade to the most recent version of gcc that would build on my box and to build that from source. After much sweat, I succeeded, in the process installing a considerable volume of software. Here's the partial output from ls -l /usr/local/bin.
-rwxr-xr-x 1 root jimk 226144 Apr 15 2006 grepjar -rwxr-xr-x 1 root jimk 197460 Apr 15 2006 fastjar -rwxr-xr-x 2 root jimk 331868 Apr 15 2006 powerpc-apple-darwin7 +.9.0-gcjh -rwxr-xr-x 2 root jimk 340676 Apr 15 2006 powerpc-apple-darwin7 +.9.0-gcj -rwxr-xr-x 4 root jimk 331168 Apr 15 2006 powerpc-apple-darwin7 +.9.0-g++ -rwxr-xr-x 4 root jimk 331168 Apr 15 2006 powerpc-apple-darwin7 +.9.0-c++ -rwxr-xr-x 2 root jimk 331868 Apr 15 2006 gcjh -rwxr-xr-x 2 root jimk 340676 Apr 15 2006 gcj -rwxr-xr-x 4 root jimk 331168 Apr 15 2006 g++ -rwxr-xr-x 4 root jimk 331168 Apr 15 2006 c++ -rwxr-xr-x 1 root jimk 233400 Apr 15 2006 jv-scan -rwxr-xr-x 1 root jimk 335736 Apr 15 2006 jcf-dump -rwxr-xr-x 1 root jimk 331868 Apr 15 2006 gjnih -rwxr-xr-x 1 root jimk 176124 Apr 15 2006 gcov -rwxr-xr-x 1 root jimk 15683 Apr 15 2006 gccbug -rwxr-xr-x 1 root jimk 330788 Apr 15 2006 cpp -rwxr-xr-x 3 root jimk 329764 Apr 15 2006 powerpc-apple-darwin7 +.9.0-gcc-4.0.3 -rwxr-xr-x 3 root jimk 329764 Apr 15 2006 powerpc-apple-darwin7 +.9.0-gcc -rwxr-xr-x 3 root jimk 329764 Apr 15 2006 gcc -rwxr-xr-x 1 root jimk 12272 Apr 15 2006 jv-convert -rwxr-xr-x 1 root jimk 11512 Apr 15 2006 gij -rwxr-xr-x 1 root jimk 12284 Apr 15 2006 grmiregistry -rwxr-xr-x 1 root jimk 12272 Apr 15 2006 grmic -rwxr-xr-x 1 root jimk 171768 Apr 15 2006 gcj-dbtool -rwxr-xr-x 1 root jimk 1022 Apr 15 2006 addr2name.awk
So now, gcc 4.0.3 appears to my system to be the default C compiler.
[jimk] 535 $ ls -l `which gcc` -rwxr-xr-x 3 root jimk 329764 Apr 15 2006 /usr/local/bin/gcc [jimk] 536 $ gcc -v Using built-in specs. Target: powerpc-apple-darwin7.9.0 Configured with: ../gcc-4.0.3/configure : (reconfigured) ../gcc-4.0.3 +/configure Thread model: posix gcc version 4.0.3
For several months, this had no particular impact on the operation of my system. In particular, several months later I was able to upgrade Perl from source. That upgrade used version 3.3 of gcc rather than the more recently installed 4.0.3.
Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=darwin, osvers=8.7.0, archname=darwin-2level uname='darwin macintosh.local 8.7.0 darwin kernel version 8.7.0: f +ri may 26 15:20:53 pdt 2006; root:xnu-792.6.76.obj~1release_ppc power + macintosh powerpc ' config_args='-de' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultipl +icity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno- +strict-aliasing -pipe -I/usr/local/include', optimize='-O3', cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precom +p -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc. build + 1495)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/local +/lib' libpth=/usr/local/lib /usr/lib libs=-ldbm -ldl -lm -lc perllibs=-ldl -lm -lc libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libp +erl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/u +sr/local/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO Built under darwin Compiled at Sep 13 2006 20:15:49 @INC: /usr/local/lib/perl5/5.8.8/darwin-2level /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl/5.8.7/darwin-2level /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl/5.8.4/darwin-2level /usr/local/lib/perl5/site_perl/5.8.4 /usr/local/lib/perl5/site_perl .
In November, however, I started to work on the Parrot project. I encountered considerable difficulties in getting Parrot to make properly. Some of these were problems with Parrot, and I got considerable help from Parrot hackers at the Chicago Perl Hackathon and on #parrot in working around these.
But I'm still having trouble getting Parrot to make. Several experienced Parrot hackers report that they have no problem building Parrot on Mac OS X and that they use the gcc version 3.3 that came with the Mac. They have advised me to revert to that version. How can I do so safely? Specifically:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Safe reversion to older version of C compiler
by chargrill (Parson) on Dec 17, 2006 at 16:47 UTC | |
by jkeenan1 (Deacon) on Dec 17, 2006 at 17:17 UTC | |
by chargrill (Parson) on Dec 17, 2006 at 17:24 UTC |