Yes, I can compile the bernoulli example (with some warnings --attached)
out_bernoulli.txt (6.9 KB)
.
But when I try to compile the program I’ve been working on (successfully in linux) I get this:
dyld[11321]: Symbol not found: __ZN3tbb4task13note_affinityEt
Referenced from: <63B31670-278D-327A-A846-260BB2F10B0E> /Users/sergio/wk/2023/2023_sr_rsv/rsv/model/stan/sim_scaled_varparam_8L
Expected in: <A90D8AB4-F232-3892-B6A7-4198FF713629> /Users/sergio/miniconda3/envs/main/lib/libtbb.12.8.dylib
Should I try to compose a minimal example?
Very sorry, I copied the wrong output
bin/stanc --o=/Users/sergio/wk/2023/2023_sr_rsv/rsv/model/stan/sim_scaled_varparam_8L.hpp /Users/sergio/wk/2023/2023_sr_rsv/rsv/model/stan/sim_scaled_varparam_8L.stan
--- Compiling, linking C++ code ---
arm64-apple-darwin20.0.0-clang++ -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/sergio/miniconda3/envs/main/include -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -D_FORTIFY_SOURCE=2 -isystem /Users/sergio/miniconda3/envs/main/include -DBOOST_DISABLE_ASSERTS -c -include-pch stan/src/stan/model/model_header_14_0.hpp.gch -x c++ -o /Users/sergio/wk/2023/2023_sr_rsv/rsv/model/stan/sim_scaled_varparam_8L.o /Users/sergio/wk/2023/2023_sr_rsv/rsv/model/stan/sim_scaled_varparam_8L.hpp
error: PCH file uses a newer PCH format that cannot be read
1 error generated.
make: *** [make/program:58: /Users/sergio/wk/2023/2023_sr_rsv/rsv/model/stan/sim_scaled_varparam_8L] Error 1
It sounds like your environment might have a mix of conda-installed libraries/compilers/etc and apple native ones, which I would bet is the source of the headache. Conda will set a lot of environment variables which affect compilation
1 Like
Many thanks @WardBrian,
Outside the conda environment cmdstan works!
The installation instructions are accurate.
Thanks to you and the other developers for creating and maintaining Stan.
1 Like