Skip to content

R CMD config for R >= 3.0.1

5 messages · Berwin A Turlach, Brian Ripley

#
Dear all,

When installing the usual packages that I use, after installing R
3.0.1, I noticed that the installation of some packages that query R about
its configuration did not succeed.  The problem is exemplified by:

berwin at bossiaea:~$ R-3.0.1 CMD config CC
/opt/R/R-3.0.1/lib/R/bin/config: 222: .: Can't open /opt/R/R-3.0.1/lib/R/etc/Renviron

Prior to R 3.0.1 such commands worked fine:

berwin at bossiaea:~$ R-3.0.0 CMD config CC
gcc -std=gnu99


I noticed now that my installations of the development and
patched version of R have the same problem (since I usually do not install
packages in those versions that query the configuration, I hadn't
noticed the issue earlier).  

The problem seems to be line 222 of `R RHOME`/bin/config (when R is R
3.0.1) which reads:

	. ${R_HOME}/etc/Renviron
 
The file ${R_HOME}/etc/Renviron does not necessarily exists if one has
opted for 32/64-bit builds and installed both as sub-architectures,
which I have.  In my installation ${R_HOME}/etc/32/Renviron and
${R_HOME}/etc/64/Renviron exist, but no ${R_HOME}/etc/Renviron.

Is it necessary for R >= 3.0.1 to have one build as
"main"-architecture and the other one as sub-architecture?  I could not
find anything in the NEWS file or the Admin manual that indicated that
this would now be necessary.

Cheers,

	Berwin

For completeness:  

I am running an Ubuntu 12.04 system and:

berwin at bossiaea:~$ echo "sessionInfo()" | R-3.0.1 --slave
R version 3.0.1 (2013-05-16)
Platform: x86_64-unknown-linux-gnu/64 (64-bit)

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods    base
#
On 18/05/2013 07:54, Berwin A Turlach wrote:
Not exclusively, but as the Mac build no longer uses this, we do need 
people who do to test pre-releases.   One of us needs to build such a 
setup and test it ....

  
    
#
G'day Brian,

On Sat, 18 May 2013 10:28:43 +0100
Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
[...]
Either that, or amend the administration and installation manual to
state that one installation should not be a sub-architecture
installation.  :)

But the latter solution also seems to have some problems.  My usual
install script did the following:

1) Run ./configure with 'r_arch=32' (and a few other options) using a
   config.site, configured for a 32bit build; followed by make  
2) make check ; make install 
3) `make distclean'; run ./configure with 'r_arch=64' (and a few other
   options using a config.site configured for a 64 bit build; followed
   by make
4) make check ; make install
5) make pdf info; make install-pdf install-info

When trying to install Rgraphviz afterwards (mmh, this is a
BioConductor package and not a CRAN package, so perhaps I should ask on
their lists?), Rgrahviz couldn't find the correct compiler settings as
"R CMD config ..." did not work (as reported originally).

So I changed my install script to remove the 'r_arch=64' in step 3.
(The modified script is attached.)  But now, trying to install
Rgraphviz falls over earlier when a dependencies of Rgraphviz,
BiocGenerics, is installed.  Trying to install BiocGenerics fails with:

[...]
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - 32
*** arch - R
ERROR: sub-architecture 'R' is not installed
ERROR: loading failed for 'R'
* removing '/opt/R/R-3.0.1/lib/R/library/BiocGenerics'

I have no idea why the process tries to check for an 'arch - R'.  But
this seems to be happening for packages that do not contain code that
needs to be compiled, another example is 'car' which is needed by 'AER'.

So I am bit puzzled how I should change my scripts.  Does step 3 needs
something stronger than 'make distclean'?  Or should the 'r_arch=32' be
dropped in step 1 but step 3 should use 'r_arch=64'?

Essentially, I would like to install 32bit and 64bit builds on my
machines, with one or both as sub-architectures (to save space) and
with the 64bit the 'default', i.e. the one that is run by
${R_HOME}/bin/R.

Cheers,
	
	Berwin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: R-Install0
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20130519/ae51a8d2/attachment.pl>
#
Could you try current R-patched or R-devel?  Works in my tests at least.
On 19/05/2013 08:25, Berwin A Turlach wrote:
That is not sufficient.  AFAICS the issue only occurs after installation 
(which is probably why no one else saw it), and the Renviron files for 
the different sub-architectures will be different (in R_PLATFORM).

  
    
#
G'day Brian,

On Sun, 19 May 2013 08:40:04 +0100
Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:

            
Tried R-patched (2013-05-18 r62762) and R-devel (2013-05-18 r62762),
installed with my original script.  Things seem fine when I try to
install my usual selection of packages in either of those versions.
Loading under correct (and existing) architectures is tested and
packages that query the configuration get the correct answers from `R
CMD config'.

Thank you very much for the help.

Cheers,

	Berwin