Created
August 20, 2018 09:41
-
-
Save infotroph/bf522f5959a0ff709377919131bf23d8 to your computer and use it in GitHub Desktop.
R package installation errors inside parallel make
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@7c782f3c2892:~# cat Makefile | |
all: | |
Rscript -e 'install.packages("getPass", type = "source")' | |
root@7c782f3c2892:~# make | |
Rscript -e 'install.packages("getPass", type = "source")' | |
Installing package into '/usr/local/lib/R/site-library' | |
(as 'lib' is unspecified) | |
trying URL 'https://cloud.r-project.org/src/contrib/getPass_0.2-2.tar.gz' | |
Content type 'application/x-gzip' length 252439 bytes (246 KB) | |
================================================== | |
downloaded 246 KB | |
* installing *source* package 'getPass' ... | |
** package 'getPass' successfully unpacked and MD5 sums checked | |
** libs | |
make[1]: Entering directory '/tmp/RtmpdaoLvU/R.INSTALL2e1a472ebede/getPass/src' | |
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c getPass_native.c -o getPass_native.o | |
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c readline_masked.c -o readline_masked.o | |
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o getPass.so getPass_native.o readline_masked.o -L/usr/lib/R/lib -lR | |
make[1]: Leaving directory '/tmp/RtmpdaoLvU/R.INSTALL2e1a472ebede/getPass/src' | |
installing to /usr/local/lib/R/site-library/getPass/libs | |
** R | |
** inst | |
** byte-compile and prepare package for lazy loading | |
** help | |
*** installing help indices | |
** building package indices | |
** installing vignettes | |
'getPass.Rnw' | |
** testing if installed package can be loaded | |
* DONE (getPass) | |
The downloaded source packages are in | |
'/tmp/RtmpG8hgcL/downloaded_packages' | |
root@7c782f3c2892:~# make -j2 | |
Rscript -e 'install.packages("getPass", type = "source")' | |
Installing package into '/usr/local/lib/R/site-library' | |
(as 'lib' is unspecified) | |
trying URL 'https://cloud.r-project.org/src/contrib/getPass_0.2-2.tar.gz' | |
Content type 'application/x-gzip' length 252439 bytes (246 KB) | |
================================================== | |
downloaded 246 KB | |
* installing *source* package 'getPass' ... | |
** package 'getPass' successfully unpacked and MD5 sums checked | |
** libs | |
make[1]: Entering directory '/tmp/RtmpiyhZvZ/R.INSTALL2e436a8b454d/getPass/src' | |
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c getPass_native.c -o getPass_native.o | |
make[1]: *** read jobs pipe: No such file or directory. Stop. | |
make[1]: *** Waiting for unfinished jobs.... | |
make[1]: Leaving directory '/tmp/RtmpiyhZvZ/R.INSTALL2e436a8b454d/getPass/src' | |
ERROR: compilation failed for package 'getPass' | |
* removing '/usr/local/lib/R/site-library/getPass' | |
* restoring previous '/usr/local/lib/R/site-library/getPass' | |
The downloaded source packages are in | |
'/tmp/RtmpVBb9Q3/downloaded_packages' | |
Warning message: | |
In install.packages("getPass", type = "source") : | |
installation of package 'getPass' had non-zero exit status | |
root@7c782f3c2892:~# | |
root@7c782f3c2892:~# uname -a | |
Linux 7c782f3c2892 4.9.93-linuxkit-aufs #1 SMP Wed Jun 6 16:55:56 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux | |
root@7c782f3c2892:~# make --version | |
GNU Make 4.1 | |
Built for x86_64-pc-linux-gnu | |
Copyright (C) 1988-2014 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. | |
root@7c782f3c2892:~# Rscript -e 'devtools::session_info()' | |
Session info ------------------------------------------------------------------ | |
setting value | |
version R version 3.4.4 (2018-03-15) | |
system x86_64, linux-gnu | |
ui X11 | |
language (EN) | |
collate C | |
tz Europe/Amsterdam | |
date 2018-08-20 | |
Packages ---------------------------------------------------------------------- | |
package * version date source | |
base * 3.4.4 2018-04-21 local | |
compiler 3.4.4 2018-04-21 local | |
datasets * 3.4.4 2018-04-21 local | |
devtools 1.13.6 2018-06-27 CRAN (R 3.4.4) | |
digest 0.6.15 2018-01-28 CRAN (R 3.4.4) | |
graphics * 3.4.4 2018-04-21 local | |
grDevices * 3.4.4 2018-04-21 local | |
memoise 1.1.0 2017-04-21 CRAN (R 3.4.4) | |
methods 3.4.4 2018-04-21 local | |
stats * 3.4.4 2018-04-21 local | |
utils * 3.4.4 2018-04-21 local | |
withr 2.1.2 2018-03-15 CRAN (R 3.4.4) | |
root@7c782f3c2892:~# |
Long story short: For reasons I don't fully understand, prepending a +
character before each Make recipe line that produces an install.packages
call seems to usually be sufficient to fix this.
all:
+ Rscript -e 'install.packages("getPass", type = "source")'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Same as above comment, in debug mode: