Error installing package quanteda and dependency RSpectra on rstudio.cloud - g++: internal compiler error: Killed (program cc1plus)

rstudiocloud
package-installation

#1
> install.packages("quanteda")
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘RSpectra’

trying URL 'http://package-proxy/src/contrib/RSpectra_0.13-1.tar.gz'
Content type 'application/gzip' length 111149 bytes (108 KB)
==================================================
downloaded 108 KB

trying URL 'http://package-proxy/src/contrib/quanteda_1.2.0.tar.gz'
Content type 'application/gzip' length 4081486 bytes (3.9 MB)
==================================================
downloaded 3.9 MB

* installing *source* package ‘RSpectra’ ...
** package ‘RSpectra’ successfully unpacked and MD5 sums checked
** libs
g++  -I/opt/R/3.4.4/lib/R/include -DNDEBUG -I../inst/include -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include" -I/usr/local/include   -fpic  -g -O2  -c eigs_gen.cpp -o eigs_gen.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
make: *** [eigs_gen.o] Error 4
/opt/R/3.4.4/lib/R/etc/Makeconf:168: recipe for target 'eigs_gen.o' failed
ERROR: compilation failed for package ‘RSpectra’
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/RSpectra’
Warning in install.packages :
  installation of package ‘RSpectra’ had non-zero exit status
ERROR: dependency ‘RSpectra’ is not available for package ‘quanteda’
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/quanteda’
Warning in install.packages :
  installation of package ‘quanteda’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/RtmpVegCe2/downloaded_packages’
> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

Matrix products: default
BLAS: /usr/lib/atlas-base/atlas/libblas.so.3.0
LAPACK: /usr/lib/atlas-base/atlas/liblapack.so.3.0

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
 [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
 [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4    yaml_2.1.19

#2

Generally speaking if you see the message

while a package is being compiled, the compilation exceeded the available memory.

We are working to both make more memory available and to build & cache more packages, but at this time there isn't a good work around when you hit this. Apologies.


#3

Too bad ... Thanks for the response.


#4

Good news, we were able to cache pre-built binary packages for RSpectra and quanteda.
Could you give it a try now please?


#5

Thank you :grinning: It works perfectly now.


#6

Is there anything special one needs to do to access the prebuilt packages? I also tried installing quanteda and got the same error:

install.packages("quanteda")


#7

There is nothing special one needs to do.

You do not appear to have included the error message you are encountering, just the console command you are running.


#8

I get the same g++: internal compiler error: Killed (program cc1plus) error as above and the package is clearly installed from source:

> install.packages("quanteda")
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'http://package-proxy/src/contrib/quanteda_1.3.0.tar.gz'
Content type 'application/gzip' length 4224707 bytes (4.0 MB)
==================================================
downloaded 4.0 MB

* installing *source* package ‘quanteda’ ...
** package ‘quanteda’ successfully unpacked and MD5 sums checked
** libs
g++ -std=gnu++11 -I/opt/R/3.4.4/lib/R/include -DNDEBUG -DARMA_DONT_PRINT_OPENMP_WARNING  -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/RcppParallel/include" -I"/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/RcppArmadillo/include" -I/usr/local/include  -DARMA_64BIT_WORD=1 -fpic  -g -O2 -c RcppExports.cpp -o RcppExports.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
make: *** [RcppExports.o] Error 4
/opt/R/3.4.4/lib/R/etc/Makeconf:168: recipe for target 'RcppExports.o' failed
ERROR: compilation failed for package ‘quanteda’
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/quanteda’
Warning in install.packages :
  installation of package ‘quanteda’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/RtmpAyS9RO/downloaded_packages’

I just checked, and saw that the last version was published on CRAN after you built the binary. So that might be the reason why RSpectra is installed from cache and quanteda is not :frowning_face:.


#9

Nope, new version of quanteda was released, so it needs to be built & cached. Check again in 30 minutes please.


#10

Something didn't go quite right, I'll update when I know for certain that 1.3.0 is cached.


#11

Ok, thanks. For future reference: is there a way to pre-build a package and upload it? The cloud is using Ubuntu 16.04, I'm using Ubuntu 18.04 so they shouldn't be too different?


#12

New version of quanteda is now cached.

We do not document nor officially support manually uploading pre-built packages, but I am sure you could figure out a way to finagle it.