[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Compat-5.1 very broken.
 
- From: whisper@...
 
- Date: Fri, 22 Apr 2005 13:46:38 -0700
 
As written will NOT work at all on Windows - creates bogus path and cpath.
I have yet to figure out how to set LUA_INIT so that Lua-5.1w5 won't 
barf when trying to read it:
E:\Lua\luasocket-2.0-beta3\tests>set 
LUA_INIT=e:/lua/lua-5.1w5/bin/compat-5.1.lua
E:\Lua\luasocket-2.0-beta3\tests>lua testsrvr.lua
lua: LUA_INIT:1: `<name>' expected near `/'
E:\Lua\luasocket-2.0-beta3\tests>set 
LUA_INIT=e:\lua\lua-5.1w5\bin\compat-5.1.lua
E:\Lua\luasocket-2.0-beta3\tests>lua testsrvr.lua
lua: LUA_INIT:1: `<name>' expected near `\'
E:\Lua\luasocket-2.0-beta3\tests>set LUA_INIT=@<ROOT>/compat-5.1.lua
The system cannot find the file specified.
E:\Lua\luasocket-2.0-beta3\tests>set lua_init
LUA_INIT=e:\lua\lua-5.1w5\bin\compat-5.1.lua
E:\Lua\luasocket-2.0-beta3\tests>set Lua_Init=compat-5.1.lua
E:\Lua\luasocket-2.0-beta3\tests>lua testsrvr.lua
lua: LUA_INIT:1: `=' expected near `-'
E:\Lua\luasocket-2.0-beta3\tests>set lua_init=
E:\Lua\luasocket-2.0-beta3\tests>lua testsrvr.lua
lua: testsrvr.lua:1: package `socket' not found
stack traceback:
       [C]: in function `require'
       testsrvr.lua:1: in main chunk
NOTE: the various bits of socket.(lua|dll) are put into the directory 
structure suggested by the socket doc.
I was able to finally get socket-2.0-Beta3 to compile against Lua-5.1w5 
on Windows, but I can't prove it actually works at all! I can't figure 
out if compat is needed when working with 5.1w5 or not, but there's many 
places where "require 'base'" needs to be commented out to get anywhere 
at all.
Spreading this compat stuff far and wide (and I think I've seen at least 
2 versions), seems like a lot of trouble compared to issuing a Lua 5.0.3 
with the new package/require scheme!
----------------------------------
Lua 5.1w5/src/luaconf.h is also semi-broken. It creates a default path 
based on where it expects Lua to be installed, not where it's actually 
installed! I, for one, never install software in "program files" or any 
other path that includes spaces - too much of a hassle! IMO, these 
default paths should be calculated at runtime, not as a compile-time 
constant! If they have to be a compile time constant, then at least warn 
builders that the defines need to be adjusted to reflect the actual 
install directory!
Dave LeBlanc
Seattle, WA USA