[R-SIG-Mac] Source package installation under OSX 10.4 / R 2.10.1

Rich FitzJohn fitzjohn at zoology.ubc.ca
Tue Jan 12 22:33:50 CET 2010


Hi Simon,

Thanks for the information.  You are of course right; Xcode 3.1.4  
contains gcc-4.2, and after installing that everything works fine.

Cheers,
Rich

On 12-Jan-10, at 12:52 PM, Simon Urbanek wrote:

> Rich,
>
> On Jan 12, 2010, at 13:17 , Rich FitzJohn wrote:
>
>> Hello,
>>
>> Sorry if this is the wrong place to post or if this has been  
>> addressed elsewhere.  I am running R 2.10.1 under OS X 10.5  
>> (Leopard).  After upgrading R from 2.10 to 2.10.1, I found that no  
>> source package would install, with errors like:
>>     gcc-4.2 -arch i386 -std=gnu99 -I/Library/Frameworks/ 
>> R.framework...
>>     make: gcc-4.2: Command not found
>>     make: *** [bisse-eqs.o] Error 127
>> (similar errors for any package containing C code that I tried).   
>> The Xcode that U have does not include gcc 4.2, so it is surprising  
>> to see it being selected.  I think I have the most recent Xcode  
>> available for Leopard;
>
> That's not true - gcc 4.2 is part of Xcode for quite some time on  
> 10.5 (Leopard) so your Xcode is definitely not recent. The latest  
> Leopard one is Xcode 3.1.3.
>
>
>> in any case, the only Xcode I seem to be able to get from apple  
>> needs OSX 10.6.
>>
>
> Xcode 3.1.3 for Leopard is available from http://connect.apple.com  
> (and so are all previous versions in fact).
>
>
>> I have worked around this problem by creating a ~/.R/Makevars file  
>> containing
>> CC = gcc-4.0 -arch i386 -std=gnu99
>> CFLAGS = -g -O2
>> CXX = g++-4.0 -arch i386
>> CXXCPP = g++-4.0 -arch i386 -E
>> CXXFLAGS = -g -O2
>> DYLIB_LD = gcc-4.0 -arch i386 -std=gnu99
>> F77 = gfortran-4.0 -arch i386
>> FC = gfortran-4.0 -arch i386
>> FCFLAGS = -g -O2
>> MAIN_LD = gcc-4.0 -arch i386 -std=gnu99
>> OBJC = gcc-4.0 -arch i386
>> OBJCFLAGS = -g -O2
>> OBJCXX = g++-4.0 -arch i386
>> SHLIB_CXXLD = g++-4.0 -arch i386
>> SHLIB_FCLD = gfortran-4.0 -arch i386
>> SHLIB_LD = gcc-4.0 -arch i386 -std=gnu99
>>
>> after which compilation succeeds (I had to both switch the version  
>> numbers from 4.2 to 4.0 compared with R's Makevars and drop the - 
>> mtune=core flag).
>>
>> I have a couple of questions
>> (1) Will anything terrible happen as a consequence of doing this?
>
> Maybe not. Older gcc versions have miscompield some code in the past  
> so your milage will vary, but functionally in most cases you should  
> be fine.
>
>
>> (2) Does this situation mean that package compilation is no longer  
>> supported on leopard?
>>
>
> No, you just need at least half-way recent Xcode.  I'm pretty sure  
> that at least the 3.1 series always had gcc 4.2 and that was almost  
> two years ago ...
>
> FWIW the settings are not quite intentional - usually binaries get  
> post-processed for the release (removing TeX paths, arch tuning and  
> -4.2 postfix) but somehow in 2.10.1 this step failed.
>
> Cheers,
> Simon
>
>



More information about the R-SIG-Mac mailing list