[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaBitOp: Cant require "bit=>./bit.so: undefined symbol: luaopen_bit
- From: meino.cramer@...
- Date: Fri, 30 Nov 2012 19:05:39 +0100
Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> [12-11-30 18:56]:
> > error loading module 'bit' from file '/usr/local/lib64/lua/5.1/bit.so':
> > /usr/local/lib64/lua/5.1/bit.so: undefined symbol: luaopen_bit
>
> Ok, now it is trying to load the bit.so that you have installed. But the
> error message is telling you that bit.so does not seem to be a Lua library.
>
> What is the output of "nm -g /usr/local/lib64/lua/5.1/bit.so" ?
>
> Is there a chance that bit.so was built using C++ instead of C?
>
computer:/home/user>nm -g /usr/local/lib64/lua/5.1/bit.so
w _Jv_RegisterClasses
0000000000203048 A __bss_start
w __cxa_finalize@@GLIBC_2.2.5
w __gmon_start__
0000000000203048 A _edata
0000000000203058 A _end
0000000000001bf8 T _fini
0000000000000620 T _init
U luaL_typerror
U lua_gettop
U lua_isnumber
U lua_pushlstring
U lua_pushnumber
U lua_tonumber
U lua_type
computer:/home/user>file /usr/local/lib64/lua/5.1/bit.so
/usr/local/lib64/lua/5.1/bit.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
computer:/home/user>
I built the library with the makefile, which comes with the sources...
The appropiate contents:
CC= gcc
CCOPT= -O2 -fomit-frame-pointer
CCWARN= -Wall
SOCC= $(CC) -shared
SOCFLAGS= -fPIC $(CCOPT) $(CCWARN) $(DEFINES) $(INCLUDES) $(CFLAGS)
SOLDFLAGS= -fPIC $(LDFLAGS)
RM= rm -f
INSTALL= install -p
INSTALLPATH= $(LUA) installpath.lua
???