and CRAN submission

The latest version of the xtensor R package makes use of a configure file (and on windows), as it was recommended to us in Packaging of native extensions - vendoring of dependencies.

We run the R CMD checks continuously for that package, however, it seems that the presense of a nonempty makes the windows checks fail upon submission to CRAN:

* using log directory 'd:/RCompile/CRANincoming/R-devel/xtensor.Rcheck'
* using R Under development (unstable) (2019-02-21 r76144)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* checking for file 'xtensor/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'xtensor' version '0.10.0-0'
* package encoding: UTF-8
* checking CRAN incoming feasibility ... Note_to_CRAN_maintainers
Maintainer: 'Sylvain Corlay <>'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking serialization versions ... OK
* checking whether package 'xtensor' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... ERROR
Loading this package had a fatal error status code 1
Loading log:
Error: package 'xtensor' is not installed for 'arch = i386'
Execution halted
Status: 1 ERROR

Is it the case that CRAN does not support packages having a file?

I spun up a windows vm to check this out and asked around internally. The error you actually get looks like:

-  installing *source* package 'xtensor' ...
   Vendoring of xtensor headers is enabled.
   ./ ./tools/vendor: /bin/sh^M: bad interpreter: No such file or directory
   > library('Rcpp');Rcpp::compileAttributes();
   ...blah blah blah

So the problem is with the calling of bin/sh. Apparently, it is not reliable to use the shebang with Windows. So, instead just call sh ./tools/vendor and remove the shebang from the ./tools/vendor.

This worked and compiled fine on the windows vm.


THanks @davis for the quick reply! I am submitting a new version without the shebang!

While the shebang issue mentioned above was real, the crux of this error message:

Error: package 'xtensor' is not installed for 'arch = i386'

was actually due to the fact that a script was present (which is fine), which caused CRAN to not build on the i386 architecture by default. To fix this, I learned from this github issue:

that you actually need to specify Biarch: true in your DESCRIPTION file to have it build on i386 when a file is present. Adding that fixed the real issue.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.