stan-dev / stan-dev/rstan

Fail to install RStan on Red Hat Enterprise Linux Server release 6.6 (Santiago)

Open
#457 3 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

Summary:

I have downloaded all needed packages and try to install Rstan on a server (Red Hat Enterprise Linux Server release 6.6 (Santiago)) without internet access but it fails

Description:

I have all packages in a folder (SOURCEFOLDER)

BH_1.65.0-1.tar.gz
colorspace_1.3-2.tar.gz
dichromat_2.0-0.tar.gz
digest_0.6.12.tar.gz
ggplot2_2.2.1.tar.gz
gridExtra_2.3.tar.gz
gtable_0.2.0.tar.gz
inline_0.3.14.tar.gz
labeling_0.3.tar.gz
lattice_0.20-35.tar.gz
lazyeval_0.2.0.tar.gz
magrittr_1.5.tar.gz
MASS_7.3-47.tar.gz
Matrix_1.2-11.tar.gz
munsell_0.4.3.tar.gz
PACKAGES
PACKAGES.gz
plyr_1.8.4.tar.gz
R6_2.2.2.tar.gz
RColorBrewer_1.1-2.tar.gz
Rcpp_0.12.13.tar.gz
RcppEigen_0.3.3.3.0.tar.gz
reshape2_1.4.2.tar.gz
rlang_0.1.2.tar.gz
rstan_2.16.2.tar.gz
scales_0.5.0.tar.gz
StanHeaders_2.16.0-1.tar.gz
stringi_1.1.5.tar.gz
stringr_1.2.0.tar.gz
tibble_1.3.4.tar.gz
viridisLite_0.2.0.tar.gz

I run tools::write_PACKAGES(SOURCEFOLDER).

I made ~/.R/Makevars -file and added following there. Found it in some similar error:
"
CXX_STD = CXX11

CXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION
"

Then I run install.packages("rstan", contriburl = "file://SOURCEFOLDER", lib = "mylibraryfolder", repos=NULL)

Then I get the following output

  • installing source package ‘rstan’ ...
    ** package ‘rstan’ successfully unpacked and MD5 sums checked
    ** libs
    g++ -m64 -I/usr/include/R -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I""/usr/lib64/R/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/usr/local/include -I"/opt/sasdata/sasfolders/analysts/public/R/dev/Rcpp/include" -I"/opt/sasdata/sasfolders/analysts/public/R/dev/RcppEigen/include" -I"/opt/sasdata/sasfolders/analysts/public/R/dev/BH/include" -I"/opt/sasdata/sasfolders/analysts/public/R/dev/StanHeaders/include" -fpic -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -c chains.cpp -o chains.o
    g++ -m64 -I/usr/include/R -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I""/usr/lib64/R/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/usr/local/include -I"/opt/sasdata/sasfolders/analysts/public/R/dev/Rcpp/include" -I"/opt/sasdata/sasfolders/analysts/public/R/dev/RcppEigen/include" -I"/opt/sasdata/sasfolders/analysts/public/R/dev/BH/include" -I"/opt/sasdata/sasfolders/analysts/public/R/dev/StanHeaders/include" -fpic -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -c init.cpp -o init.o
    g++ -m64 -I/usr/include/R -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I""/usr/lib64/R/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/usr/local/include -I"/opt/sasdata/sasfolders/analysts/public/R/dev/Rcpp/include" -I"/opt/sasdata/sasfolders/analysts/public/R/dev/RcppEigen/include" -I"/opt/sasdata/sasfolders/analysts/public/R/dev/BH/include" -I"/opt/sasdata/sasfolders/analysts/public/R/dev/StanHeaders/include" -fpic -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -c lang__ast_def.cpp -o lang__ast_def.o
    In file included from /opt/sasdata/sasfolders/analysts/public/R/dev/StanHeaders/include/src/stan/lang/ast.hpp:68,
    from /opt/sasdata/sasfolders/analysts/public/R/dev/StanHeaders/include/src/stan/lang/ast_def.cpp:7,
    from lang__ast_def.cpp:18:
    /opt/sasdata/sasfolders/analysts/public/R/dev/StanHeaders/include/src/stan/lang/ast/node/conditional_op.hpp:40: error: ISO C++ forbids initialization of member ‘has_var_’
    /opt/sasdata/sasfolders/analysts/public/R/dev/StanHeaders/include/src/stan/lang/ast/node/conditional_op.hpp:40: error: making ‘has_var_’ static
    /opt/sasdata/sasfolders/analysts/public/R/dev/StanHeaders/include/src/stan/lang/ast/node/conditional_op.hpp:40: error: ISO C++ forbids in-class initialization of non-const static member ‘has_var_’
    make: *** [lang__ast_def.o] Error 1
    ERROR: compilation failed for package ‘rstan’

I get the following output

Reproducible Steps:

Please report steps to reproduce the issue. If it's not possible to reproduce, please include a description of how you discovered the issue.

If you have a reproducible example, please include it.

R Version:

"R version 3.3.3 (2017-03-06)"

Operating System:

Red Hat Enterprise Linux Server release 6.6 (Santiago)

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 with the reported install.packages command, ~/.R/Makevars, and the compiler output for StanHeaders/include/src/stan/lang/ast/node/conditional_op.hpp. Check the R 3.3.3, RStan 2.16.2, StanHeaders 2.16.0-1, and Red Hat Enterprise Linux 6.6 combination, then reproduce the source installation offline. Done means identifying a supported compatibility or build configuration that allows rstan to compile successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, r
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.