Closed kcrisman closed 11 years ago
For what it's worth, someone reported on ask.sagemath.org that this spkg fixed their problem with installing an R package.
I think that sounds like a positive review, combined with Jeroen's good comments... What do you think?
I think that someone should confirm that with the new spkg, in the script local/bin/R
, the variables R_SHARE_DIR
, R_INCLUDE_DIR
, and R_DOC_DIR
are now defined in terms of R_HOME_DIR
rather than being hard-coded paths as they are with the current spkg.
I think that someone should confirm that with the new spkg, in the script
local/bin/R
, the variablesR_SHARE_DIR
,R_INCLUDE_DIR
, andR_DOC_DIR
are now defined in terms ofR_HOME_DIR
rather than being hard-coded paths as they are with the current spkg.
I can do this.
Changed reviewer from Karl-Dieter Crisman to Karl-Dieter Crisman, Jeroen Demeyer
I confirmed that moving a Sage install (not just binary) caused installing an R package to fail with precisely the problems one would expect if these were incorrectly defined (e.g.
Warning: R include directory is empty -- perhaps need to install R-devel.rpm or similar
with appropriate nonexistent directory referenced). The script local/bin/R
had the (now incorrect) paths.
Then installing this spkg and retrying caused success, and local/bin/R
looks right now too. Nice work!
One question, though... when I move Sage back and run Sage, it doesn't change R_HOME_DIR
back.
R_HOME_DIR=/Users/.../Downloads/tempR/sage-5.9.beta5/local/lib/R
when it should be
R_HOME_DIR=/Users/.../Downloads/sage-5.9.beta5/local/lib/R
So this was changed, presumably, when I reinstalled the spkg. It doesn't impact installing new R packages, by the way, nor functionality of R.
In particular, moving a different Sage installation and starting Sage changes some things, but doesn't change the location of R_HOME_DIR
in local/bin/R
. I'm not sure why that doesn't affect functionality, but presumably this should somehow be taken care of. On this ticket?
It took me a little while to understand this, too. Right before the lines defining R_SHARE_DIR
, etc., there are lines
if test x$SAGE_BUILDING_R = x; then
R_HOME_DIR="$SAGE_LOCAL/lib/R/"
fi
If you're not building the R spkg, then this will be executed, overriding the hard-coded path earlier in the script, and setting R_HOME_DIR
to the desired portable setting. I don't know R, so I don't know how to test this: if you run sage -R
, can you execute some R command to tell you the current setting of R_HOME_DIR
?
Well, that is a Sage-specific thing, I think, but we have
R_HOME="${R_HOME_DIR}"
later on and also
$ ./sage -R RHOME
/Users/.../Downloads/sage-5.9.beta5/local/lib/R/
So all is well, I think.
Merged: sage-5.9.rc0
See this thread on sage-support.
Related (R package):
9906
9847
8274
10967
New spkg: http://boxen.math.washington.edu/home/palmieri/SPKG/r-2.15.2.p2.spkg
CC: @nexttime @jhpalmieri
Component: packages: standard
Keywords: R spkg R.sh.in libR.pc pkg-config hard-coded package installation R_HOME_DIR sd32 r-project
Author: John Palmieri
Reviewer: Karl-Dieter Crisman, Jeroen Demeyer
Merged: sage-5.9.rc0
Issue created by migration from https://trac.sagemath.org/ticket/9668