[solved] Gaussian process - Birthday case study doesn't compile on M1 Mac

Hello,

I tried to run the Birthday case study presented here : Bayesian workflow book - Birthdays (Code here: casestudies/Birthdays at master · avehtari/casestudies · GitHub)

However, the stan model doesn’t compile on my Mac. (it does compile on a PC with linux installed).

When trying to compile the model, I get the following error :

> model1 <- cmdstan_model(stan_file = root("Birthdays", "gpbf1.stan"),
+                         include_paths = root("Birthdays"))
Compiling Stan program...
/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:77:39: error: no member named 'is_vt_not_complex' in namespace 'stan'

                                stan::is_vt_not_complex<T3__>>* = nullptr>
                                ~~~~~~^
/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:77:57: error: 'T3__' does not refer to a value
                                stan::is_vt_not_complex<T3__>>* = nullptr>
                                                        ^
/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:74:37: note: declared here
  template <typename T2__, typename T3__,
                                    ^
/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:77:65: error: expected member name or ';' after declaration specifiers
                                stan::is_vt_not_complex<T3__>>* = nullptr>
                                                                ^

/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:86:39: error: no member named 'is_vt_not_complex' in namespace 'stan'
                                stan::is_vt_not_complex<T3__>>* = nullptr>
                                ~~~~~~^
/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:86:57: error: 'T3__' does not refer to a value
                                stan::is_vt_not_complex<T3__>>* = nullptr>
                                                        ^
/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:83:37: note: declared here
  template <typename T2__, typename T3__,
                                    ^
/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:86:65: error: expected member name or ';' after declaration specifiers
                                stan::is_vt_not_complex<T3__>>* = nullptr>
                                                                ^

/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:213:37: error: no member named 'is_vt_not_complex' in namespace 'stan'
                              stan::is_vt_not_complex<T3__>>* = nullptr>
                              ~~~~~~^
/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:213:55: error: 'T3__' does not refer to a value
                              stan::is_vt_not_complex<T3__>>* = nullptr>
                                                      ^
/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:210:35: note: declared here
template <typename T2__, typename T3__,
                                  ^
/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:213:63: error: expected unqualified-id
                              stan::is_vt_not_complex<T3__>>* = nullptr>
                                                              ^

/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:941:53: error: no type named 'gpbf1_model' in namespace 'gpbf1_model_namespace'
     }; } using stan_model = gpbf1_model_namespace::gpbf1_model;
                             ~~~~~~~~~~~~~~~~~~~~~~~^

/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:950:3: error: unknown type name 'stan_model'
  stan_model* m = new stan_model(data_context, seed, msg_stream);
  ^

/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a.hpp:950:23: error: unknown type name 'stan_model'
  stan_model* m = new stan_model(data_context, seed, msg_stream);
                      ^

12 errors generated.

make: *** [/var/folders/rj/qpt02tfx4zlgjdyxvr878g1w0000gp/T/Rtmp4vzprE/model-c367239d114a] Error 1

Error: An error occured during compilation! See the message above for more information.

I was wondering if it was linked to some specific library that needs to be install on M1 Mac ?

Here I am using Cmdstan 2.29.2

Edit: i re installed CmdStan fron scratch and it is working now. I guess there was some issue with my setup

Thanks a lot for your help,
Edouard