NetBSD-Users archive

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

Re: lua-socket installation





On 10/04/16 19:31, Alexander Nasonov wrote:
Your last problem is likely because you didn't append /?.lua to your LUA_PATH.

I compiled lua53-socket and I can confirm that there is a problem with it:

return require'socket'
error loading module 'socket.core' from file '/usr/pkg/lib/lua/5.3/socket/core.so':
         /usr/pkg/lib/lua/5.3/socket/core.so: Undefined symbol "luaL_checkint" (symnum = 50)
stack traceback:
         [C]: in ?
         [C]: in function 'require'
         /usr/pkg/share/lua/5.3/socket.lua:12: in main chunk
         [C]: in function 'require'
         stdin:1: in main chunk
         [C]: in ?

It's because lua-socket isn't 5.3 ready:

$ make
...
luasocket.c: In function 'global_skip':
luasocket.c:67:18: warning: implicit declaration of function 'luaL_checkint' [-Wimplicit-function-declaration]
      int amount = luaL_checkint(L, 1);
                   ^
...
$ lynx /usr/pkg/share/doc/lua-5.3/manual.html
...
      * Macros to project non-default integer types (luaL_checkint, luaL_optint, luaL_checklong, luaL_optlong) were deprecated. Use their equivalent over lua_Integer with a type cast
        (or, when possible, use lua_Integer in your code).

It should be trivial to fix.

Alex

I did have that issue when I appended /?.lua to it - I just wanted to know if anyone else also was having an issue with the module.
I will see if I can put in a bug report and fix this.

Thanks,
Andrew


Home | Main Index | Thread Index | Old Index