Hello,
I am failing to properly install brms on my macBook Pro and do not know how to solve this problem on my own. I updated to Big Sur (11.2.3) and to make sure that brms would work, I set it up on the ‘naked’ system and it worked okay (threw some warning message, but could create models).
However, when I copied all my data, software and settings from my old macBook, brms does not work anymore. I uninstalled R, Rstudio, XCode and reinstalled with the newest versions. Still, I get stuck when I want to run a model. The output is the following in combination with an R popup window:
“Compiling Stan program…
sh: clang++ -mmacosx-version-min=10.13: command not found
The NEXT version of Stan will not be able to pre-process your Stan program.
Please open an issue at
Issues · stan-dev/stanc3 · GitHub
if you can share or at least describe your Stan program. This will help ensure that Stan
continues to work on your Stan programs in the future. Thank you!
This message can be avoided by wrapping your function call inside suppressMessages().”
The R popup window informs me that I need to install build tools (which however, I did). If I answer yes, it does nothing (In an earlier attempt it would take me to a website informing me how to install build tools). If I answer no, I get the following R output:
"
make cmd is
make -f ‘/Library/Frameworks/R.framework/Resources/etc/Makeconf’ -f ‘/Library/Frameworks/R.framework/Resources/share/make/shlib.mk’ -f ‘/Users/jzimmermann/.R/Makevars’ CXX=’(CXX14) (CXX14STD)’ CXXFLAGS=’(CXX14FLAGS)' CXXPICFLAGS='(CXX14PICFLAGS)’ SHLIB_LDFLAGS=’(SHLIB_CXX14LDFLAGS)' SHLIB_LD='(SHLIB_CXX14LD)’ SHLIB=‘file22e3726b2d81.so’ OBJECTS=‘file22e3726b2d81.o’
make would use
if test “zfile22e3726b2d81.o” != “z”; then
echo clang++ -mmacosx-version-min=10.13 -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -Wl,-rpath,/Library/Frameworks/R.framework/Resources/lib /Library/Frameworks/R.framework/Resources/lib/libc++abi.1.dylib -L"/Library/Frameworks/R.framework/Resources/lib" -L/usr/local/lib -o file22e3726b2d81.so file22e3726b2d81.o /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/lib//libStanServices.a -L’/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/lib/’ -lStanHeaders -L’/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/lib/’ -ltbb -ltbbmalloc -ltbbmalloc_proxy -F/Library/Frameworks/R.framework/… -framework R -Wl,-framework -Wl,CoreFoundation;
clang++ -mmacosx-version-min=10.13 -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -Wl,-rpath,/Library/Frameworks/R.framework/Resources/lib /Library/Frameworks/R.framework/Resources/lib/libc++abi.1.dylib -L"/Library/Frameworks/R.framework/Resources/lib" -L/usr/local/lib -o file22e3726b2d81.so file22e3726b2d81.o /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/lib//libStanServices.a -L’/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/lib/’ -lStanHeaders -L’/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/lib/’ -ltbb -ltbbmalloc -ltbbmalloc_proxy -F/Library/Frameworks/R.framework/… -framework R -Wl,-framework -Wl,CoreFoundation;
fi
Error in compileCode(f, code, language = language, verbose = verbose) :
file22e3726b2d81.cpp:192:24: warning: unused typedef ‘local_scalar_t__’ [-Wunused-local-typedef] typedef double local_scalar_t__; ^29 warnings generated.clang-7: error: no such file or directory: '/Library/Frameworks/R.framework/Resources/lib/libc++abi.1.dylib’make: *** [file22e3726b2d81.so] Error 1
In addition: Warning messages:
1: Rows containing NAs were excluded from the model.
2: In system2(CXX, args = ARGS) : error in running command
3: In file.remove(c(unprocessed, processed)) :
cannot remove file ‘/var/folders/j9/ttvwqt113mg7bvr4lv409jbh0000gn/T//RtmpC4ngvg/file22e37ea6ce62.stan’, reason ‘No such file or directory’
Error in sink(type = “output”) : invalid connection
"