[Rcpp-devel] stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
Qiang Kou
qkou at qkou.info
Fri Feb 1 19:04:02 CET 2019
Hi, Sariya,
I think you need to recompile the GSL library with "-fPIC".
Best,
KK
On 2/1/19, 9:54 AM, "Rcpp-devel on behalf of Sariya, Sanjeev" <rcpp-devel-bounces at lists.r-forge.r-project.org on behalf of ss5505 at cumc.columbia.edu> wrote:
I'd requested IT/cluster person of my floor with this and see if could assist with error.
It still fails after changing to "-fPIC" option. I changed the variable suggested by the developer, not sure what other variable to change.
##
* installing *source* package ‘simplexreg’ ...
** package ‘simplexreg’ successfully unpacked and MD5 sums checked
** libs
/usr/bin/g++-4.8 -I/mnt/mfs/cluster/bin/R-3.4/include -DNDEBUG -I/gsl/win64/include -I/usr/local/include -fPIC -g -O2 -c sim.gee.cpp -o sim.gee.o
/usr/bin/g++-4.8 -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.4/share/make/shlib.mk:6: recipe for target 'simplexreg.so' failed
make: *** [simplexreg.so] Error 1
ERROR: compilation failed for package ‘simplexreg’
* removing ‘/mnt/mfs/cluster/bin/R-3.4/library/simplexreg’
The downloaded source packages are in
‘/tmp/RtmpAe9HMl/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("simplexreg") :
installation of package ‘simplexreg’ had non-zero exit status
##
Thanks
---
-----Original Message-----
From: Rcpp-devel <rcpp-devel-bounces at lists.r-forge.r-project.org> On Behalf Of Serguei Sokol
Sent: Friday, February 1, 2019 11:32 AM
To: rcpp-devel at lists.r-forge.r-project.org
Subject: Re: [Rcpp-devel] stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
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
> g++ -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.
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel at lists.r-forge.r-project.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.r-2Dforge.r-2Dproject.org_cgi-2Dbin_mailman_listinfo_rcpp-2Ddevel&d=DwIGaQ&c=G2MiLlal7SXE3PeSnG8W6_JBU6FcdVjSsBSbw6gcR0U&r=rDmT5PX8EcARMO0vn_gzxM5_ETquAxRXGQ9goqf94_I&m=WPEqcxOt_kOucDCNIFifRu618CnhlQMjEyoyIiJRi-w&s=Ja3gdUYYGsZjiJyNsKirbSvCwqLG9vidkeIpeixLV84&e=
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
More information about the Rcpp-devel
mailing list