[R-pkg-devel] R_MAKEVARS_USER fail to pass down to sub-makes?
Thank you Jim, That was the problem indeed. Too bad it is not mentioned in the manual.
On Wed, Jun 17, 2020 at 8:33 PM Jim Hester <james.f.hester at gmail.com> wrote:
I think the issue is likely that you seem to be using a relative path to the R_MAKEVARS_USER file, it needs to be an absolute path as the installation is run in a temporary directory not from the directory you call `R CMD INSTALL` from. I observed similar behavior to what you describe when I had the MAKEVARS_USER file as a relative path, but using an absolute path produced the expected result. On Mon, Jun 1, 2020 at 8:04 AM Jan Gorecki <j.gorecki at wit.edu.pl> wrote:
Hi package devel support, I am trying to use R_MAKEVARS_USER to customize build, rather than .R/Makevars. It is properly displayed from config CFLAGS but during package install it doesn't seem to work. In R-admin in "6.3.3 Customizing package compilation" there is:
Note that these mechanisms do not work with packages which fail to pass settings down to sub-makes, perhaps reading etc/Makeconf in makefiles in subdirectories.
It seems that it applies to me. How should I debug that? to make this
env var respected? Note that my pkg has src/Makevars to handle openmp
switch nicely
Thank you
system("R_MAKEVARS_USER=library/gcc/O3/Makevars R CMD config CFLAGS")
-O3
system("R_MAKEVARS_USER=library/gcc/O3/Makevars R CMD INSTALL
--library=library/gcc/O3 mypkg_1.0.0.tar.gz")
* installing *source* package 'mypkg' ...
** using staged installation
** libs
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fopenmp -fpic -g
-O2 -fdebug-prefix-map=/build/r-base-V28x5H/r-base-3.6.3=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -g -c assign.c -o assign.o
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel