On 1/15/10 7:25 AM, Joseph Smith wrote:
Keep getting this error when trying to build bitlib on my x86_64 laptop, any ideas?
/usr/bin/ld: /usr/local/lib/liblua.a(lapi.o): relocation R_X86_64_32 against `luaO_nilobject_' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/liblua.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [bit.la] Error 1 make[1]: Leaving directory `/home/joe/lua-5.1.4/bitlib-25' make: *** [all] Error 2
I even tried configuring it with:
./configure --with-lua=/usr/local CXXFLAGS=-fPIC CFLAGS=-fPIC CPPFLAGS=-fPIC
But still same error....
You need to add -fPIC to CFLAGS in lua-5.1.4/src/Makefile
Stefan