[R-pkg-devel] Multiple architectures on Windows

Sean Taylor sjt at fb.com
Tue Jan 24 22:26:21 CET 2017


I am testing a package on Windows for submission for CRAN but having trouble getting it to work on i386 and x64 platforms simultaneously.

At install time, the package runs a install.libs.R to generate an RData file.  This file contains compiled code (they are cached Stan models generated from the rstan package) that is architecture specific.

When I check the package on Windows, it will always fail to load the RData file on whatever architecture it was not installed with (e.g. if I install with x64, it will fail to load on i386).  This suggests to me that the install step is not running for both architectures as it should, or that they are being written to the same place and one is overwriting the other.

Is there a way to configure the package to force it to run install.libs.R to generate these RData files separately under both architectures?  The problem as far as I can tell is that the `R_ARCH` global variable is always empty in install.libs.R, so under both i386 and x86 runs, the RData files are being written to the same place.  My destination directory is set using the following line: `dest <- file.path(R_PACKAGE_DIR, paste0('libs', R_ARCH))`.

Things I have tried to force this behavior:

-          Adding `Biarch: true` to the DESCRIPTION file.

-          Adding a configure.win file.

Thanks for any help you can offer!  I am happy to share the package file itself if you find that useful.

Sean Taylor
sjt at fb.com

References:
My install.libs.R: https://gist.github.com/seanjtaylor/17f3d3df9adade9d201973e32c8cc362
Install/Check output with no package configuration: https://gist.github.com/seanjtaylor/4a5c26aec9662c2c606e61e24d0d1ebf
Install/Check output with `Biarch: true`:  https://gist.github.com/seanjtaylor/da5b51298e3ac38825a09d1c01435ade
Install/Check output with configure.win file: https://gist.github.com/seanjtaylor/925902ba4093ab4eb1ef748d677a63c7
Install/Check output with `Biarch: true` AND configure.win file: https://gist.github.com/seanjtaylor/8382f28ead1ccd6b5e2e9c5cc036f4ad


	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list