Not sure why i’m getting these errors on compilation when I have the C standard library installed on my computer in /usr/include/c++/5…
Long story short, it can’t find string and cstddef.
In file included from stan/src/stan/command/stanc_helper.hpp:4:
stan/src/stan/version.hpp:4:stan/src/stan/io/read_line.hpp:4:10: fatal error: 'istream' 10file: not foundfatal error
: #include <istream>'string' file not found
#include <string>
^~~~~~~~~
^~~~~~~~
In file included from stan/src/stan/lang/grammars/expression07_grammar_inst.cpp:1:
In file included from stan/src/stan/lang/grammars/expression07_grammar_def.hpp:6:
In file included from stan/lib/stan_math/lib/boost_1.64.0/boost/spirit/include/qi.hpp:16:
In file included from stan/lib/stan_math/lib/boost_1.64.0/boost/spirit/home/qi.hpp:14:
In file included from stan/lib/stan_math/lib/boost_1.64.0/boost/spirit/home/qi/action.hpp:14:
In file included from stan/lib/stan_math/lib/boost_1.64.0/boost/spirit/home/qi/action/action.hpp:14:
In file included from stan/lib/stan_math/lib/boost_1.64.0/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from stan/lib/stan_math/lib/boost_1.64.0/boost/spirit/home/support/meta_compiler.hpp:15:
In file included from stan/lib/stan_math/lib/boost_1.64.0/boost/config.hpp:44:
stan/lib/stan_math/lib/boost_1.64.0/boost/config/select_stdlib_config.hpp:18:12: fatal error:
'cstddef' file not found
# include <cstddef>
^~~~~~~~~
In file included from stan/src/stan/lang/grammars/statement_grammar_inst.cpp:1:
In file included from stan/src/stan/lang/grammars/statement_grammar_def.hpp:4:
In file included from stan/src/stan/lang/ast.hpp:5:
stan/src/stan/lang/ast/expr_type.hpp:5:10: fatal error: 'cstddef' file not found
#include <cstddef>
^~~~~~~~~
1 error generated.
makefile:86: recipe for target 'bin/cmdstan/stanc.o' failed
make: *** [bin/cmdstan/stanc.o] Error 1
make: *** Waiting for unfinished jobs....
1 error generated.
make/libstan:9: recipe for target 'bin/stan/lang/grammars/program_grammar_inst.o' failed
make: *** [bin/stan/lang/grammars/program_grammar_inst.o] Error 1
1 error generated.
make/libstan:9: recipe for target 'bin/stan/lang/grammars/expression07_grammar_inst.o' failed
make: *** [bin/stan/lang/grammars/expression07_grammar_inst.o] Error 1
1 error generated.
make/libstan:9: recipe for target 'bin/stan/lang/grammars/statement_grammar_inst.o' failed
make: *** [bin/stan/lang/grammars/statement_grammar_inst.o] Error 1
@bbbales2 thanks though I don’t understand what you were asking.
Anyways! It turns out I need to install a package called libc++-dev for building it with clang++. Is there an instruction for linux users to get the essentials for building cmdstan? And I don’t understand installing rstan went ok (rstan is not using libc++?)