Dear forum,
I am new to using forums for getting help with R issues. I apologize beforehand!
I get the below error message when I try to run a bayesian model using the brms package. My code for the model is as follows (and the error message) - can you help?
Best wishes,
Ane
m2 ← brms::brm(NMS3_pa_full_end ~ moisture_avg_start.ctreatment+npratio_start.ctreatment+ (1|site_nr), data = env, family = “gaussian”)
Compiling Stan program…
make cmd is
make -f “C:/PROGRA~1/R/R-40~1.3/etc/x64/Makeconf” -f “C:/PROGRA~1/R/R-40~1.3/share/make/winshlib.mk” CXX=‘(CXX14) (CXX14STD)’ CXXFLAGS=‘(CXX14FLAGS)' CXXPICFLAGS='(CXX14PICFLAGS)’ SHLIB_LDFLAGS=‘(SHLIB_CXX14LDFLAGS)' SHLIB_LD='(SHLIB_CXX14LD)’ SHLIB=“file106475c1252d.dll” WIN=64 TCLBIN=64 OBJECTS=“file106475c1252d.o”
make would use
if test “zfile106475c1252d.o” != “z”; then
if test -e “file106475c1252d-win.def”; then
echo /mingw64/bin/g++ -shared -s -static-libgcc -o file106475c1252d.dll file106475c1252d-win.def file106475c1252d.o “C:/Users/au194814/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a” -L"C:/Users/au194814/Documents/R/win-library/4.0/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/au194814/Documents/R/win-library/4.0/RcppParallel/lib/x64" -ltbb -L"C:/PROGRA~1/R/R-40~1.3/bin/x64" -lR ;
/mingw64/bin/g++ -shared -s -static-libgcc -o file106475c1252d.dll file106475c1252d-win.def file106475c1252d.o “C:/Users/au194814/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a” -L"C:/Users/au194814/Documents/R/win-library/4.0/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/au194814/Documents/R/win-library/4.0/RcppParallel/lib/x64" -ltbb -L"C:/PROGRA~1/R/R-40~1.3/bin/x64" -lR ;
else
echo EXPORTS > tmp.def;
/mingw64/bin/nm file106475c1252d.o | sed -n ‘s/^.* [BCDRT] / /p’ | sed -e ‘/[.]refptr[.]/d’ -e ‘/[.]weak[.]/d’ | sed ‘s/[^ ][^ ]*/“&”/g’ >> tmp.def;
echo /mingw64/bin/g++ -shared -s -static-libgcc -o file106475c1252d.dll tmp.def file106475c1252d.o “C:/Users/au194814/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a” -L"C:/Users/au194814/Documents/R/win-library/4.0/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/au194814/Documents/R/win-library/4.0/RcppParallel/lib/x64" -ltbb -L"C:/PROGRA~1/R/R-40~1.3/bin/x64" -lR ;
/mingw64/bin/g++ -shared -s -static-libgcc -o file106475c1252d.dll tmp.def file106475c1252d.o “C:/Users/au194814/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a” -L"C:/Users/au194814/Documents/R/win-library/4.0/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/au194814/Documents/R/win-library/4.0/RcppParallel/lib/x64" -ltbb -L"C:/PROGRA~1/R/R-40~1.3/bin/x64" -lR ;
rm -f tmp.def;
fi
fi
Error in compileCode(f, code, language = language, verbose = verbose) :
C:/rtools40/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: C:/Users/au194814/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a(stan_fit.o):stan_fit.cpp:(.rdata$_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2P1[_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2P1]+0x0): multiple definition of boost::math::detail::bessel_j0<long double>(long double)::P1'; file106475c1252d.o:file106475c1252d.cpp:(.data$_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2P1[_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2P1]+0x0): first defined hereC:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/au194814/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a(stan_fit.o):stan_fit.cpp:(.rdata$_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2QC[_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2QC]+0x0): multiple definition of
boost::math::detail::bessel_j0(long double)::QC’; file106475c1252d.o:file10647
In addition: Warning message:
I system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
‘-E’ not found
Error in sink(type = “output”)