[racket] link errors on 64bit

From: David Griffiths (dave at fo.am)
Date: Fri May 24 18:54:49 EDT 2013

Hi Matthew,

On 24/05/13 18:44, Matthew Flatt wrote:
> At Thu, 23 May 2013 14:43:18 +0100, David Griffiths wrote:
>> I've been getting a problem for some time building against the racket
>> ubuntu packages on 64 bit:
>> /usr/bin/ld: /usr/lib/libracket3m.a(salloc.o): relocation
>> R_X86_64_TPOFF32 against `scheme_thread_locals' can not be used when
>> making a shared object; recompile with -fPIC
>> Any chance this can be resolved?
> Is this with a vanilla Racket build (e.g., no `--enable-shared')?

Probably - this is using the packages in the main PLT ubuntu launchpad
ppa. I imagine they are built with vanilla settings.

> And it's happening when you link your program to "libracket3m.a", as
> opposed to just building Racket, right? 


> Is your code compiled `-fPIC' (while the Racket code isn't, I think)?

It is indeed, as I'm building shared objects to load as racket modules.

I'm not clear why this is a problem with 64bit and not with 32, but I am
a little rusty on this stuff...



Posted on the users mailing list.