Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding installation instructions for Linux #65
Adding installation instructions for Linux #65
Changes from 2 commits
1c2ee7b
0cb147f
ca087f0
54b63ef
64d9e15
a3efc32
9ff76a7
73b2b5f
7c1eeb4
f518f28
2ca7a3e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two are not equivalent. With the first, when we run
make
, R will be built in whatever directory we are in - we would need to then runmake install
to install intoBUILDDIR
. With the second (if we had createdBUILDDIR
first) runningmake
would build R insideBUILDDIR
(allowing us to run R without installation via BUILDDIR/bin/R) and if we then ranmake install
it would install in the default location of/usr/local/bin
, possibly overwriting an existing R installation!So there are potentially three locations to consider:
TOP_SRCDIR/configure
andmake
, to keep our source directory cleanmake install
However, installation is optional, we can just run R from where it is built. This makes sense for a "temporary" version of R, like R-patched or R-devel. So here - as you have done - we can skip the
make install
. This means we don't have to set theprefix
option, but we do need to create a build directory.I suggest we help readers by getting them to set BUILDDIR and TOP_SRCDIR explicitly, e.g.
This means we can make all the instructions ready to copy-paste:
It would also be helpful to add instructions for how to build R after you have done it once (not tested):
The problem here is that $TOP_SRCDIR and $BUILDDIR will need to be defined again, or manually edited. Maybe it is better to substitute the recommended values as $HOME is always defined?
I think we should also add instructions for RStudio users, they will need
$TOP_SRCDIR/configure --enable-R-shlib
e.g. "If you plan to use this version of R with RStudio: ... Otherwise:". Note that
--
had been turned into an en dash in your code above so make sure it is double dash in the R markdown file.If users have used the recommended values they can then run R-devel from terminal as follows
or from RStudio (if configured correctly)
I think it's important to add this so people know how to use the installed R-devel and to make it clear this is separate from their existing R installation, which they can use as normal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The guide says that " To build in BUILDDIR, run" and just the instructions I have in the guide (but I didn't test without building in the same directory as the source code.
Good point about the three directories (it wasn't really clear to me). Some more comments about it.
Linux users are usually recommended to install optional packages in
/opt
or$HOME/bin
(although I have the TOP_SRCDIR in$HOME/R
). As you mention the permission, I think it would be better to just use the later if we use the INSTALLDIR in the guide.Maybe we can set the source code in
TOP_SRCDIR=$HOME/Downloads/R
. It might help to think assvn up
as a download and the need up upate/"download again".I am a bit uncomfortable with the
BUILDDIR
being$HOME/R-devel
as it is dangerous close to$HOME/R-dev
thatdevtools::dev_mode()
uses as a library directory. I am not sure if we could use$HOME/bin
directory for that?I don't know about the differences between building and installing 😅
Could we use R without installing it for RStudio and other IDEs? If
I tried configuring from $BUILDDIR and building it and I got an error (despite successful $TOP_SRCDIR/configure):
Not sure if a bug but it seems that libRblas is assumed to already be in the BUILDDIR and not ported over from TOP_SRCDIR. in the BUILDDIR/src/extras there is a Makefile that doesn't use the BUILDDIR:
For completeness:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it is important to show how to use the installed from source version it will help for checking packages as well as contributing to R itself. But is this the right place to mention RStudio and the special configuration it needs? I thought to write a separate section for IDEs as many people might not need to use an IDE after a successful
make check
after modifying the code.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will correct and look for -- and not a em-dash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of using TOP_SRCDIR=$HOME/Downloads/R since contributors will only ever be "downloading" from the repository.
I agree using BUILDDIR=$HOME/bin/R-devel should be safer than making an
R-devel
directory in the users home directory.This discussion supports the idea of using variables though, as people might want to adjust these locations to their preference and if we define them up front that should be clear and simple.
It is not necessary to install R to use it with RStudio. I doubt this is an issue for Emacs either, not sure about other IDEs.
I think since we are writing these instructions for individual contributors (not sys admins) and we don't want to interfere with any existing installation, then we don't need to run
make install
. If we did then /opt/R/R-devel would be a good place to install I think, but I can't see any advantage in doing this (we can check about this).I think we should add to the instructions to delete all files in BUILDDIR before rebuilding as I think not doing this might cause problems like you had.
I think this is the right place to mention configuration options like the one for RStudio as it is annoying if people follow the instructions then find they have to do it all again (or most of it) to use with RStudio.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also as we are not necessarily installing R, perhaps this section should be called "Building R on Linux".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will change and add the variables and add the RStudio required option for the users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What could I do w/o RStudio? Couldn't I just dl using a browser? Or maybe using something like wget via Win cmd? Maybe also mention an URL like https://cloud.r-project.org/src/base-prerelease/R-devel.tar.gz? "Untaring" would then be the next step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As explained in the PR, I didn't touch this section.
I don't assume the guide is only for RStudio users and I will likely modify this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also https://cran.r-project.org/bin/windows/base/howto-R-devel.html