CmdStan broken now?

Help. @seantalts, @wds15: I can’t take the current state of develop and build any Stan program.

make build

results in pages of compiler errors like:

  "___cxa_throw", referenced from:
      stan::lang::parse(std::__1::basic_ostream<char, std::__1::char_traits<char> >*, std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, stan::io::program_reader const&, stan::lang::program&, bool) in stanc.o
      std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::reserve(unsigned long) in stanc.o
      stanc_helper(int, char const**, std::__1::basic_ostream<char, std::__1::char_traits<char> >*, std::__1::basic_ostream<char, std::__1::char_traits<char> >*) in stanc.o
      stan::io::program_reader::read(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, int&, bool, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&) in stanc.o
      std::__1::basic_filebuf<char, std::__1::char_traits<char> >::seekoff(long long, std::__1::ios_base::seekdir, unsigned int) in stanc.o
      std::__1::basic_filebuf<char, std::__1::char_traits<char> >::sync() in stanc.o
      std::__1::basic_filebuf<char, std::__1::char_traits<char> >::underflow() in stanc.o
      ...
  "___gxx_personality_v0", referenced from:
      std::__1::vector<stan::lang::expression, std::__1::allocator<stan::lang::expression> >::~vector() in stanc.o
      stan::lang::fun_scalar_type(stan::lang::function_decl_def const&, bool) in stanc.o
      stan::lang::generate_indexed_expr_user(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<stan::lang::expression, std::__1::allocator<stan::lang::expression> >, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in stanc.o
      stan::lang::generate_expression(stan::lang::expression const&, bool, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in stanc.o
      stan::lang::generate_eigen_index_expression(stan::lang::expression const&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in stanc.o
      stan::lang::generate_initializer(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<stan::lang::expression, std::__1::allocator<stan::lang::expression> > const&, stan::lang::expression const&, stan::lang::expression const&) in stanc.o
      stan::lang::generate_quoted_expression(stan::lang::expression const&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in stanc.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bin/stanc] Error 1

I’m trying to fix some bugs and this is making it tough. Is someone currently tasked to fixing CmdStan? Is there a pull request open to fix this?

Yeah, I noticed this the other day (and so did the CmdStan Performance Tests, but I apparently didn’t configure email appropriately for that yet). The PR in which I was asking for your help should fix this - https://github.com/stan-dev/cmdstan/pull/629. Maybe we can continue the conversation there?

Yup. Thanks. This is high priority.

I just approved the PR. I don’t think there’s much discussion to do on that PR.

If this gets pulled in, does CmdStan still work for Linux and Windows? (with the standard install)

It should work again, yes.

Our makefiles are in a not too good state… (we use the C compile commands to compile C++ code; not sure why).

This was a holdout from pre-1.0. I’ve tried to fix it a few times, but it’s always disruptive to users to change conventions. And… it’s also hard to fix so it’s correct on 3 platforms.

We should change it if we can. There’s an open PR on math that fixes it all at the math level. We can change CmdStan independently. I think we should since we’re now in this weird state where we have optional config for MPI and GPU.

@seantalts, will it be easier to tell when things are broken? It’s really, really disruptive when I can’t trust develop to work off of (for CmdStan, Stan, and Math). It’s fine if it’s for a short period where we’re orchestrating a few PRs across repos, but a note saying that we are would help? Btw, monorepo helps a bit, but doesn’t actually solve this problem.