Closed santhisenan closed 2 years ago
Note: This issue went away when I tried it once more, however, posting here to know why it occurred.
I am trying to install R packages on Docker container using renv. I am getting the following error when it tries to install forecast package.
#15 1617.6 Installing forecast [8.15] ... #15 1681.7 FAILED #15 1681.7 Error installing package 'forecast': #15 1681.7 ==================================== #15 1681.7 #15 1681.7 * installing to library ‘/usr/local/lib/R/site-library/.renv/1’ #15 1681.7 * installing *source* package ‘forecast’ ... #15 1681.7 ** package ‘forecast’ successfully unpacked and MD5 sums checked #15 1681.7 ** using staged installation #15 1681.7 ** libs #15 1681.7 g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/.renv/1/Rcpp/include' -I'/usr/local/lib/R/site-library/.renv/1/RcppArmadillo/include' -fopenmp -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c calcBATS.cpp -o calcBATS.o #15 1681.7 g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/.renv/1/Rcpp/include' -I'/usr/local/lib/R/site-library/.renv/1/RcppArmadillo/include' -fopenmp -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c calcTBATS.cpp -o calcTBATS.o #15 1681.7 g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/.renv/1/Rcpp/include' -I'/usr/local/lib/R/site-library/.renv/1/RcppArmadillo/include' -fopenmp -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c etsTargetFunction.cpp -o etsTargetFunction.o #15 1681.7 g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/.renv/1/Rcpp/include' -I'/usr/local/lib/R/site-library/.renv/1/RcppArmadillo/include' -fopenmp -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c etsTargetFunctionWrapper.cpp -o etsTargetFunctionWrapper.o #15 1681.7 gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/.renv/1/Rcpp/include' -I'/usr/local/lib/R/site-library/.renv/1/RcppArmadillo/include' -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c etscalc.c -o etscalc.o #15 1681.7 gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/.renv/1/Rcpp/include' -I'/usr/local/lib/R/site-library/.renv/1/RcppArmadillo/include' -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c etspolyroot.c -o etspolyroot.o #15 1681.7 g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/.renv/1/Rcpp/include' -I'/usr/local/lib/R/site-library/.renv/1/RcppArmadillo/include' -fopenmp -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c makeBATSMatrices.cpp -o makeBATSMatrices.o #15 1681.7 g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/.renv/1/Rcpp/include' -I'/usr/local/lib/R/site-library/.renv/1/RcppArmadillo/include' -fopenmp -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c makeTBATSMatrices.cpp -o makeTBATSMatrices.o #15 1681.7 gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/.renv/1/Rcpp/include' -I'/usr/local/lib/R/site-library/.renv/1/RcppArmadillo/include' -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c registerDynamicSymbol.c -o registerDynamicSymbol.o #15 1681.7 g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/.renv/1/Rcpp/include' -I'/usr/local/lib/R/site-library/.renv/1/RcppArmadillo/include' -fopenmp -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c updateMatrices.cpp -o updateMatrices.o #15 1681.7 g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/.renv/1/Rcpp/include' -I'/usr/local/lib/R/site-library/.renv/1/RcppArmadillo/include' -fopenmp -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/buster/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c updateTBATSMatrices.cpp -o updateTBATSMatrices.o #15 1681.7 g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-z,relro -o forecast.so calcBATS.o calcTBATS.o etsTargetFunction.o etsTargetFunctionWrapper.o etscalc.o etspolyroot.o makeBATSMatrices.o makeTBATSMatrices.o registerDynamicSymbol.o updateMatrices.o updateTBATSMatrices.o -fopenmp -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR #15 1681.7 installing to /usr/local/lib/R/site-library/.renv/1/00LOCK-forecast/00new/forecast/libs #15 1681.7 ** R #15 1681.7 ** data #15 1681.7 *** moving datasets to lazyload DB #15 1681.7 ** inst #15 1681.7 ** byte-compile and prepare package for lazy loading #15 1681.7 ** help #15 1681.7 *** installing help indices #15 1681.7 *** copying figures #15 1681.7 ** building package indices #15 1681.7 ** installing vignettes #15 1681.7 ** testing if installed package can be loaded from temporary location #15 1681.7 ** checking absolute paths in shared objects and dynamic libraries #15 1681.7 ** testing if installed package can be loaded from final location #15 1681.7 Error in base::serialize(base::as.list(base::getNamespace("forecast"), : #15 1681.7 error writing to connection #15 1681.7 Calls: <Anonymous> -> withCallingHandlers -> <Anonymous> #15 1681.7 Execution halted #15 1681.7 ERROR: loading failed #15 1681.7 * removing ‘/usr/local/lib/R/site-library/.renv/1/forecast’ #15 1681.7 Error: install of package 'forecast' failed [error code 1] #15 1681.7 Traceback (most recent calls last): #15 1681.7 12: renv::restore(exclude = c("renv"), repos = c(CRAN = "https://cran.rstudio.com")) #15 1681.7 11: renv_restore_run_actions(project, diff, current, lockfile, rebuild) #15 1681.7 10: renv_install_impl(records) #15 1681.7 9: renv_install_staged(records) #15 1681.7 8: renv_install_default(records) #15 1681.7 7: handler(package, renv_install_package(record)) #15 1681.7 6: renv_install_package(record) #15 1681.7 5: withCallingHandlers(renv_install_package_impl(record), error = function(e) { #15 1681.7 vwritef("\tFAILED") #15 1681.7 writef(e$output) #15 1681.7 }) #15 1681.7 4: renv_install_package_impl(record) #15 1681.7 3: r_cmd_install(package, path) #15 1681.7 2: r_exec_error(package, output, "install", status) #15 1681.7 1: stop(error) #15 1683.1 Execution halted
I am using R 4.1.0 inside a python 3.8-slim-buster container.
Are you able to install other packages which require compiled code? This looks like an issue with your docker container configuration rather than the forecast package.
Note: This issue went away when I tried it once more, however, posting here to know why it occurred.
I am trying to install R packages on Docker container using renv. I am getting the following error when it tries to install forecast package.
Error Logs
Environment
I am using R 4.1.0 inside a python 3.8-slim-buster container.