dahtah / imager

R package for image processing
GNU Lesser General Public License v3.0
187 stars 43 forks source link

Compilation error on Ubuntu 16.04 remote server #87

Closed konradmayer closed 5 years ago

konradmayer commented 5 years ago

I'm trying to install imager on a Ubuntu 16.04 remote machine, but facing compilation issues. All three listed dependencies are installed (though, I think libX11-dev is rather correctly named libx11-dev), I tried with the system default gcc-5 (resp. g++-5) as well as gcc-8 (and g++-8), compilation always stops at utils.o, heres the part with the error message:

g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG   -Dcimg_use_fftw3  -Dcimg_use_tiff -I../inst/include -DCIMG_COMPILING -Dcimg_use_rng -Dcimg_use_r -Dcimg_use_fftw3_singlethread -Dcimg_verbosity=1 -Dcimg_date='""' -Dcimg_time='""' -I"/usr/local/lib/R/site-library/Rcpp/include"    -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c utils.cpp -o utils.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.
/usr/lib/R/etc/Makeconf:168: recipe for target 'utils.o' failed
make: *** [utils.o] Error 4
ERROR: compilation failed for package ‘imager’
* removing ‘/usr/local/lib/R/site-library/imager’
Error: Command failed (1)
Execution halted

Any ideas? However, the package installs fine on my laptop - is there the possibility of a missing library due to the missing graphical desktop on the remote machine?

Thanks for the amazing package anyway!

R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS
ShotaOchi commented 5 years ago

Try running dmesg just after the installation failure. dmesg should show the reason for the error.

dahtah commented 5 years ago

I've never seen that error. I doesn't look like a missing library, more of a gcc bug (shouldn't crash like that). Try updating gcc, or switching to clang (by editing ~/.R/Makevars, see http://r-pkgs.had.co.nz/src.html).

konradmayer commented 5 years ago

dmesg revealed the problem: too little RAM on the server. Thanks for your support!