[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 18:01:33 +0100
Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> [12-11-30 16:20]:
> > , which works fine and installs bit.so into
> >
> > /usr/local/lib64/lua/5.1/bit.so
> >
> > lua: error loading module 'bit' from file './bit.so':
> > ./bit.so: undefined symbol: luaopen_bit
>
> This means that you're loading bit.so from the current directory,
> not from where it was installed. Moreover, the bit.so in the current
> directory does not seem to be a Lua library.
>
> Make sure LUA_CPATH or package.cpath contain "/usr/local/lib64/lua/5.1/?.so"
> before ".".
>
> To avoid surprises like that, we moved "." to the end of the paths in Lua 5.2.
>
Hi,
thanks for the replies.
I think, there is something different causing this failure:
computer:user/XXX>ls -l
total 4
-rw-r--r-- 1 user users 357 2012-11-30 17:58 test
computer:user/XXX>pwd
/home/user/XXX
computer:user/XXX>env | grep LUA
LUA_PATH=/usr/lib64/lua/luarocks/share/lua/5.1//?.lua;/usr/lib64/lua/luarocks/share/lua/5.1//?/init.lua;/usr/share/lua/5.1//?.lua;/usr/share/lua/5.1//?/init.lua;/usr/lib64/lua/luarocks/share/lua/5.1/?.lua;/usr/lib64/lua/luarocks/share/lua/5.1/?/init.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib64/lua/5.1/?.lua;/usr/local/lib64/lua/5.1/?/init.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua
LUA_CPATH=/usr/lib64/lua/luarocks/lib/lua/5.1//?.so;./?.so;/usr/local/lib64/lua/5.1/?.so;/usr/lib64/lua/5.1/?.so;/usr/local/lib64/lua/5.1/loadall.so
computer:user/XXX>lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require "bit"
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
stack traceback:
[C]: ?
[C]: in function 'require'
stdin:1: in main chunk
[C]: ?
>
computer:user/XXX>
Or did I miss something?
Best regards,
mcc