<div dir="ltr">Kevin Ushey was right: just had to recompile the external library with -fPIC. <div><br></div><div>Good to know that I could just copy everything into src and avoid such issues. </div><div><br></div><div>Thanks!</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 13 January 2014 16:30, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
On 13 January 2014 at 10:19, Dirk Eddelbuettel wrote:<br>
|<br>
| Florian,<br>
|<br>
| On 13 January 2014 at 15:48, Florian Oswald wrote:<br>
| | sorry for crossposting this on stackoverflow, but I'm stuck. <br>
|<br>
| In the future, pick either SO or here. I'd post here.<br>
|<br>
| | I need some help with a linker error I get during installation of an Rcpp<br>
| | package on a linux system where I don't have admin rights. In a nutshell, I get<br>
| | this error:<br>
| |<br>
| | relocation R_X86_64_32 against `.rodata' can not be used when making a<br>
| | shared object; recompile with -fPIC<br>
| |<br>
| | Well, I did that (recompile with -fPIC) but to no avail. Please have a look<br>
| | here for many more details:<br>
| |<br>
| | <a href="http://stackoverflow.com/questions/21094740/" target="_blank">http://stackoverflow.com/questions/21094740/</a><br>
| | linking-rcpp-to-interp2d-gsl-type-library<br>
|<br>
| As far as I can tell, Kevin Ushey's comment (made seconds ago) is spot<br>
| on. Your problem may not be with your compile your Rcpp code but rather with<br>
| the way the GSL was built on that system -- you need a dynamic library.<br>
<br>
</div></div>Looking more carefully, it seems that your use of libinterp2d may be the<br>
issue. It is a static library, and that may be your problem. Easiest fix is<br>
to copy its code into your package. Higher-end solution would be to make a<br>
shared library out of libinterp2d but you'd also have to distribute that for<br>
use by others.<br>
<div class="HOEnZb"><div class="h5"><br>
Dirk<br>
<br>
--<br>
Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
</div></div></blockquote></div><br></div>