lua-users home
lua-l archive

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


Hi,

> I'm using Linux on x86 with bash, so for me that becomes:
>
> export LUA_PATH="/usr/local/lua/?/?.lua"
> export LUA_INIT="@/usr/local/lua/lua.lua"
> export LUA_FUNCNAME="_?"
> export LUA_LIBNAME="/usr/local/lua/?/lib?.so"
>
> However, when I try to run anything that use luasocket I get the
> following error:
>
> $ cd ~/src/luasocket-2.0-alpha
> $ lua -l luasocket tests/urltest.lua
> lua: /usr/local/lua/luasocket/luasocket.lua:2:
> /usr/local/lib/liblualib.so: undefined symbol: _luaopen_socket
> stack traceback:
>         [C]: in function `error'
>         /usr/local/lua/luasocket/luasocket.lua:2: in main chunk
>         [C]: in function `require'
>         [C]: ?

It's been a while I don't play with this. It used to be the case that in
MacOSX you had to prepend "_" to the name of the entrypoint passed to
loadlib. But not in Linux. Try setting LUA_FUNCNAME to "?" and see what
happens.

[]s,
Diego.