[Rcpp-devel] stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC

Serguei Sokol serguei.sokol at gmail.com
Fri Feb 1 17:32:28 CET 2019


On 01/02/2019 17:22, Sariya, Sanjeev wrote:
> 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
> 
...
> 
> May I know how to bypass this error?
Try to do what error message says: "recompile with -fPIC" (you have 
-fpic instead). It is safer to get the exact syntax from
$ R CMD config CXXPICFLAGS
-fPIC

Serguei.


More information about the Rcpp-devel mailing list