I can confirm that the Makevars file is very useful (especially if you need to use "-L / my / libs" or "-I / my / includes" or other build flags).
For assembly, if you want to set the parameter for the site / machine, you can also change the variables in the Makeconf file (/ path / R / install / [lib64 / R /] etc / Makeconf).
However, like me, you still have some problems for managing and using libraries later, you can also install libraries with the ldpaths [1] file. This file contains R_LD_LIBRARY_PATH used by R. This variable is the equivalent of the known LD_LIBRARY_PATH on unix [2].
I just added some content (just before the comment on MacOS / Darwin) to this file (/ path / R / install / [lib64 / R /] etc. / ldpaths):
if test -n "${LD_LIBRARY_PATH}"; then R_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${R_LD_LIBRARY_PATH}" fi
Then you can dynamically manage your libraries, for example using "environment modules" or "lmod".
Note that you can change many other environment and R variables with all the files in the config / etc directory (Renviron, repositories, javaconf, Rprofile.site ...).
[1] https://support.rstudio.com/hc/en-us/community/posts/200645248-Setting-up-LD-LIBRARY-PATH-for-a-rsession
[2] http://www.tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
remyd1
source share