我正在尝试安装带有luarock的numlua:
luarocks make numlua-0.3-1.rockspec但是我得到了以下错误:
/usr/bin/ld: numlua.o: relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
numlua.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
cp: cannot stat `numlua.so': No such file or directory我猜我需要添加-fPIC参数作为一个标志,但我不太擅长编译器和luaRocks的新手,我不确定如何或在哪里添加这个参数,或者,如果我做错了什么。任何帮助都将不胜感激!
发布于 2012-02-19 08:41:24
根据this mailing list discussion,LuaRocks看起来像是为32位系统配置的,而实际上是在64位系统上运行的。它很可能是通过包管理器安装的,因为从源代码安装时不应该发生这种情况。
找到您的luarocks/config.lua文件。在我的Ubuntu11.10系统上,它位于/usr/share/lua/5.1/luarocks/config.lua。找到显示LUAROCKS_UNAME_M的行,并将i686更改为x86_64。
既然luarocks知道它在64位机器上,numlua应该可以很好地编译。
https://stackoverflow.com/questions/9136229
复制相似问题