Skip to content

R 32-bit suddenly the default on Mountain Lion 10.8.2?

9 messages · Federico Calboli, Berend Hasselman, Marc Schwartz +1 more

#
Hi All,

I am on a fully updated MacBook Pro, running 10.8.2. I get:

uname -m
x86_64

from the terminal, as would be expected.

I have been using the CRAN OSX binaries for some time now, rather than building from source, which I had been doing previously.

Somewhere along the way in the past few weeks, apparently since I installed R 2.15.2, the default architecture under which R is running is now 32 bit, not 64 bit, which was the case previously. I just noted this today due to some funny encoding issues that I had not seen before and have spent the past few hours trying to figure out what changed.

I initially thought something was amiss with the latest 2.15.2 release .pkg file. I completely removed R (Framework and symlinks to the startup scripts, etc.) and re-installed. Same thing. 32 bit R was the default link from 'R'.

So I removed R again and re-installed 2.15.1 (getting the older binary from CRAN), since that was the last version of R that I had installed which defaulted to 64 bit.

Funny, same thing, it defaulted to 32 bit R.

Then I wondered if there was something related to some anti-virus software (Avast) that I had recently installed due to some events that had occurred recently. I completely removed the AV software, rebooted, removed R and then re-installed R. Same thing, 32 bit R as the default.

What am I missing here? What is the installation program and/or the R startup script itself looking for that determines whether 64 or 32 bit R should the default when one simply uses 'R' to start it up? A read of the R startup script suggests that the output (as above) of 'uname -m' being 'x86_64' may be all that is needed, but perhaps I am missing something else.

I am also attaching the full installation log file here (for 2.15.2). I did not see anything there obvious to my eyes.

I can't recall the timeline well enough right now to consider whether some OSX update changed something, or if there is something strictly unique to my MBP that is causing this problem. 

Thanks for any insights.

Regards,

Marc

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Installer Log 13-Nov-2012.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20121113/35f79c2a/attachment.txt>
-------------- next part --------------
#
On 13 Nov 2012, at 19:06, Marc Schwartz <marc_schwartz at me.com> wrote:

            
Same here, OS 10.8.2, R 2.15.2, R defaults to 32 bit.

BW

F
--
Federico C. F. Calboli
Neuroepidemiology and Ageing Research
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG

Tel +44 (0)20 75941602   Fax +44 (0)20 75943193

f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com
#
Marc,

Start with 'which R', or run /usr/bin/R explicitly.  That should be a 
symlink to

/Library/Frameworks/R.framework/Resources/bin/R

and that should be a symlink,  If it is not like

lrwxr-xr-x  1 root  admin  3 28 Oct 08:03 
/Library/Frameworks/R.framework/Resources/bin/R@ -> R64

or is linked to R32, change it to point to R64.

It is the installer which determines what it links to.  Specifically 
https://svn.r-project.org/R-dev-web/trunk/CRAN/QA/Simon/R-build/packaging/leopard/scripts/postflight 
.

If running /Library/Frameworks/R.framework/Resources/bin/R64 is not 
x86_64, come back to us.

Brian
On 13/11/2012 19:06, Marc Schwartz wrote:

  
    
#
On 13 Nov 2012, at 19:59, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:

            
$ which R
/usr/bin/R
it does:

$ ls -l /usr/bin/R
lrwxr-xr-x  1 root  wheel  47 28 Oct 10:47 /usr/bin/R@ -> /Library/Frameworks/R.framework/Resources/bin/R
it's not:

$ ls -l /Library/Frameworks/R.framework/Resources/bin/R
-rwxrwxr-x  1 root  admin  8775 26 Oct 17:22 /Library/Frameworks/R.framework/Resources/bin/R*

$ ls /Library/Frameworks/R.framework/Resources/bin/R*
/Library/Frameworks/R.framework/Resources/bin/R*       /Library/Frameworks/R.framework/Resources/bin/Rd2pdf*
/Library/Frameworks/R.framework/Resources/bin/R32*     /Library/Frameworks/R.framework/Resources/bin/Rdconv*
/Library/Frameworks/R.framework/Resources/bin/R64*     /Library/Frameworks/R.framework/Resources/bin/Rdiff*
/Library/Frameworks/R.framework/Resources/bin/REMOVE*  /Library/Frameworks/R.framework/Resources/bin/Rprof*
/Library/Frameworks/R.framework/Resources/bin/Rcmd*    /Library/Frameworks/R.framework/Resources/bin/Rscript*


BW

F
--
Federico C. F. Calboli
Neuroepidemiology and Ageing Research
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG

Tel +44 (0)20 75941602   Fax +44 (0)20 75943193

f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com
#
On Nov 13, 2012, at 1:59 PM, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:

            
Hi Prof Ripley,

Thanks.


~  which R
/usr/bin/R


/usr/bin/R called directly launches 32 bit R.


R64 launches 64 bit R as one might expect:

~  ls -l /usr/bin/R64
lrwxr-xr-x  1 root  wheel  49 Nov 13 12:15 /usr/bin/R64 -> /Library/Frameworks/R.framework/Resources/bin/R64
~  ls -l /usr/bin/R
lrwxr-xr-x  1 root  wheel  47 Nov 13 12:14 /usr/bin/R -> /Library/Frameworks/R.framework/Resources/bin/R
~  ls -l /Library/Frameworks/R.framework/Resources/bin/R
-rwxrwxr-x  1 root  admin  8775 Oct 26 11:22 /Library/Frameworks/R.framework/Resources/bin/R
That does run 64 bit R, as expected.

Looks like a key flag in the shell script in SVN is:

~  /usr/sbin/sysctl hw.cpu64bit_capable
hw.cpu64bit_capable: 1


Going to try to work my way through the shell script a bit more, but wanted to get back with this information.

Thanks,

Marc
#
On 13-11-2012, at 21:07, Federico Calboli <f.calboli at imperial.ac.uk> wrote:

            
The postflight script tests for 10.6 and 10.7 but not for 10.8.
The relevant  lines are

# some jobs needed specifically on Mac OS X 10.6 (Snow Leopard) and 10.7 (Lion)
if uname -r | grep ^1[01] >/dev/null; then

On 10.8.2 uname -r returns 12.2.0 and that doesn't match the grep test.
It would seem that the test should be grep ^1[012] or grep ^1[0-2] .

Berend
#
On Nov 13, 2012, at 2:30 PM, Berend Hasselman <bhh at xs4all.nl> wrote:

            
I was just getting around to that section of the script.

I suspect that this is correct and the timing would make sense with my observations here.

Mountain Lion was released on July 25 and I updated shortly thereafter. 

The R 2.15.1 OSX binary is dated June 22, before ML was available, so I would have had that installed under Lion, since I would have updated from 2.15.0 soon after the R OSX binary became available. Thus, 64 bit R would have been the default at that time.

R 2.15.2 was of course released after ML, so that is when the change occurred to 32 bit R. 


Under ML as Berend notes above:

~  uname -r
12.2.0

~  uname -r | grep ^1[012] 
12.2.0


I had sent an initial e-mail to Simon with the information, but he replied from his iPhone that he is away for a couple of weeks sans computer.

In the mean time, I will get in the habit of using 'R64' from the CLI and in ESS.

If there is anything else that is needed, let me know.

Thanks all!

Regards,

Marc
#
Simon is pretty much off-line, which is why I replied.

I would simply set the R->R64 symlink as the installer would have done 
in SL and Lion.  The things will work as you expected.

Because I have so many flavours of R installed, I make my own links (in 
~/bin, which is on my path).
On 13/11/2012 20:58, Marc Schwartz wrote:
Actually, I think it needs to be future-proofed.

  
    
#
On Nov 13, 2012, at 3:15 PM, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:

            
Thank you for doing so.
Yeah, that's probably a good idea. Murphy's Law would kick in at some point and I would forget to use 'R64'. :-)

Thanks again,

Marc