简体   繁体   English

软件包在Linux中通过R CMD检查,Windows二进制失败

[英]Package Passes R CMD check in Linux, Windows Binary Fails

I submitted version 0.1-8 of a robust package I created to CRAN. 我向CRAN提交了我创建的健壮软件包的版本0.1-8。 R CMD Check passed on my computer runnning 64 bit Ubuntu and Rstudio. R CMD Check在运行64位Ubuntu和Rstudio的计算机上通过。 The Linux and Mac binaries are passing on CRAN. Linux和Mac二进制文件正在通过CRAN。 The windows binaries are failing on CRAN. Windows二进制文件在CRAN上失败。 The only difference between version 0.1-7 and 0.1-8 is I changed the namespace to adhere to the new version of R and I improved the documentation. 版本0.1-7和0.1-8之间的唯一区别是,我更改了名称空间以遵循新版本的R,并且改进了文档。 None of the code has been changed. 所有代码均未更改。

https://cran.r-project.org/web/packages/robustreg/index.html https://cran.r-project.org/web/packages/robustreg/index.html

https://cran.r-project.org/web/checks/check_results_robustreg.html https://cran.r-project.org/web/checks/check_results_robustreg.html

Can anyone help me with the below error message? 谁能帮我解决以下错误消息?

* using log directory 'd:/Rcompile/CRANpkg/local/3.2/robustreg.Rcheck'
* using R version 3.2.1 (2015-06-18)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* checking for file 'robustreg/DESCRIPTION' ... OK
* this is package 'robustreg' version '0.1-8'
* 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 whether package 'robustreg' can be installed ... ERROR
Installation failed.
See 'd:/Rcompile/CRANpkg/local/3.2/robustreg.Rcheck/00install.out' for details.
* DONE
The installation logfile:
* installing *source* package 'robustreg' ...
** package 'robustreg' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
make[1]: Entering directory `/cygdrive/d/temp/RtmpI9QsDz/R.INSTALL4b704d36335d/robustreg/src-i386'
g++  -I"D:/RCompile/recent/R-3.2.1/include"            -I"d:/RCompile/CRANpkg/lib/3.2/Rcpp/include" -I"d:/RCompile/CRANpkg/lib/3.2/RcppArmadillo/include" -I"d:/RCompile/r-compiling/local/local320/include"     -O3 -Wall  -mtune=core2            -c RcppExports.cpp -o RcppExports.o
g++  -I"D:/RCompile/recent/R-3.2.1/include"            -I"d:/RCompile/CRANpkg/lib/3.2/Rcpp/include" -I"d:/RCompile/CRANpkg/lib/3.2/RcppArmadillo/include" -I"d:/RCompile/r-compiling/local/local320/include"     -O3 -Wall  -mtune=core2            -c fit.cpp -o fit.o
g++ -shared -s -static-libgcc -o robustreg.dll tmp.def RcppExports.o fit.o -Ld:/RCompile/r-compiling/local/local320/lib/i386 -Ld:/RCompile/r-compiling/local/local320/lib -LD:/RCompile/recent/R-3.2.1/bin/i386 -lR
fit.o:fit.cpp:(.text$_ZN4arma27glue_times_redirect2_helperILb0EE5applyINS_3MatIdEENS_3ColIdEEEEvRNS3_INT_9elem_typeEEERKNS_4GlueIS7_T0_NS_10glue_timesEEE[void arma::glue_times_redirect2_helper<false>::apply<arma::Mat<double>, arma::Col<double> >(arma::Mat<arma::Mat<double>::elem_type>&, arma::Glue<arma::Mat<double>, arma::Col<double>, arma::glue_times> const&)]+0x262): undefined reference to `dgemv_'
fit.o:fit.cpp:(.text$_ZN4arma27glue_times_redirect2_helperILb0EE5applyINS_3MatIdEENS_3ColIdEEEEvRNS3_INT_9elem_typeEEERKNS_4GlueIS7_T0_NS_10glue_timesEEE[void arma::glue_times_redirect2_helper<false>::apply<arma::Mat<double>, arma::Col<double> >(arma::Mat<arma::Mat<double>::elem_type>&, arma::Glue<arma::Mat<double>, arma::Col<double>, arma::glue_times> const&)]+0x4a2): undefined reference to `dgemv_'
fit.o:fit.cpp:(.text$_ZN4arma27glue_times_redirect2_helperILb0EE5applyINS_3MatIdEENS_3ColIdEEEEvRNS3_INT_9elem_typeEEERKNS_4GlueIS7_T0_NS_10glue_timesEEE[void arma::glue_times_redirect2_helper<false>::apply<arma::Mat<double>, arma::Col<double> >(arma::Mat<arma::Mat<double>::elem_type>&, arma::Glue<arma::Mat<double>, arma::Col<double>, arma::glue_times> const&)]+0xb4c): undefined reference to `dgemv_'
collect2: ld returned 1 exit status
make[1]: Leaving directory `/cygdrive/d/temp/RtmpI9QsDz/R.INSTALL4b704d36335d/robustreg/src-i386'
make[1]: Entering directory `/cygdrive/d/temp/RtmpI9QsDz/R.INSTALL4b704d36335d/robustreg/src-i386'
make[1]: Leaving directory `/cygdrive/d/temp/RtmpI9QsDz/R.INSTALL4b704d36335d/robustreg/src-i386'
no DLL was created
ERROR: compilation failed for package 'robustreg'
* removing 'd:/Rcompile/CRANpkg/lib/3.2/robustreg'
* restoring previous 'd:/Rcompile/CRANpkg/lib/3.2/robustreg'

According to its automatically-created GitHub mirror and the src/ directory there in , you do not have a file src/Makevars.win . 根据其自动创建的GitHub镜像和其中的src /目录 ,您没有文件src/Makevars.win And you now have a linking error with LAPACK routines. 现在您有了LAPACK例程的链接错误。

Simply add a file such as this one added when you use RcppArmadillo.package.skeleton() containing just 只需添加一个文件,例如使用RcppArmadillo.package.skeleton()包含的文件即可。

PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

and you should be all set: 并且您应该被设置为:

I am surprised this worked previously. 我很惊讶以前这样做。 You mostly got lucky--our documentation clearly says you need it. 您大都是幸运的-我们的文档清楚地表明您需要它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM