On Mar 17, 2010, at 9:38 AM, Simon Anders wrote:

> Hi Simon etc.
> 
> We've recently got a number of question from users of our packages, who, for 
> certain reasons, wanted to compile them from source on a Mac, and ran into 
> problems, namely the error message that 'gcc-4.2' was not found. I don't know 
> if the issue has already been discussed but as I've just investigated it,

It is worth checking the archives - it would give you the correct answer. It is 
simply about outdated Xcode. We require Xcode 3.1 or higher for Leopard builds 
-- see
http://r.research.att.com/tools/ 
mainly because of issues in older Xcodes. The latest Xcode for 10.5 is Xcode 
3.1.4 and is at the top of the Xcode download list in ADC (=easy to find). 
Admittedly, the Tiger build requirement  (Xcode 2.4.0+)is in the FAQ, Leopard 
(Xcode 3.1+) is not -- I'll fix that.

Thanks,
Simon




> I would like to share my findings. (Note that I'm not a Mac user myself, so I 
> am not too experienced with this.)
> 
> It seems that the current version of Xcode (3.2.1) has the GNU Compiler 
> Collection (GCC) in the version 4.2. Most users of Leopard have, however, the 
> old Xcode 3.0 installed, which ships with GCC 4.0. (The Xcode 3.2.1 package 
> presented on the Apple web site only works for Snow Leopard. There is an 
> XCode 3.2.x for Leopard as well somewhere on the web site, but it is quite 
> difficult to find.)
> 
> I've just looked over the shoulder of a Mac user who had installed the 
> pre-compiled binary from CRAN for R-2.11.0 (devel) on his Leopard machine 
> with Xcode 3.0 installed. When he tried to run 'R CMD INSTALL' on a source 
> package, he got the aformentioned error that 'gcc-4.2' was missing.
> 
> The reason that R was explicitly looking for 'gcc-4.2' was that this is what 
> the 'CC' variable was se to in Makeconf (to be precise: in 
> /Library/Framework/R.framework/Resources/i386/Makeconf )
> 
> We changed, in the Makeconf file, 'gcc-4.2' to 'gcc' in the definition of 
> 'CC', and likewise for 'g++-4.2' and 'gfortran-4.2' in the respective lines. 
> (Note that all Xcode versions seem to install a symlink from the installed 
> binary 'gcc-4.x' to 'gcc' and likewise for g++ and gfortran.) Furthermore, it 
> was necessary to remove the compiler flag '-mtune=core2' from CC_FLAGS, 
> CXX_FLAGS and FC_FLAGS, as this tuning target was not yet available in GCC 
> 4.0.
> 
> With this, building source packages worked fine.
> 
> Conclusion: The precompiled R binary for Mac would be "more compatible", 
> namely working with the typical configuration of both Leopard and Snow 
> Leopard if the Makeconf did not specify the exact GCC version and did not use 
> the 'core2' tuning flag.
> 
> Could we change this, please?
> 
> Cheers
>  Simon
> 
> 
> 
> +---
> | Dr. Simon Anders, Dipl.-Phys.
> | European Molecular Biology Laboratory (EMBL), Heidelberg
> | office phone +49-6221-387-8632
> | preferred (permanent) e-mail: sand...@fs.tum.de
> 
> 

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to