[Rcpp-devel] stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
Sariya, Sanjeev
ss5505 at cumc.columbia.edu
Fri Feb 1 17:22:23 CET 2019
Hi devs,
Platform - Unix
R version 3.4 and 3.5
Errors for -fPIC installation for two packages:
1)
I'm using r3.5 to install simplexreg on my local as:
/mnt/mfs/cluster/bin/R-3.5/bin/R CMD INSTALL -l ./ simplexreg_1.3.tar.gz
When I do it, I get error as follows:
* installing *source* package 'simplexreg' ...
** package 'simplexreg' successfully unpacked and MD5 sums checked
** libs
g++ -I"/mnt/mfs/cluster/bin/R-3.5/include" -DNDEBUG -I/gsl/win64/include -I/usr/local/include -fpic -g -O2 -c sim.gee.cpp -o sim.gee.o
g++ -shared -L/usr/local/lib -o simplexreg.so sim.gee.o -L/gsl/win64/lib -lgsl -lgslcblas -lm
/usr/bin/ld: /usr/local/lib/libgslcblas.a(xerbla.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
/mnt/mfs/cluster/bin/R-3.5/share/make/shlib.mk:6: recipe for target 'simplexreg.so' failed
make: *** [simplexreg.so] Error 1
ERROR: compilation failed for package 'simplexreg'
I get same error even when I try with R 3.4.
2)
I'm using r3.5 to install RcppGSL on my local as:
/mnt/mfs/cluster/bin/R-3.5/bin/R CMD INSTALL -l ./ RcppGSL_0.3.6.tar.gz
** libs
g++ -I"/mnt/mfs/cluster/bin/R-3.5/include" -DNDEBUG -I/usr/include -I../inst/include -I"/mnt/mfs/cluster/bin/R-3.5/library/Rcpp/include" -I/usr/local/include -fpic -g -O2 -c RcppExports.cpp -o RcppExports.o
g++ -I"/mnt/mfs/cluster/bin/R-3.5/include" -DNDEBUG -I/usr/include -I../inst/include -I"/mnt/mfs/cluster/bin/R-3.5/library/Rcpp/include" -I/usr/local/include -fpic -g -O2 -c fastLm.cpp -o fastLm.o
gcc -I"/mnt/mfs/cluster/bin/R-3.5/include" -DNDEBUG -I/usr/include -I../inst/include -I"/mnt/mfs/cluster/bin/R-3.5/library/Rcpp/include" -I/usr/local/include -fpic -g -O2 -c init.c -o init.o
g++ -I"/mnt/mfs/cluster/bin/R-3.5/include" -DNDEBUG -I/usr/include -I../inst/include -I"/mnt/mfs/cluster/bin/R-3.5/library/Rcpp/include" -I/usr/local/include -fpic -g -O2 -c setErrorHandler.cpp -o setErrorHandler.o
g++ -shared -L/usr/local/lib -o RcppGSL.so RcppExports.o fastLm.o init.o setErrorHandler.o -L/usr/lib/x86_64-linux-gnu -lgsl -lgslcblas -lm
/usr/bin/ld: /usr/local/lib/libgslcblas.a(xerbla.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
/mnt/mfs/cluster/bin/R-3.5/share/make/shlib.mk:6: recipe for target 'RcppGSL.so' failed
make: *** [RcppGSL.so] Error 1
ERROR: compilation failed for package 'RcppGSL'
I get the error with R 3.4 too.
May I know how to bypass this error?
Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20190201/a21e4dc1/attachment.html>
More information about the Rcpp-devel
mailing list