Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu ERROR: compilation failed for package 'rstan' * removing ~/R/ #713

Open
ghost opened this issue Nov 7, 2019 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Nov 7, 2019

Summary:

Please provide a short summary (no more than a sentence or two).
Rstan fails to install rstan when installing from the command line.

Description:

I have launched an interactive bash terminal in a docker container running Ubuntu Bionic 18.04. I have installed Rstudio and can call R from the command line. in the R CLI I call install.packages("rstan") command and the majority of the dependencies install. However, make fails when trying to make the target 'stan/lang/grammars/statement_grammar_inst.o' and exits with Error code 4

Also when looking for the README.Bugs files, See file:///usr/share/doc/gcc-7/README.Bugs for instructions., it does not exist in the given file location on my container.

Reproducible Steps:

# Get basic kernel OS image
FROM ubuntu

# make a new user
RUN adduser username && usermod -aG sudo username
RUN su - username

## install debian packages
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
libxml2-dev \
libcairo2-dev \
libsqlite3-dev \
libmariadbd-dev \
libpq-dev \
libssh2-1-dev \
unixodbc-dev \
libcurl4-openssl-dev \
libssl-dev \
gnupg2

## create directories
RUN mkdir -p /home/R/data
RUN mkdir -p /home/R/code
RUN mkdir -p /home/R/output

# Get rstudio to use markdown
FROM rocker/rstudio:3.6.1
FROM jrnold/rstan

# Install dependencies
COPY dependencies/install_packages.R /home/R/install_packages.R

# necessary to view rstudio outputs
ENV PASSWORD 

# set the working diretory in the container to /home/R
WORKDIR /home/R

# run install file for R.
RUN Rscript install_packages.R

Current Output:

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:168: recipe for target 'stan/lang/grammars/statement_grammar_inst.o' failed
make: *** [stan/lang/grammars/statement_grammar_inst.o] Error 4
ERROR: compilation failed for package 'rstan'
* removing '/home/dakarai/R/../3.4/rstan'

The downloaded source packages are in
	'/tmp/Rtmpt9vHb0/downloaded_packages'
Warning message:
In install.packages("rstan") :
  installation of package 'rstan' had non-zero exit status

RStan Version:

The version of RStan you are running (e.g., from packageVersion("rstan"))

R Version:

The version of R you are running (e.g., from R.version.string)

Operating System:

Mac OS Catalina

@bgoodri
Copy link
Contributor

bgoodri commented Jan 10, 2020

You ran out of RAM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant