Installation error under macOS Big Sur

Short summary of the problem

I installed the brms package for R and tried to run some code examples.
The installation worked but the code is not running.
The following error message appears:

Compiling Stan program…
make cmd is
make -f ‘/Library/Frameworks/R.framework/Resources/etc/Makeconf’ -f ‘/Library/Frameworks/R.framework/Resources/share/make/shlib.mk’ CXX=’(CXX14) (CXX14STD)’ CXXFLAGS=’(CXX14FLAGS)' CXXPICFLAGS='(CXX14PICFLAGS)’ SHLIB_LDFLAGS=’(SHLIB_CXX14LDFLAGS)' SHLIB_LD='(SHLIB_CXX14LD)’ SHLIB=‘file13007bd7eee3.so’ OBJECTS=‘file13007bd7eee3.o’

make would use
clang++ -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp’ -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c file13007bd7eee3.cpp -o file13007bd7eee3.o
if test “zfile13007bd7eee3.o” != “z”; then
echo clang++ -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L"/Library/Frameworks/R.framework/Resources/lib" -L/usr/local/lib -o file13007bd7eee3.so file13007bd7eee3.o ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/lib//libStanServices.a’ -L’/Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/lib/’ -lStanHeaders -L’/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppParallel/lib/’ -ltbb -F/Library/Frameworks/R.framework/… -framework R -Wl,-framework -Wl,CoreFoundation;
clang++ -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L"/Library/Frameworks/R.framework/Resources/lib" -L/usr/local/lib -o file13007bd7eee3.so file13007bd7eee3.o ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/lib//libStanServices.a’ -L’/Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/lib/’ -lStanHeaders -L’/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppParallel/lib/’ -ltbb -F/Library/Frameworks/R.framework/… -framework R -Wl,-framework -Wl,CoreFoundation;
fi
Fehler in compileCode(f, code, language = language, verbose = verbose) :
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/unsupported/Eigen/SparseExtra:51:/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/unsupported/Eigen/…/…/Eigen/src/Core/util/ReenableStupidWarnings.h:14:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^20 warnings and 1 error generated.make: *** [file13007bd7eee3.o] Error 1
Fehler in sink(type = “output”) : ungültige Verbindung

code_to_run_your_model:


library(lme4)
library(brms)

prior1 <- c(
  prior(normal(200, 10), class = Intercept),
  prior(normal(0, 10), class = b, coef = Days),
  prior(cauchy(0, 10), class = sigma),
  prior(lkj(2), class = cor)
)

mod1 <- brm(
  Reaction ~ Days + (1 + Days | Subject),
  data = sleepstudy,
  family = gaussian(),
  prior = prior1,
  warmup = 2000, iter = 1e4,
  chains = 2
)

  • Operating System: macOS Big Sur Version 11.4
  • brms Version: 2.15.9

Hello Ulrike,

I just recently (yesterday) re-installed R (R-Studio installation file) as well as brms (from GitHub: https://github.com/paul-buerkner/brms) because of errors after updating my package-library.

I would try to see If I could run your code but would you mind sharing the data somewhere?

Cheers,
JFM