in cmdstan, failing to do a make stan-update
whenever the math lib changes causes problems with the precompiled headers file - see error message below.
I think I’ve also hit similar error when developing/testing stuff in core Stan - there the problem is that cmdstan creates the file stan/src/stan/model/model_header.hpp.gch
and there’s nothing in the core Stan makefile that gets rid of it.
@seantalts - why precompiled headers? how will this change when we go to monorepo?
--- Compiling pre-compiled header ---
clang++ -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -O3 -I src -I stan/src -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.66.0 -I stan/lib/stan_math/lib/sundials_3.1.0/include -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -c stan/src/stan/model/model_header.hpp -o stan/src/stan/model/model_header.hpp.gch
In file included from stan/src/stan/model/model_header.hpp:8:
stan/src/stan/io/reader.hpp:709:16: error: no member named 'locscale_constrain' in namespace 'stan::math'; did you mean
'scalar_constrain'?
return stan::math::locscale_constrain(scalar(), loc, scale);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scalar_constrain
stan/src/stan/io/reader.hpp:180:9: note: 'scalar_constrain' declared here
T scalar_constrain(T& /*log_prob*/) {
^
stan/src/stan/io/reader.hpp:727:16: error: no member named 'locscale_constrain' in namespace 'stan::math'; did you mean
'scalar_constrain'?
return stan::math::locscale_constrain(scalar(), loc, scale, lp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scalar_constrain
stan/src/stan/io/reader.hpp:180:9: note: 'scalar_constrain' declared here
T scalar_constrain(T& /*log_prob*/) {
^
In file included from stan/src/stan/model/model_header.hpp:9:
stan/src/stan/io/writer.hpp:179:39: error: no member named 'locscale_free' in namespace 'stan::math'
data_r_.push_back(stan::math::locscale_free(y, loc, scale));
~~~~~~~~~~~~^
3 errors generated.
make: *** [stan/src/stan/model/model_header.hpp.gch] Error 1
~/github/stan-dev/cmdstan (develop)>