[Rd] On 'R CMD INSTALL' with multiple architectures

Berwin A Turlach Berwin.Turlach at gmail.com
Tue Jan 12 05:54:09 CET 2016


G'day all,

I guess it is still early enough in the year to wish everybody a happy
and successful new year.

I thought I should report that the installation of the CRAN package
rstan regularly fails on my machine (a 64 bit linux box running Xubuntu
15.10).  The reason being that I have the 32-bit and the 64-bit
architecture of R installed, and my /tmp file is on a partition with
about 1Gb space.  

During the installation of rstan the compilation of the source
directory regularly fills up my /tmp directory such that at some point
the compilation for the 64-bit architecture (my main architecture)
fails as /tmp runs out of space.  At that time, the src-32 subdirectory
has a size of about 460 MB (~ half of the partition!).

The most recent version of rstan I finally managed to install by
issuing the commands:

	R CMD INSTALL --no-multiarch rstan_2.9.0.tar.gz
followed by
        R --arch=32 CMD INSTALL --libs-only rstan_2.9.0.tar.gz

The last command, to my surprise, actually tried to compile both
libraries (32-bit and 64-bit) again.  So the installation kept failing
until I deleted the src-32 directory while the 64 libraries where build.

By now I realise that the R-admin manual only suggests/documents that
	R --arch=name CMD INSTALL --libs-only pkg1 pgk2 ....
only installs the library for the specified architecture if the package
has "an executable configure script or a src/Makefile file", and is
quite about its behaviour otherwise.  But I wonder whether it would be
reasonable for users to expect that 'R --arch=32 CMD INSTALL
--libs-only' installs only the library for the specified architecture
in all circumstances.

Playing around with a package that also has compiled code, but is
faster to install than rstan, I realise now that my second command
should have been:
  R --arch=32 CMD INSTALL --libs-only --no-multiarch rstan_2.9.0.tar.gz

In summary, I would like to suggest that 'R CMD INSTALL' deletes
architecture specific 'src' subdirectories as soon as they are no
longer needed and/or that 'R --arch=name CMD INSTALL --libs-only'
installs only libraries for the specified architecture (as an unwary
user might expect).

Cheers,

	Berwin

========================== Full address ============================
A/Prof Berwin A Turlach               Tel.: +61 (8) 6488 3338 (secr)
School of Maths and Stats (M019)            +61 (8) 6488 3383 (self)
The University of Western Australia   FAX : +61 (8) 6488 1028
35 Stirling Highway                   
Crawley WA 6009                     e-mail: Berwin.Turlach at gmail.com
Australia                http://www.maths.uwa.edu.au/~berwin
                         http://www.researcherid.com/rid/A-4995-2008



More information about the R-devel mailing list