stan-dev / stan-dev/rstan

building fails on arch linux with no error message despite verbose=TRUE

Open
#466 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

Description:

I followed the suggested build instructions at https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Mac-or-Linux. But the build fails with no actionable error message, even with verbose=TRUE.

Reproducible Steps:
dotR <- file.path(Sys.getenv("HOME"), ".R")
if (!file.exists(dotR)) dir.create(dotR)
M <- file.path(dotR, "Makevars")
if (!file.exists(M)) file.create(M)
cat("\nCXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function", 
    file = M, sep = "\n", append = TRUE)

library(devtools)
Sys.setenv(MAKEFLAGS = "-j4")
# installs deps, but rstan fails:
install.packages("rstan", repos = "https://cloud.r-project.org/", dependencies=TRUE)
# so try verbose build from source
install.packages("rstan", type = "source", quiet=FALSE, verbose=TRUE)
Current Output:
Installing package into ‘/home/bjorn/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
system (cmd0): /usr/lib64/R/bin/R CMD INSTALL
foundpkgs: rstan, /tmp/Rtmpf4QkoH/downloaded_packages/rstan_2.16.2.tar.gz
files: /tmp/Rtmpf4QkoH/downloaded_packages/rstan_2.16.2.tar.gz
Warning message in install.packages("rstan", type = "source", quiet = FALSE, verbose = TRUE):
“installation of package ‘rstan’ had non-zero exit status”
Expected Output:

The actual command that had "non-zero exit", and its output, so there is any chance to debug it.

RStan Version:

Rstan 2.16.2

R Version:

R 3.4.2

Operating System:

Arch Linux
gcc 7.2 (The compiler builds cmdstan and Rcpp successfully)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the source installation on Arch Linux with RStan 2.16.2 and the shown MAKEFLAGS and verbose settings. Trace the R CMD INSTALL invocation and determine where the non-zero exit output is lost; done means the failing command and its diagnostic output are exposed to the user.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.