Re: [Rd] Can detect 64 bit R?

From: Prof Brian Ripley <>
Date: Wed, 06 Jun 2007 14:05:25 +0100 (BST)

On Tue, 5 Jun 2007, wrote:

> My fame package has to link to the that comes with FAME.
> However, FAME is now supplying both 32 and 64 bit versions of the
> library. The 32-bit version is $FAME/hli/ while the 64-bit
> version is $FAME/hli/64/ To set the right flags, it seems
> that I need to know, from within, whether the R
> installation is 32 bit or 64 bit. Is there a way to detect this?

That sort of differentiation is highly OS-specific. If FAME is indeed doing this on all OSes it will cause considerable confusion. It is more normal to have the 'standard' version in .../lib and the others in .../lib/32 or .../lib/sparcv9, or to use lib and lib64 or ....

And I will assume from now on that you mean a Unix-alike.

Next, on any decent OS you don't need to know, as it will choose the appropriate DSO from those it can find of that name. So just having -L$FAME/hli/64 -L$FAME/hli should suffice.

However, if despite all that you want to know, yes of course can detect it. Several possibilities include:

Of these the second is most direct (and the slowest and needs R >= 2.5.0).

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
Received on Wed 06 Jun 2007 - 13:08:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Jun 2007 - 13:34:19 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.