lua-users home
lua-l archive

Luasocket 2.0 beta3 and Lua 5.1 work 6

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


I've been trying to get Luasocket 2.0b3 and Lua 5.1w6 to play nicely on a debian sarge box and have come across a wrinkle I've not seen mentioned before on the list. I did the necessary stripping out of the compat-5.1.h, changed luaL_module to luaL_openlib. The problem is that, although it is loading the functions from lsocket.so, it is not finding the functions in socket.lua. So, for example, the testsrvr.lua script won't run because socket.bind is a nil value.
Here's the directory structure:
/usr/local/share/lua/5.1/socket.lua (etc)
/usr/local/lib/lua/5.1/lsocket.so
From the lua console,
l51w6> print (package.path) ---> ./?.lua;/usr/local/share/lua/ 5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua l51w6> print (package.cpath) ---> ./?.so;./l?.so;/usr/local/lib/ lua/5.1/?.so;/usr/local/lib/lua/5.1/l?.so
l51w6> require "socket"
l51w6> table.foreach(socket, print) --->
protect function: 0x807b470
dns table: 0x807b6a8
gettime function: 0x807b4a8
udp function: 0x807ac58
newtry function: 0x807b538
__unload function: 0x807b3f8
DEBUG true
VERSION LuaSocket 2.0 (beta3)
select function: 0x807ac88
tcp function: 0x806ed38
skip function: 0x807b3a0
sleep function: 0x807b658
What obvious thing am I missing?
Thanks,
Matt

AltStyle によって変換されたページ (->オリジナル) /