[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: bug in building and installing luasocket
- From: "Jerome Vuarand" <jerome.vuarand@...>
- Date: Wed, 30 May 2007 17:49:30 -0400
> robertdodier@boulder ~]$ export
> robertdodier@boulder ~]$ lua -l socket
> ua: error loading module 'socket' from file
> /usr/local/lib/lua/5.1/socket/core.so: undefined symbol:
> It seems odd that nm /usr/local/lib/lua/5.1/socket/core.so
> reports that luaopen_socket_core is defined (i.e. marked by T) in
> core.so; maybe that is the function that lua is looking for.
> I tried other assignments (unsuccessful) to LUA_CPATH and LUA_PATH.
> The only thing that works is:
> cd /tmp/luasocket-2.0.1/src # i.e. cd to the build directory export
> lua -l socket
> # now I get the lua interactive prompt
> Maybe someone can explain
> (1) what is supposed to appear in /usr/local/lib/lua/5.1/socket
> (2) what is the appropriate setting for LUA_CPATH and/or LUA_PATH.
Just to clarify things, socket.lua contains a Lua module, and
socket/core.so contains *ANOTHER* module. Both work together, but what
is documented on LuaSocket website is socket.lua, not socket/core.so.
Now, as you use -lsocket switch, I assume you want to load the normal
LuaSocket. In that case you have to configure LUA_PATH to point to that
socket.lua, and also, as socket.lua will require socket/core.so, you
must make LUA_CPATH point to socket/core.so.
Assuming that you have these files there:
Your LUA_PATH and LUA_CPATH should look something like :
And if you really want to load socket.core directly as you stated in
some previous email, you must use the -lsocket.core command line switch
instead of -lsocket.