Skip to content
Back to formatted view

Raw Message

Message-ID: <21204.5266.57480.209197@max.nulle.part>
Date: 2014-01-13T16:30:10Z
From: Dirk Eddelbuettel
Subject: [Rcpp-devel] linking Rcpp with external GSL library
In-Reply-To: <21204.4598.646477.165946@max.nulle.part>

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