Hi I am compiling brms code as below:
I have picked the data from BRMS reference page
model_poisson ← brm(
y ~ 1 + x1 + x2 + (1 | g),
data = fake,
family = poisson(),
iter = 100, # short sampling to speedup example
prior = prior(normal(0,1), class = b) +
prior(constant(1), class = sd, group = g)
#,backend = “cmdstanr”,
#threads = threading(2)
)
When I compile this, I get the following error:
Compiling Stan program…
make cmd is
make -f ‘/usr/lib/R/etc/Makeconf’ -f ‘/usr/share/R/share/make/shlib.mk’ CXX=’(CXX14) (CXX14STD)’ CXXFLAGS=’(CXX14FLAGS)' CXXPICFLAGS='(CXX14PICFLAGS)’ SHLIB_LDFLAGS=’(SHLIB_CXX14LDFLAGS)' SHLIB_LD='(SHLIB_CXX14LD)’ SHLIB=‘file19a475629b5.so’ OBJECTS=‘file19a475629b5.o’
make would use
if test “zfile19a475629b5.o” != “z”; then
echo g++ -std=gnu++14 -shared -L"/usr/lib/R/lib" -Wl,-Bsymbolic-functions -Wl,-z,relro -o file19a475629b5.so file19a475629b5.o ‘/usr/local/lib/R/site-library/rstan/lib//libStanServices.a’ -L’/home/usmta123/R/x86_64-pc-linux-gnu-library/3.6/StanHeaders/lib/’ -lStanHeaders -L’/usr/local/lib/R/site-library/RcppParallel/lib/’ -ltbb -L"/usr/lib/R/lib" -lR;
g++ -std=gnu++14 -shared -L"/usr/lib/R/lib" -Wl,-Bsymbolic-functions -Wl,-z,relro -o file19a475629b5.so file19a475629b5.o ‘/usr/local/lib/R/site-library/rstan/lib//libStanServices.a’ -L’/home/usmta123/R/x86_64-pc-linux-gnu-library/3.6/StanHeaders/lib/’ -lStanHeaders -L’/usr/local/lib/R/site-library/RcppParallel/lib/’ -ltbb -L"/usr/lib/R/lib" -lR;
fi
Error in compileCode(f, code, language = language, verbose = verbose) :
^~~/usr/local/lib/R/site-library/RcppEigen/include/Eigen/src/Core/products/GeneralMatrixVector.h:385:62: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type {aka __vector(2) double}’ [-Wignored-attributes]/usr/bin/ld: /usr/local/lib/R/site-library/rstan/lib//libStanServices.a(stan_fit.o): relocation R_X86_64_PC32 against undefined hidden symbol `_ZTCN5boost10wrapexceptISt14overflow_errorEE0_NS_16exception_detail10clone_implINS3_19error_info_injectorIS1_EEEE’ can not be used when making a shared object/usr/bin/ld: final link failed: Bad valuecollect2: error: ld returned 1 exit statusmake: *** [file19a475629b5.so] Error 1
Error in sink(type = “output”) : invalid connection
Can anyone help here ?