summary: rstan issue-while submitting the R script which will use the rstan packages
Summary:
Please provide a short summary (no more than a sentence or two).
Description:
Describe the issue as clearly as possible.
Reproducible Steps:
Please report steps to reproduce the issue. If it's not possible to reproduce, please include a description of how you discovered the issue.
If you have a reproducible example, please include it.
Current Output:
make cmd is make -f '/opt/R/4.1.2/lib/R/etc/Makeconf' -f '/opt/R/4.1.2/lib/R/share/make/shlib.mk' -f '/home/yuhuan.wang/.R/Makevars' CXX='$(CXX14) $(CXX14STD)' CXXFLAGS='$(CXX14FLAGS)' CXXPICFLAGS='$(CXX14PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX14LDFLAGS)' SHLIB_LD='$(SHLIB_CXX14LD)' SHLIB='file1201b1784c863.so' OBJECTS='file1201b1784c863.o'
make would use
if test "zfile1201b1784c863.o" != "z"; then
echo /usr/local/bin/g++ -shared -L"/opt/R/4.1.2/lib/R/lib" -L/usr/local/lib -o file1201b1784c863.so file1201b1784c863.o '/home/yuhuan.wang/R/library/4.1.2/rstan/lib//libStanServices.a' -L'/home/yuhuan.wang/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/lib/' -lStanHeaders -L'/home/yuhuan.wang/R/x86_64-pc-linux-gnu-library/4.1/RcppParallel/lib/' -ltbb -L"/opt/R/4.1.2/lib/R/lib" -lR;
/usr/local/bin/g++ -shared -L"/opt/R/4.1.2/lib/R/lib" -L/usr/local/lib -o file1201b1784c863.so file1201b1784c863.o '/home/yuhuan.wang/R/library/4.1.2/rstan/lib//libStanServices.a' -L'/home/yuhuan.wang/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/lib/' -lStanHeaders -L'/home/yuhuan.wang/R/x86_64-pc-linux-gnu-library/4.1/RcppParallel/lib/' -ltbb -L"/opt/R/4.1.2/lib/R/lib" -lR;
fi
Error in compileCode(f, code, language = language, verbose = verbose) :
/usr/bin/ld: /home/yuhuan.wang/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/lib//libStanHeaders.a(private_server.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC/usr/bin/ld: /home/yuhuan.wang/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/lib//libStanHeaders.a(rml_tbb.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC/usr/bin/ld: /home/yuhuan.wang/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders/lib//libStanHeaders.a(task_group_context.o): relocation R_X86_64_32 against symbol `_ZTVN3tbb18captured_exceptionE' can not be used when making a shared object; recompile with -fPIC/usr/bin/ld: final link failed: Nonrepresentable section on outputcollect2: error: ld returned 1 exit statusmake: *** [file1201b1784c863.so] Error 1
In addition: Warning message:
In readLines(file, warn = TRUE) :
incomplete final line found on '/data-prod/QP_Modeling/Cardiovascular_and_Metabolic/R5381_NPR1/efficacy/Models/emax_02.stan'
Error in sink(type = "output") : invalid connection
RStan Version:
rstan version 2.26.11 (Stan version 2.26.1)
R Version:
The version of R you are running 4.1.2
Operating System:
RHEL 7.9
anyone has any idea about this error?
Closing this issue for now, feel free to reopen if there's still a problem