-dboost_foo (this is supposed to be in ALL CAPS)

Stan passes a few things to the compiler such as -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS, -DBOOST_NO_CXX11_RVALUE_REFERENCES. Is it known that we can eliminate all of those (except maybe -DBOOST_DISABLE_ASSERTS?) for 2.18?

No, it’s not known. Can you verify which flags can be omitted on Linux?

I can get Stan to work without them, although -DBOOST_DISABLE_ASSERTS is probably necessary for RStan because R checks for assert.o . I don’t think any of them were OS-specific.

Let me know what the minimum set is for Linux + R and I’ll verify that works on Mac. Once we do that, we can create an issue and a pull request.

I did: -DBOOST_DISABLE_ASSERTS

We do have to keep -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION in order to compile stanc though.

Do we keep both in for simplicity? Or should we have separate compiler arguments for the different targets?

Is that true for building an executable or is it just true for linking within RStan? (Out of curiosity)

stanc is built into the rstan.so / rstan.dll . I think anything with PHOENIX in it only pertains to the parser and it is probably not relevant whether it is defined when compiling or linking a model.

That is correct. It’s their functional framework which is used for the semantic actions in parser rules. Nothing’s going to be calling it from the model unless it’s being used inside of a boost math library function—Boost functions do like to include other lower-level boost functions from all across the package.