[R] How to determine if R is 64 bit compiled under Unix-alike?

Stuart Luppescu slu at ccsr.uchicago.edu
Mon Jul 5 23:44:28 CEST 2010


On 月, 2010-07-05 at 23:05 +0200, Przemek Grabowicz wrote:
> On 07/05/2010 10:52 PM, Marcin Jaworski wrote:
> > Try:
> >
> > .Machine$sizeof.pointer
> >
> > If you get 8, you are riding 64 bit R. If you get 4, your R is 32-bit one.
> >    
> 
> I got 8, so should be 64 bits. But I have problems with some package, 
> could it be that it is 32-bit? It was installed using:
> 
> R CMD INSTALL foobar.tar.gz
> 
> On MacOS using
> 
> R64 CMD INSTALL foobar.tar.gz
> 
> gave proper effect. But here on Ubuntu it seems that objects from that package are not able to load much data.

I think when you install a package, the source files are compiled using
the development tools on your system. (I don't know -- are there any
binary packages for Linux?) Do you have the necessary C and Fortran
compilers in your system? If you can find the object files, you can test
them with file as before, for example:

file /usr/lib64/R/library/MASS/libs/MASS.so 
/usr/lib64/R/library/MASS/libs/MASS.so: ELF 64-bit LSB shared object,
x86-64, version 1 (SYSV), dynamically linked, stripped

-- 
Stuart Luppescu -=- slu .at. ccsr.uchicago.edu        
University of Chicago -=- CCSR 
才文と智奈美の父 -=-    Kernel 2.6.31-gentoo-r6                
Andrew Thomas: ...and if something goes wrong here 
 it is probably not WinBUGS since that has been
 running for more than 10 years... Peter Green
 (from the back): ... and it still hasn't
 converged!    -- Andrew Thomas and Peter Green
 (during the talk about 'BRugs')       gR 2003,
 Aalborg (September 2003)



More information about the R-help mailing list