Forcing a serial compilation on make for R package

你。 提交于 2019-12-12 19:12:14

问题


I submitted a package to CRAN (sundialr) around 6 months back which was recently archived as it fails with the parallel version of make. The exact error message from one of CRAN maintainers is as follows

This have just failed to install for me with a parallel make:

g++ -std=gnu++98 -std=gnu++98 -shared 
-L/data/blackswan/ripley/extras/lib64 -L/usrlocal/lib64 -o sundialr.so 
cvode.o RcppExports.o -L/data/blackswan/ripley/R/R-patched/lib -lRlapack 
-L/data/blackswan/ripley/R/R-patched/lib -lRblas -lgfortran -lm 
-lquadmath -L../inst/ ../inst/libsundials_all.a
g++: error: ../inst/libsundials_all.a: No such file or directory
make[1]: *** [/data/blackswan/ripley/R/R-patched/share/make/shlib.mk:6: 
sundialr.so] Error 1

The library was still being made ....

It seems the package fails to generate the static library with the parallel make. The easiest solution I could think of for this problem was to force a serial version of make using the .NOTPARALLEL phony command in Makevars and Makevars.win (https://github.com/sn248/sundialr/blob/master/src/Makevars). I have made this change and it seems to work on my machine and on testing on TravisCI and Appveyor (https://github.com/sn248/sundialr).

However, before I re-submit to CRAN, I wanted to get an opinion as to will this be enough to get rid of error with parallel make? Sorry for cross-posting on r-package-devel, it seems my email to the list yesterday did not get to the forum.

来源:https://stackoverflow.com/questions/54137171/forcing-a-serial-compilation-on-make-for-r-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!