I'm not an R user but currently setting up an R environment for a user. We're using NixOS (Linux) which provides a number of automatically packaged R packages based on CRAN. Our builder at some point runs:
$rCommand CMD INSTALL $installFlags --configure-args="$configureFlags" -l $out/library .
+ R CMD INSTALL --configure-args= -l /nix/store/mgbk39lm6i7xhwx9pzjpynzj8fpfjqy3-r-littler-0.3.3/library .
building path(s) ‘/nix/store/mgbk39lm6i7xhwx9pzjpynzj8fpfjqy3-r-littler-0.3.3’
| executing builder ‘/nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/bash’
unpacking sources
unpacking source archive /nix/store/w3ish8b9my5k60llc6qig3vw1b9ij9rg-littler_0.3.3.tar.gz
source root is littler
setting SOURCE_DATE_EPOCH to timestamp 1513529959 of file littler/MD5
patching sources
configuring
building
running tests
installing
* installing *source* package 'littler' ...
** package 'littler' successfully unpacked and MD5 sums checked
checking for gcc... /nix/store/iw94llkj05wgaz268mlzvgx8jkbi1ss0-gcc-wrapper-7.3.0/bin/cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /nix/store/iw94llkj05wgaz268mlzvgx8jkbi1ss0-gcc-wrapper-7.3.0/bin/cc accepts -g... yes
checking for /nix/store/iw94llkj05wgaz268mlzvgx8jkbi1ss0-gcc-wrapper-7.3.0/bin/cc option to accept ISO C89... none needed
checking how to run the C preprocessor... /nix/store/iw94llkj05wgaz268mlzvgx8jkbi1ss0-gcc-wrapper-7.3.0/bin/cc -E
checking for grep that handles long lines and -e... /nix/store/9f89z51na7w931aja8lqlmhqny9h16cj-gnugrep-3.1/bin/grep
checking for egrep... /nix/store/9f89z51na7w931aja8lqlmhqny9h16cj-gnugrep-3.1/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking whether sys/types.h defines makedev... yes
checking for setenv... yes
checking for gettimeofday... yes
checking for time... yes
checking if R was built as a shared library... yes
checking for install_name_tool... no
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/gitversion.h
config.status: creating src/config.h
** libs
/nix/store/iw94llkj05wgaz268mlzvgx8jkbi1ss0-gcc-wrapper-7.3.0/bin/cc -o r -g -O2 -I/nix/store/ap80ym1qd41cbpk04makh9ja9k25cypc-R-3.5.1/lib/R/include littler.c -Wl,--export-dynamic -fopenmp -L/nix/store/ap80ym1qd41cbpk04makh9ja9k25cypc-R-3.5.1/lib/R/lib -lR -lpcre -llzma -lbz2 -lz -lrt -ldl -lm -licuuc -licui18n -L/nix/store/blk28p4cr6r2nc7fi1c4gggiqpd7pkqy-openblas-0.3.1/lib -lopenblas -L/nix/store/blk28p4cr6r2nc7fi1c4gggiqpd7pkqy-openblas-0.3.1/lib -lopenblas -Wl,-rpath,/nix/store/ap80ym1qd41cbpk04makh9ja9k25cypc-R-3.5.1/lib/R/lib -Wl,-rpath,/nix/store/m8bp0zw93ci3fqlcw33sm2vznfq2rv1w-gfortran-7.3.0-lib/lib -Wl,-rpath,/nix/store/mvfh8jj5200308mv2wms2bnwzy96yi3c-gfortran-wrapper-7.3.0/bin -Wl,-rpath,/nix/store/gyrx9n14b3b8jm8zqsya36zjkqk0pgvg-gfortran-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0 -Wl,-rpath,/nix/store/gyrx9n14b3b8jm8zqsya36zjkqk0pgvg-gfortran-7.3.0/lib -Wl,-rpath,/nix/store/blk28p4cr6r2nc7fi1c4gggiqpd7pkqy-openblas-0.3.1/lib -Wl,-rpath,/nix/store/pay7xbyp76hp6kcp6achl24dd9dinp8z-tcl-8.6.6/lib -Wl,-rpath,/nix/store/mkvyrnrzzlx00r66w3sqfw8zavgw0bn0-tk-8.6.6/lib -Wl,-rpath,/nix/store/fc3pvx20j5hh3jpf6skjzdf50p2pph15-openjdk-8u192b26-jre/lib/openjdk/jre/lib/amd64/server -Wl,-rpath,/nix/store/ap80ym1qd41cbpk04makh9ja9k25cypc-R-3.5.1/lib/R/lib -Wl,-rpath,/nix/store/m8bp0zw93ci3fqlcw33sm2vznfq2rv1w-gfortran-7.3.0-lib/lib -Wl,-rpath,/nix/store/mvfh8jj5200308mv2wms2bnwzy96yi3c-gfortran-wrapper-7.3.0/bin -Wl,-rpath,/nix/store/gyrx9n14b3b8jm8zqsya36zjkqk0pgvg-gfortran-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0 -Wl,-rpath,/nix/store/gyrx9n14b3b8jm8zqsya36zjkqk0pgvg-gfortran-7.3.0/lib -Wl,-rpath,/nix/store/blk28p4cr6r2nc7fi1c4gggiqpd7pkqy-openblas-0.3.1/lib -Wl,-rpath,/nix/store/pay7xbyp76hp6kcp6achl24dd9dinp8z-tcl-8.6.6/lib -Wl,-rpath,/nix/store/mkvyrnrzzlx00r66w3sqfw8zavgw0bn0-tk-8.6.6/lib -Wl,-rpath,/nix/store/fc3pvx20j5hh3jpf6skjzdf50p2pph15-openjdk-8u192b26-jre/lib/openjdk/jre/lib/amd64/server -Wl,-rpath,/nix/store/ap80ym1qd41cbpk04makh9ja9k25cypc-R-3.5.1/lib/R/lib -Wl,-rpath,/nix/store/m8bp0zw93ci3fqlcw33sm2vznfq2rv1w-gfortran-7.3.0-lib/lib -Wl,-rpath,/nix/store/mvfh8jj5200308mv2wms2bnwzy96yi3c-gfortran-wrapper-7.3.0/bin -Wl,-rpath,/nix/store/gyrx9n14b3b8jm8zqsya36zjkqk0pgvg-gfortran-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0 -Wl,-rpath,/nix/store/gyrx9n14b3b8jm8zqsya36zjkqk0pgvg-gfortran-7.3.0/lib -Wl,-rpath,/nix/store/blk28p4cr6r2nc7fi1c4gggiqpd7pkqy-openblas-0.3.1/lib -Wl,-rpath,/nix/store/pay7xbyp76hp6kcp6achl24dd9dinp8z-tcl-8.6.6/lib -Wl,-rpath,/nix/store/mkvyrnrzzlx00r66w3sqfw8zavgw0bn0-tk-8.6.6/lib -Wl,-rpath,/nix/store/fc3pvx20j5hh3jpf6skjzdf50p2pph15-openjdk-8u192b26-jre/lib/openjdk/jre/lib/amd64/server
*
* new binary r installed in bin/ subdirectory
* consider adding a symbolic link from, e.g., /usr/local/bin
* on OS X, you may have to name this 'lr' instead
*
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for 'littler':
.onAttach failed in attachNamespace() for 'littler', details:
call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)
error: error in running command
Error: loading failed
Execution halted
ERROR: loading failed
* removing '/nix/store/mgbk39lm6i7xhwx9pzjpynzj8fpfjqy3-r-littler-0.3.3/library/littler'
note: keeping build directory ‘/tmp/nix-build-r-littler-0.3.3.drv-3’
builder for ‘/nix/store/f5hc9p8jp1jlibp1ksgng6ffyrn660xk-r-littler-0.3.3.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/xjm7kk53b61qhvpx1ndnrlzvbmp5rddp-R-3.5.1-wrapper.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/z5bx816hr47sizwdglv7yx4zmxlk4wa1-blackbee-wfe-1.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/z5bx816hr47sizwdglv7yx4zmxlk4wa1-blackbee-wfe-1.drv’ failed
Looking at the resulting R environment seems like it's working so far, but I guess this might be some incompatibility between the R CMD INSTALL invocation and running it with --no-test-load turns out fine.
So my question is: is this an build procedure thats supposed to be working and we have something weird in our setup or is this known to not work and running with --no-test-load is working as intended?