MichaelChirico / r-bugs

A ⚠️read-only⚠️mirror of https://bugs.r-project.org/
20 stars 0 forks source link

[BUGZILLA #15196] "make rinstaller EXTRA_PKG=..." can fail with -jN option #4784

Closed MichaelChirico closed 4 years ago

MichaelChirico commented 4 years ago

This is a silly detail that just bit me when building the Inno setup installer for R. 2.15.2 on Windows 7 (64-bit) with additional packages.

make -j4 rinstaller EXTRA_PKGS=... failed, but after looking at the error messages I figured this was a parallelism bug. Indeed, this succeeded: make rinstaller EXTRA_PKGS=...

The bug seems to be that, with -j4, the directory R-2.15.2 accessed before being created and filled with the expected executables. I'm not sure what should be done to ensure the operations are run in the correct order.

Error log:

C:\Rbuild\R-2.15.2-64bit\src\gnuwin32>make -j4 rinstaller EXTRA_PKGS="abind apl pack bitops ca car colorspace e1071 effects Hmisc latticeExtra leaps lmtest matr ixcalc multcomp mvtnorm R2HTML Rcmdr RcmdrPlugin.temis RColorBrewer RCurl relimp rgl rJava rjson RODBC RWeka RWekajars sem slam Snowball tm tm.plugin.factiva tw itteR XLConnect XLConnectJars XML zoo" make[1]: Entering directory `/cygdrive/c/Rbuild/R-2.15.2-64bit/src/gnuwin32/inst aller' rm -f -r R-2.15.2 echo "make.packages.html(.Library,temp=FALSE,verbose=FALSE)" | R-2.15.2/bin/x64/ Rterm.exe --vanilla --slave LC_COLLATE=C R-2.15.2/bin/x64/Rterm.exe: not found make[1]: [fixups] Error 127 make[1]: Waiting for unfinished jobs.... mkdir R-2.15.2 cp -pr ../../../bin ../../../modules R-2.15.2 mkdir -p R-2.15.2/library


METADATA

MichaelChirico commented 4 years ago

You missed the documentation: parallel make is only documented under 'building the core files'

It was 'silly' to assume that it was supported elsewhere (and lots of R packages cannot be installed with a parallel make, too).


METADATA

MichaelChirico commented 4 years ago

I know it was all my fault for wrongly assuming -j4 would not hurt, but this is part of small details that put together can take some time for people hacking on R.

GNU make documentation says: .NOTPARALLEL If .NOTPARALLEL is mentioned as a target, then this invocation of make will be run serially, even if the ‘-j’ option is given. Any recursively invoked make command will still run recipes in parallel (unless its makefile also contains this target). Any prerequisites on this target are ignored.

Would you accept a one-line patch that adds this target to src/gnuwin32/installer/Makefile?

Ideally, this would mean that make -j4 distribution would work, enabling parallelism where it is supported, and disabling it automatically where it is not.


METADATA