Install Fails - R package Boom 0.9 on Ubuntu 18.04

Viewed 790

I'm unable to install Boom 0.9 on Ubuntu 18.04, Boom 0.8 installs without issue. However, we need 0.9 as a pre-req for CausalImpact.

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
/usr/lib/R/etc/Makeconf:176: recipe for target 'Models/Glm/PosteriorSamplers/fill_poisson_mixture_approximation_table_2.o' failed
make[1]: *** [Models/Glm/PosteriorSamplers/fill_poisson_mixture_approximation_table_2.o] Error 4
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/tmp/RtmpKl6J7B/R.INSTALL90e7ca998b2/Boom/src'
ERROR: compilation failed for package 'Boom'
* removing '/usr/local/lib/R/site-library/Boom'

The downloaded source packages are in
 '/tmp/RtmpIk7UFT/downloaded_packages'
Warning message:
In install.packages("Boom") : installation of one or more packages failed,
  probably 'Boom'

I've ensured that build-essential is up to date with the most current version available (and tried g++-8 as well).

3 Answers

Take a look at: https://cran.r-project.org/web/checks/check_results_Boom.html

The check page says 'GNU make' is a undeclared SystemRequirement.

Version: 0.9.1 Check: for GNU extensions in Makefiles Result: NOTE GNU make is a SystemRequirements.

Since your installation process also seems to fail at make[1] it might make sense to check if GNU make is installed.

I think someone else in your org may have already contacted me about this. We are mid-flight debugging.

Boom is a large package and can time out when building. The first thing to check is that you are able to build with multiple cores (i.e. you can pass the -j x flag to make).

As a diagnostic you can try building the package without involving R. Clone https://github.com/steve-the-bayesian/BOOM and build with either bazel (up to date) or make (not too far out of date). If this build succeeds then compare flags passed to the R build vs the native build.

To better understand where R is failing, download the Boom package from CRAN https://cran.r-project.org/src/contrib/Boom_0.9.1.tar.gz and try the following from the command line R CMD CHECK Boom_0.9.1.tar.gz

This will probably fail, but it will generate a directory called Boom.Rcheck, which contains a file 00install.out containing all the compiler output.

It is suspicious that the build above fails on the poisson_mixture_approximation_table, which is a large file that might be overflowing your stack. Or that might be a coincidence.

The installation of the Boom package from source (also during the Docker build) can fail for several reasons:

  • low memory pro core
  • low stack size
  • timeout of the build process (possible)

We are currently using the following setup for Docker:

  • core: 4
  • memory: 8GB

We can use the following command to set the stack size to 16MB before starting the installation:

Docker:

RUN ulimit -s 16384 \
    && R -e 'install.packages("Boom");'

Linux:

ulimit -s 16384 \
    && R -e 'install.packages("Boom");'

Note: The stack size is an operating system-related configuration and can vary depending on the host operating system used.

Note: The command to install the boom package may be different for your application. We use for example packrat.

Similar issue: link

Related