Bug 17257 - Change R script on MacOS to reference the R framework version
Summary: Change R script on MacOS to reference the R framework version
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Installation (show other bugs)
Version: R-devel (trunk)
Hardware: All OS X El Capitan
: P5 normal
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2017-04-13 15:35 UTC by Jim Hester
Modified: 2017-04-19 07:03 UTC (History)
1 user (show)

See Also:


Attachments
modifies Makefile.fw to remove the sed substitution which converts the version specific paths to non-version specific and remedies this issue. (742 bytes, patch)
2017-04-13 15:35 UTC, Jim Hester
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Hester 2017-04-13 15:35:59 UTC
Created attachment 2245 [details]
modifies Makefile.fw to remove the sed substitution which converts the version specific paths to non-version specific and remedies this issue.

The script to start command line R on MacOS, installed in `/Library/Frameworks/R.framework/Versions/XYZ/Resources/bin` currently has the `R_HOME_DIR` variable set to a non-version specific path `/Library/Frameworks/R.framework/Versions` by default. This means it is not possible to have multiple R frameworks installed and run a different version of R by executing the specific R version. e.g. 
`/Library/Frameworks/R.framework/Versions/3.4/Resources/bin/R`. 

This behavior contradicts the R-admin manual (https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Multiple-versions)

> A version of R can be run directly from the command-line as e.g.
>
> /Library/Frameworks/R.framework/Versions/3.3/Resources/bin/R

The RSwitch helper can be used to change the currently used version of R, but calling any of the version specific scripts will always open the 'current' version of R.

Confusingly there is code in `Makeconf` and `script/Makevars.in` to set rhome to the version specific paths, but when the framework is installed by Makefile.fw this path is overwritten with the generic path.

The attached patch modifies Makefile.fw to remove the sed substitution which converts the version specific paths to non-version specific and remedies this issue.
Comment 1 Martin Maechler 2017-04-19 07:03:06 UTC
(mainly to keep this awake:)

I pretty strongly agree that it should be  kept|made  easy to have more than one version of R installed and to switch between them on all platforms,
and for teaching (and documentation) reasons it would be best if the way to switch versions was as much uniform as possible.

Bute then I'm not a macOS user (yet; maybe once I'll retire :-)) so cannot help further.