lua-users home
lua-l archive

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


Hi,

I'm trying to get Luasocket 2.0.1 working with Lua 5.1.1.  "make" doesn't raise any errors, but I get problems when I try to use the thing.

No doubt it's something really stupid.  Anyone got any ideas?

>>>>
> require("socket")
 /usr/local/share/lua/5.1/socket.lua:13: module 'socket.core' not found:   
     no field package.preload['socket.core']
     no file '/usr/local/share/lua/5.1/socket/core.lua'
     no file '/usr/local/share/lua/5.0/socket/core.lua'
     no file 'socket/core.lua'
     no file '/usr/local/lib/lua/5.1/socket/core.lua'
     no file '/usr/local/lib/lua/5.0/socket/core.lua'
     no file 'socket/core.lua'
     no file '/usr/local/lib/lua/5.1/socket.lua'
     no file '/usr/local/lib/lua/5.0/socket.lua'
     no file 'socket.lua'
stack traceback:
     [C]: in function 'require'
     /usr/local/share/lua/5.1/socket.lua:13: in main chunk
     [C]: in function 'require'
     stdin:1: in main chunk
     [C]: ?
<<<<

Here's the relevant bits of my environment:
>>>>
LUA_PATH=/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.0/?.lua;?.lua
LUA_CPATH=/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.0/?.lua;?.lua
<<<<

Here's what I did to the config file before I ran make:
>>>>
--- config.old    2006-08-07 17:29:35.000000000 +0100
+++ config    2006-08-07 17:29:56.000000000 +0100
@@ -15,8 +15,8 @@
 #------
 # Lua includes and libraries
 #
-LUAINC=-I/usr/local/include/lua50
-#LUAINC=-I/usr/local/include/lua5.1
+#LUAINC=-I/usr/local/include/lua50
+LUAINC=-I/usr/local/include/lua5.1
 
 #------
 # Compat-5.1 directory
@@ -27,10 +27,10 @@
 # Top of your Lua installation
 # Relative paths will be inside the src tree
 #
-INSTALL_TOP_SHARE=/usr/local/share/lua/5.0
-INSTALL_TOP_LIB=/usr/local/lib/lua/5.0
-#INSTALL_TOP_SHARE=/usr/local/share/lua/5.1
-#INSTALL_TOP_LIB=/usr/local/lib/lua/5.1
+#INSTALL_TOP_SHARE=/usr/local/share/lua/5.0
+#INSTALL_TOP_LIB=/usr/local/lib/lua/5.0
+INSTALL_TOP_SHARE=/usr/local/share/lua/5.1
+INSTALL_TOP_LIB=/usr/local/lib/lua/5.1
<<<<

I tried removing the line in the config file about the compat module, but that stopped the make from working at all...

Andy.

--
It's Like This

Even the Samurai
Have teddy bears
And even the teddy bears
Get drunk