Running R CMD INSTALL on an RcppArmadillo source package skeleton (RcppArmadillo.package.skeleton()
) on Ubuntu compiles the C++ files and supposedly does nothing else, as checked via Git diffing. However, removing the C++ binaries and copying the exact same package directory to a Windows 10 system and running R CMD INSTALL fails the Windows installation chain (with a generic error). Creating a completely new skeleton on Windows however works as expected.
What does R CMD INSTALL do beyond compiling the source files that makes the source package subsequently unusable for installation on different architectures?
To clarify, I've found a solution in running R CMD build on either platform to generate a tarball and R CMD INSTALL on the specific platform. However, I'm very much interested in the workings of R CMD INSTALL on source packages, as there seem to be changes made that are not directly obvious.
As note in the comment above, the standard way of installing is to run
and then use the generated file
RcppArmadillo_*.tar.gz
inwhich works on all supported platforms, and always starts from freshly prepared sources.
This approach is general, specified by R itself, and independent of
RcppArmadillo
so there was no bug.