Discussion:
help
追风男孩
2014-08-06 06:43:12 UTC
Permalink
i meet some questions when i use your luajit:

the contents of the lua file "test1.lua" are follows:
require('package')
require('math')
require('socket')
print(_VERSION);
print ("just test")
print ("just test1")
print ("just test2")
print ("just test3")
num=1
num=num+1
print(num)




i used command lua on prompt line to run test1.lua is ok

F:\>lua test1.lua
Lua 5.1
just test
just test1
just test2
just test3
2


but when i used command luajit to run the same lua file "test1.lua" it's wrong and the wrong messages as follows:
F:\>luajit test1.lua
luajit: test1.lua:7: module 'socket' not found:
no field package.preload['socket']
no file './socket.lua'
no file '/usr/local/share/luajit-2.0.3/socket.lua'
no file '/usr/local/share/lua/5.1/socket.lua'
no file '/usr/local/share/lua/5.1/socket/init.lua'
no file './socket.so'
no file '/usr/local/lib/lua/5.1/socket.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
test1.lua:7: in main chunk
[C]: at 0x004021b0
cosnis - gmail
2014-08-06 06:56:14 UTC
Permalink
test/luajit [ lua a.lua ] 2:54 䞋午 test/luajit [ luajit a.lua ] 2:55 䞋午 test/luajit [ luarocks install luasocket ] 2:55 䞋午 test/luajit [ cat a.lua ] 2:55 䞋午 require(‘socket’)

test/luajit [ ] 2:55 䞋午

䜠重装䞀䞋 luasocket


-- 
cosnis - gmail
我圚扟风

On 2014幎8月6日 at 䞋午2:44:15, 远风男孩 (***@qq.com) wrote:

i meet some questions when i use your luajit:
 
the contents of the lua file "test1.lua" are follows: 
require('package')
require('math')
require('socket')
print(_VERSION);
print ("just test")
print ("just test1")
print ("just test2")
print ("just test3")
num=1
num=num+1
print(num)
 
 
 
i used command lua on prompt line to run test1.lua is ok
 
F:\>lua test1.lua
Lua 5.1
just test
just test1
just test2
just test3
2
 
 
but when i used command luajit to run the same lua file "test1.lua" it's wrong and the wrong messages as follows:
F:\>luajit test1.lua
luajit: test1.lua:7: module 'socket' not found:
        no field package.preload['socket']
        no file './socket.lua'
        no file '/usr/local/share/luajit-2.0.3/socket.lua'
        no file '/usr/local/share/lua/5.1/socket.lua'
        no file '/usr/local/share/lua/5.1/socket/init.lua'
        no file './socket.so'
        no file '/usr/local/lib/lua/5.1/socket.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        test1.lua:7: in main chunk
        [C]: at 0x004021b0
 
追风男孩
2014-08-06 10:45:39 UTC
Permalink
ÎÒÓõÄÊÇLuaDist-batteries-0.9.8,ÎÒÓÃmingw°ÑÄãÃǵÄluajitÔŽÂë±àÒë³ÉÁËÒ»žö¿ÉÖŽÐÐ.exeÎÄŒþºÍÒ»žö.dllÎÄŒþ·ÅµœÁËluadistµÄbinÄ¿ÂŒÏÂÈçÏÂÍŒ£º
ÎÒ·¢ÏÖÖ»ÒªÊÇluaµÄÄ£¿é¶šÒåΪÕâÑùµÄ¶Œ¿ÉÒÔ

ÕâÑùµÄÄ£¿é¶šÒåŸÍ²»¿ÉÒÔÁË

ÎÒµÄϵͳÊÇwin7 64bitµÄ


------------------ Ô­ÊŒÓÊŒþ ------------------
·¢ŒþÈË: "cosnis - gmail";<***@gmail.com>;
·¢ËÍʱŒä: 2014Äê8ÔÂ6ÈÕ(ÐÇÆÚÈý) ÏÂÎç2:56
ÊÕŒþÈË: "luajit"<***@freelists.org>;

Ö÷Ìâ: Re: help




test/luajit [ lua a.lua ] 2:54 ÏÂÎç test/luajit [ luajit a.lua ] 2:55 ÏÂÎç test/luajit [ luarocks install luasocket ] 2:55 ÏÂÎç test/luajit [ cat a.lua ] 2:55 ÏÂÎç require(¡®socket¡¯)

test/luajit [ ] 2:55 ÏÂÎç

ÄãÖØװһϠluasocket





--
cosnis - gmail
ÎÒÔÚÕÒ·ç



On 2014Äê8ÔÂ6ÈÕ at ÏÂÎç2:44:15, ×··çÄк¢ (***@qq.com) wrote:

i meet some questions when i use your luajit:

the contents of the lua file "test1.lua" are follows:
require('package')
require('math')
require('socket')
print(_VERSION);
print ("just test")
print ("just test1")
print ("just test2")
print ("just test3")
num=1
num=num+1
print(num)




i used command lua on prompt line to run test1.lua is ok

F:\>lua test1.lua
Lua 5.1
just test
just test1
just test2
just test3
2


but when i used command luajit to run the same lua file "test1.lua" it's wrong and the wrong messages as follows:
F:\>luajit test1.lua
luajit: test1.lua:7: module 'socket' not found:
no field package.preload['socket']
no file './socket.lua'
no file '/usr/local/share/luajit-2.0.3/socket.lua'
no file '/usr/local/share/lua/5.1/socket.lua'
no file '/usr/local/share/lua/5.1/socket/init.lua'
no file './socket.so'
no file '/usr/local/lib/lua/5.1/socket.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
test1.lua:7: in main chunk
[C]: at 0x004021b0
cosnis - gmail
2014-08-06 10:47:42 UTC
Permalink
䞍奜意思, windows 䞋没匄过. 䞍倪枅楚 .


-- 
cosnis - gmail
我圚扟风

On 2014幎8月6日 at 䞋午6:46:48, 远风男孩 (***@qq.com) wrote:

我甚的是LuaDist-batteries-0.9.8,我甚mingw把䜠们的luajit源码猖译成了䞀䞪可执行.exe文件和䞀䞪.dll文件攟到了luadist的bin目圕䞋劂䞋囟
我发现只芁是lua的暡块定义䞺这样的郜可以

这样的暡块定义就䞍可以了

我的系统是win7 64bit的

------------------ 原始邮件 ------------------
发件人: "cosnis - gmail";<***@gmail.com>;
发送时闎: 2014幎8月6日(星期䞉) 䞋午2:56
收件人: "luajit"<***@freelists.org>;
䞻题: Re: help

test/luajit [ lua a.lua ] 2:54 䞋午 test/luajit [ luajit a.lua ] 2:55 䞋午 test/luajit [ luarocks install luasocket ] 2:55 䞋午 test/luajit [ cat a.lua ] 2:55 䞋午 require(‘socket’)

test/luajit [ ] 2:55 䞋午

䜠重装䞀䞋 luasocket


--
cosnis - gmail
我圚扟风

On 2014幎8月6日 at 䞋午2:44:15, 远风男孩 (***@qq.com) wrote:

i meet some questions when i use your luajit:
 
the contents of the lua file "test1.lua" are follows:
require('package')
require('math')
require('socket')
print(_VERSION);
print ("just test")
print ("just test1")
print ("just test2")
print ("just test3")
num=1
num=num+1
print(num)
 
 
 
i used command lua on prompt line to run test1.lua is ok
 
F:\>lua test1.lua
Lua 5.1
just test
just test1
just test2
just test3
2
 
 
but when i used command luajit to run the same lua file "test1.lua" it's wrong and the wrong messages as follows:
F:\>luajit test1.lua
luajit: test1.lua:7: module 'socket' not found:
        no field package.preload['socket']
        no file './socket.lua'
        no file '/usr/local/share/luajit-2.0.3/socket.lua'
        no file '/usr/local/share/lua/5.1/socket.lua'
        no file '/usr/local/share/lua/5.1/socket/init.lua'
        no file './socket.so'
        no file '/usr/local/lib/lua/5.1/socket.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        test1.lua:7: in main chunk
        [C]: at 0x004021b0
 
Mike Pall
2014-08-06 10:53:07 UTC
Permalink
...
...
Please STOP sending large images to the mailing list and take this
discussion offlist NOW.

--Mike
追风男孩
2014-08-06 10:55:59 UTC
Permalink
Thanks all the time




------------------ Ô­ÊŒÓÊŒþ ------------------
·¢ŒþÈË: "cosnis - gmail";<***@gmail.com>;
·¢ËÍʱŒä: 2014Äê8ÔÂ6ÈÕ(ÐÇÆÚÈý) ÍíÉÏ6:47
ÊÕŒþÈË: "luajit"<***@freelists.org>;

Ö÷Ìâ: Re: »ØžŽ£º help




²»ºÃÒâËŒ, windows ÏÂûŪ¹ý. ²»Ì«Çå³þ¡­.





--
cosnis - gmail
ÎÒÔÚÕÒ·ç



On 2014Äê8ÔÂ6ÈÕ at ÏÂÎç6:46:48, ×··çÄк¢ (***@qq.com) wrote:

ÎÒÓõÄÊÇLuaDist-batteries-0.9.8,ÎÒÓÃmingw°ÑÄãÃǵÄluajitÔŽÂë±àÒë³ÉÁËÒ»žö¿ÉÖŽÐÐ.exeÎÄŒþºÍÒ»žö.dllÎÄŒþ·ÅµœÁËluadistµÄbinÄ¿ÂŒÏÂÈçÏÂÍŒ£º
ÎÒ·¢ÏÖÖ»ÒªÊÇluaµÄÄ£¿é¶šÒåΪÕâÑùµÄ¶Œ¿ÉÒÔ

ÕâÑùµÄÄ£¿é¶šÒåŸÍ²»¿ÉÒÔÁË

ÎÒµÄϵͳÊÇwin7 64bitµÄ


------------------ Ô­ÊŒÓÊŒþ ------------------
·¢ŒþÈË: "cosnis - gmail";<***@gmail.com>;
·¢ËÍʱŒä: 2014Äê8ÔÂ6ÈÕ(ÐÇÆÚÈý) ÏÂÎç2:56
ÊÕŒþÈË: "luajit"<***@freelists.org>;
Ö÷Ìâ: Re: help




test/luajit [ lua a.lua ] 2:54 ÏÂÎç test/luajit [ luajit a.lua ] 2:55 ÏÂÎç test/luajit [ luarocks install luasocket ] 2:55 ÏÂÎç test/luajit [ cat a.lua ] 2:55 ÏÂÎç require(¡®socket¡¯)

test/luajit [ ] 2:55 ÏÂÎç

ÄãÖØװһϠluasocket



--
cosnis - gmail
ÎÒÔÚÕÒ·ç



On 2014Äê8ÔÂ6ÈÕ at ÏÂÎç2:44:15, ×··çÄк¢ (***@qq.com) wrote:
i meet some questions when i use your luajit:

the contents of the lua file "test1.lua" are follows:
require('package')
require('math')
require('socket')
print(_VERSION);
print ("just test")
print ("just test1")
print ("just test2")
print ("just test3")
num=1
num=num+1
print(num)




i used command lua on prompt line to run test1.lua is ok

F:\>lua test1.lua
Lua 5.1
just test
just test1
just test2
just test3
2


but when i used command luajit to run the same lua file "test1.lua" it's wrong and the wrong messages as follows:
F:\>luajit test1.lua
luajit: test1.lua:7: module 'socket' not found:
no field package.preload['socket']
no file './socket.lua'
no file '/usr/local/share/luajit-2.0.3/socket.lua'
no file '/usr/local/share/lua/5.1/socket.lua'
no file '/usr/local/share/lua/5.1/socket/init.lua'
no file './socket.so'
no file '/usr/local/lib/lua/5.1/socket.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
test1.lua:7: in main chunk
[C]: at 0x004021b0

Mike Pall
2014-08-06 07:45:08 UTC
Permalink
Post by 追风男孩
F:\>luajit test1.lua
no field package.preload['socket']
no file './socket.lua'
no file '/usr/local/share/luajit-2.0.3/socket.lua'
This shows the LuaJIT exe you're using is not properly compiled
for Windows. Probably CygWin, avoid this. Compile LuaJIT yourself.

--Mike
追风男孩
2014-08-06 10:52:43 UTC
Permalink
I compile luajit like this,and my the OS of my computer is 64bit

thanks!
------------------ Ô­ÊŒÓÊŒþ ------------------
·¢ŒþÈË: "Mike Pall";<mike-***@luajit.org>;
·¢ËÍʱŒä: 2014Äê8ÔÂ6ÈÕ(ÐÇÆÚÈý) ÏÂÎç3:45
ÊÕŒþÈË: "luajit"<***@freelists.org>;

Ö÷Ìâ: Re: help
Post by 追风男孩
F:\>luajit test1.lua
no field package.preload['socket']
no file './socket.lua'
no file '/usr/local/share/luajit-2.0.3/socket.lua'
This shows the LuaJIT exe you're using is not properly compiled
for Windows. Probably CygWin, avoid this. Compile LuaJIT yourself.

--Mike
Loading...