[Rcpp-devel] linking Rcpp with external GSL library
Florian Oswald
florian.oswald at gmail.com
Mon Jan 13 17:53:57 CET 2014
Kevin Ushey was right: just had to recompile the external library with
-fPIC.
Good to know that I could just copy everything into src and avoid such
issues.
Thanks!
On 13 January 2014 16:30, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 13 January 2014 at 10:19, Dirk Eddelbuettel wrote:
> |
> | Florian,
> |
> | On 13 January 2014 at 15:48, Florian Oswald wrote:
> | | sorry for crossposting this on stackoverflow, but I'm stuck.
> |
> | In the future, pick either SO or here. I'd post here.
> |
> | | I need some help with a linker error I get during installation of an
> Rcpp
> | | package on a linux system where I don't have admin rights. In a
> nutshell, I get
> | | this error:
> | |
> | | relocation R_X86_64_32 against `.rodata' can not be used when
> making a
> | | shared object; recompile with -fPIC
> | |
> | | Well, I did that (recompile with -fPIC) but to no avail. Please have a
> look
> | | here for many more details:
> | |
> | | http://stackoverflow.com/questions/21094740/
> | | linking-rcpp-to-interp2d-gsl-type-library
> |
> | As far as I can tell, Kevin Ushey's comment (made seconds ago) is spot
> | on. Your problem may not be with your compile your Rcpp code but rather
> with
> | the way the GSL was built on that system -- you need a dynamic library.
>
> Looking more carefully, it seems that your use of libinterp2d may be the
> issue. It is a static library, and that may be your problem. Easiest fix
> is
> to copy its code into your package. Higher-end solution would be to make a
> shared library out of libinterp2d but you'd also have to distribute that
> for
> use by others.
>
> Dirk
>
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140113/dd4c3779/attachment.html>
More information about the Rcpp-devel
mailing list