[R-pkg-devel] package fails with parallel make - would forcing a serial version work?

Paul Gilbert pgilbert902 @ending from gm@il@com
Mon Jan 14 19:29:42 CET 2019


(I didn't see an answer to this, so ...)

I think using .NOTPARALLEL will usually get rid of the error but, in my 
experience, this problem is usually caused by an incorrect or incomplete 
Makefile. When not done in parallel this missing target is usually 
getting done first as a side-affect of something that happens before and 
usually finishes before it is needed. Your luck does not hold in 
parallel. The better fix is to correct your Makefile.

Paul

On 1/10/19 4:54 PM, Satyaprakash Nayak wrote:
> Dear R package developers
> 
> I published a package on CRAN last year (sundialr) which is now failing
> with as it is not make to compile a static library with parallel make.
> 
> In this package, I compile a static library (libsundials_all.a) from source
> files of a third party. The specifics of compiling the static library can
> be found at - https://github.com/sn248/sundialr/blob/master/src/Makevars
> 
> Now, I got the following error message from CRAN (actually, I was informed
> of this before, but had neglected to fix it). Here is the message from one
> of the CRAN maintainers ..
> 
> ***************************************************************************************************************************************
> 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
> *****************************************************************************************************************************************
> 
> 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
> with 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 the error with parallel make?
> 
> Any suggestions would be very much appreciated, thank you!
> Satyaprakash
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>



More information about the R-package-devel mailing list