lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Wed, Feb 17, 2010 at 03:38:13PM +0100, Thijs Koerselman wrote:
> Hi, I'm trying to install luaexpat using luarocks on a 64bit linux
> box, but I'm getting into trouble:
> export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc -o src/
> -shared -L/usr/local/lib src/lxplib.o  -lexpat
> /usr/bin/ld: src/lxplib.o: relocation R_X86_64_32 against
> `.rodata.str1.1' can not be used when making a shared object;
> recompile with -fPIC

Unfortunately this is because the LuaRocks maintainers don't understand
how to build shared objects properly.  They added a *HACK* to enable
-fPIC on systems which ident as x86_64, but they are refusing to accept
(or perhaps to acknowledge) that actually *all* platforms require -fPIC
in order to operate properly.

If you installed LuaRocks from source then it will likely function for
you, albeit badly and hackily.  If you installed from a packaged
version then it's possible that your distribution built once on one
platform not realising that this idiocy would ensue.  If this is the
case then you're probably a bit stuck.  You could try poking at
luarocks/cfg.lua and see if you can persuade it to override the



Daniel Silverstone               
PGP mail accepted and encouraged.            Key Id: 3CCE BABE 206C 3B69