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

Question: Compile errors #120

Open
Zhuk66 opened this issue Nov 13, 2020 · 0 comments
Open

Question: Compile errors #120

Zhuk66 opened this issue Nov 13, 2020 · 0 comments

Comments

@Zhuk66
Copy link

Zhuk66 commented Nov 13, 2020

I am trying to install rstan with Microsoft R Open 4.0.2 on Red Hat Enterprise Linux 7 and getting compile errors.
Somehow Microsoft copyright message is being appended to g++ compiler options. I modified the Makevars file by adding a --quite key to Rscript options, i.e.:
PKG_CPPFLAGS += $(shell "${R_HOME}/bin/Rscript" --quiet -e "RcppParallel::CxxFlags()")
It compiled after that, but this kind of solution is not acceptable. How can I compile and
install rstan without modifying Makevars?

Output:

  • installing source package ‘rstan’ ...
    ** package ‘rstan’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    g++ -I/.../4.0.2/lib64/R/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"."
    -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -DBOOST_NO_AUTO_PTR -D_REENTRANT -DSTAN_THREADS
    Microsoft R Open 4.0.2 The enhanced R distribution from Microsoft Microsoft packages Copyright (C)
    2020 Microsoft Corporation Using the Intel MKL for parallel mathematical computing(using 4 cores).
    Default CRAN mirror snapshot taken on . See: https://mran.microsoft.com/.

    -I'/.../4.0/2020-10-16/cran/Rcpp/include' -I'/.../4.0/2020-10-16/cran/RcppEigen/include'
    -I'/.../4.0/2020-10-16/cran/BH/include' -I'/.../4.0/2020-10-16/cran/StanHeaders/include'
    -I'/.../4.0/2020-10-16/cran/RcppParallel/include' -DU_STATIC_IMPLEMENTATION -O3 -fPIC
    -c chains.cpp -o chains.o
    /bin/bash: -c: line 0: syntax error near unexpected token `('
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