CmdStan installation error

I’m installing CmdStan on our university HPC. I’m following the installation guide of cmdstanr.

I can install cmdstanr, but fail to install cmdstan by using the command install_cmdstan(cores = 2). I got the following error messages. Very much appreciate if you could advise how to solve this issue.

stan/lib/stan_math/stan/math/prim/fun/size.hpp:17:15: note:   template argument deduction/substitution failed:
In file included from stan/lib/stan_math/stan/math/prim/err/check_bounded.hpp:10:0,
                 from stan/lib/stan_math/stan/math/prim/err.hpp:6,
                 from stan/lib/stan_math/stan/math/prim.hpp:8,
                 from stan/src/stan/io/stan_csv_reader.hpp:5,
                 from stan/src/stan/mcmc/chains.hpp:4,
                 from src/cmdstan/stansummary_helper.hpp:4,
                 from src/cmdstan/stansummary.cpp:1:
stan/lib/stan_math/stan/math/prim/fun/size_zero.hpp:19:17: note:   couldn't deduce template parameter ‘<anonymous>’
   return !size(x);
                 ^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-ignored-attributes" [enabled by default]
make: *** [bin/cmdstan/stansummary.o] Error 1
make: *** Waiting for unfinished jobs....

Warning message:
There was a problem during installation. See the error message(s) above.

What compiler do you have?

gcc --version
1 Like

gcc might be too old?

gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright © 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Yes, rstan and cmdstan both require at minimum gcc/g++ 4.9.3.

3 Likes