[R-SIG-Mac] Change Rscript to 64-bit

Simon Urbanek simon.urbanek at r-project.org
Sat Feb 23 16:06:40 CET 2013


On Feb 23, 2013, at 9:22 AM, Alton Ing wrote:

> Thanks Simon
> 
> Does this mean the next stable version (R 2.15.3) from
> http://cran.r-project.org/bin/macosx/ will have 64-bit support for
> Mountain Lion (10.8)?
> 

Yes (the current release has 64-bit support it just doesn't switch the default from 32-bit to 64-bit on ML)


> Also, with R 2.15.3 (nightly build) from http://r.research.att.com/,
> can I uninstall it using the same instructions as:
> http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#How-can-R-for-Mac-OS-X-be-uninstalled_003f
> 
> The reason I ask is that I would eventually like to upgrade (by
> uninstalling R 2.15.3 nightly build) to the next stable version of R
> from http://cran.r-project.org/bin/macosx/ (assuming it will provide
> 64-bit support for Mountain Lion 10.8)
> 

There is no need to uninstall it - the installer is identical to the release so it will be simply upgraded by the release.

Cheers,
Simon


> -Alton
> 
> On Sat, Feb 23, 2013 at 6:00 AM, Simon Urbanek
> <simon.urbanek at r-project.org> wrote:
>> On Feb 23, 2013, at 8:45 AM, Alton Ing wrote:
>> 
>>> Hi Simon,
>>> 
>>> I completely agree with you. However, on my 64-bit Mac Book Pro Retina
>>> with Mountain Lion 10.8.2:
>>> 
>>> Rscript -e 'sessionInfo()$platform'
>>> [1] "i386-apple-darwin9.8.0/i386 (32-bit)"
>>> 
>>> file `which Rscript`
>>> /usr/bin/Rscript: Mach-O universal binary with 2 architectures
>>> /usr/bin/Rscript (for architecture i386):     Mach-O executable i386
>>> /usr/bin/Rscript (for architecture x86_64):   Mach-O 64-bit executable x86_64
>>> 
>>> file -h `which Rscript`
>>> /usr/bin/Rscript: symbolic link to
>>> /Library/Frameworks/R.framework/Resources/bin/Rscript
>>> 
>>> How can I get Rscript to DEFAULT to 64-bit mode like your computer?
>>> 
>> 
>> Ah, hold on - you are on Mountain Lion and you may have installed R with 32-bit default since 10.8 was omitted from the list of supported 64-bit systems at the time - try installing latest R 2.15.3 RC from
>> http://r.research.att.com/
>> 
>> As a side note, I suspect that the architecture is actually irrelevant since Rscript as it turns out is just calling the R script but without setting R_ARCH so that is the R shell script that decides the architecture. So I have to apologize, I was wrong, it doesn't behave the way it should. We probably want to have Rscript pass the arch on if not set explicitly.
>> 
>> Thanks,
>> Simon
>> 
>> 
>>> -Alton
>>> 
>>> On Sat, Feb 23, 2013 at 5:29 AM, Simon Urbanek
>>> <simon.urbanek at r-project.org> wrote:
>>>> 
>>>> On Feb 23, 2013, at 5:38 AM, Alton Ing wrote:
>>>> 
>>>>> To get Rscript running in 64-bit mode on your 64-bit Mac OS X (Mountain Lion):
>>>>> 
>>>>> sudo ln -s /Library/Frameworks/R.framework/Resources/bin/Rscript
>>>>> /usr/bin/Rscript32
>>>>> sudo rm /usr/bin/Rscript
>>>>> sudo echo '/Library/Frameworks/R.framework/Resources/bin/Rscript
>>>>> --arch=x86_64 "$@"' > /usr/local/bin/Rscript64
>>>>> sudo cp /usr/local/bin/Rscript64 /usr/bin/Rscript
>>>>> sudo chown root:admin /usr/bin/Rscript
>>>>> sudo chmod 775 /usr/bin/Rscript
>>>>> 
>>>> 
>>>> This is probably the worst possible way to go about this - so readers please be warned - you really don't want to do that.
>>>> 
>>>> We do provide Rscript in both variants so if you really want to force the one or another into /usr/bin/Rscript, just symlink the architecture you want.
>>>> 
>>>> Cheers,
>>>> Simon
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> If your old scripts encounter problems try using /usr/bin/Rscript32
>>>>> instead. Otherwise, you can revert /usr/bin/Rscript back using:
>>>>> sudo rm /usr/bin/Rscript
>>>>> sudo ln -s /Library/Frameworks/R.framework/Resources/bin/Rscript
>>>>> /usr/bin/Rscript
>>>>> 
>>>>> -Alton
>>>>> 
>>>>> 
>>>>> On Fri, Feb 22, 2013 at 10:57 PM, Prof Brian Ripley
>>>>> <ripley at stats.ox.ac.uk> wrote:
>>>>>> On 23/02/2013 04:32, Alton Ing wrote:
>>>>>>> 
>>>>>>> How can we change Rscript to execute in 64-bit?
>>>>>>> 
>>>>>>> The following script prints "i386-apple-darwin9.8.0/i386 (32-bit)" :
>>>>>>> 
>>>>>>> #!/usr/bin/env Rscript
>>>>>>> sessionInfo()$platform
>>>>>>> 
>>>>>>> I want to run RHadoop (rmr2) locally on Mac OS X 10.8.2 (Mountain
>>>>>>> Lion) but it only works with Rscript in 64-bit mode.
>>>>>> 
>>>>>> 
>>>>>> Where is that one from (we can't tell?)
>>>>>> 
>>>>>> On a CRAN installation
>>>>>> 
>>>>>> /Library/Frameworks/R.framework/Resources/bin/exec/x86_64/Rscript
>>>>>> 
>>>>>> is 64-bit.  And you can always run "Rscript --arch=x86_64" (not using env,
>>>>>> though).
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> Brian D. Ripley,                  ripley at stats.ox.ac.uk
>>>>>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>>>>>> University of Oxford,             Tel:  +44 1865 272861 (self)
>>>>>> 1 South Parks Road,                     +44 1865 272866 (PA)
>>>>>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> R-SIG-Mac mailing list
>>>>>> R-SIG-Mac at r-project.org
>>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>> 
>>>>> _______________________________________________
>>>>> R-SIG-Mac mailing list
>>>>> R-SIG-Mac at r-project.org
>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>> 
>>>>> 
>>>> 
>>> 
>>> 
>> 
> 
> 



More information about the R-SIG-Mac mailing list