pkulchenko / MobDebug

Remote debugger for Lua.
Other
888 stars 191 forks source link

Could not connect to localhost:8172 #4

Closed alfredopalhares closed 11 years ago

alfredopalhares commented 11 years ago

Hello,

Archlinux updated. Lua 5.2 Luasocket from https://github.com/diegonehab/luasocket/tree/unstable Latest Mobdebug from master.

When I run the server.lua and run start.lua i get Could not connect to localhost:8172

pkulchenko commented 11 years ago

@masterkorp, can you run the same scripts using Lua 5.1 and a stable version of sockets? If it works, the issue is likely to be with the new code in mobdebug that uses connect4 method from the unstable branch.

alfredopalhares commented 11 years ago

What stable version of sockets do you recomend ? I am failing to build http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2

make[1]: Entering directory `/home/masterkorp/Public/builds/luasocket/src/luasocket-2.0.2/src'
gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic   -c -o luasocket.o luasocket.c
In file included from luasocket.c:31:0:
auxiliar.h:38:61: error: unknown type name ‘luaL_reg’
luasocket.c:50:1: error: unknown type name ‘luaL_reg’
luasocket.c:51:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:51:5: warning: (near initialization for ‘mod[0]’) [enabled by default]
luasocket.c:51:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:51:5: warning: (near initialization for ‘mod[0]’) [enabled by default]
luasocket.c:51:5: error: initializer element is not computable at load time
luasocket.c:51:5: error: (near initialization for ‘mod[0]’)
luasocket.c:51:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:51:5: warning: (near initialization for ‘mod[0]’) [enabled by default]
luasocket.c:52:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:52:5: warning: (near initialization for ‘mod[1]’) [enabled by default]
luasocket.c:52:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:52:5: warning: (near initialization for ‘mod[1]’) [enabled by default]
luasocket.c:52:5: error: initializer element is not computable at load time
luasocket.c:52:5: error: (near initialization for ‘mod[1]’)
luasocket.c:52:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:52:5: warning: (near initialization for ‘mod[1]’) [enabled by default]
luasocket.c:53:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:53:5: warning: (near initialization for ‘mod[2]’) [enabled by default]
luasocket.c:53:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:53:5: warning: (near initialization for ‘mod[2]’) [enabled by default]
luasocket.c:53:5: error: initializer element is not computable at load time
luasocket.c:53:5: error: (near initialization for ‘mod[2]’)
luasocket.c:53:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:53:5: warning: (near initialization for ‘mod[2]’) [enabled by default]
luasocket.c:54:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:54:5: warning: (near initialization for ‘mod[3]’) [enabled by default]
luasocket.c:54:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:54:5: warning: (near initialization for ‘mod[3]’) [enabled by default]
luasocket.c:54:5: error: initializer element is not computable at load time
luasocket.c:54:5: error: (near initialization for ‘mod[3]’)
luasocket.c:54:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:54:5: warning: (near initialization for ‘mod[3]’) [enabled by default]
luasocket.c:55:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:55:5: warning: (near initialization for ‘mod[4]’) [enabled by default]
luasocket.c:55:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:55:5: warning: (near initialization for ‘mod[4]’) [enabled by default]
luasocket.c:55:5: error: initializer element is not computable at load time
luasocket.c:55:5: error: (near initialization for ‘mod[4]’)
luasocket.c:55:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:55:5: warning: (near initialization for ‘mod[4]’) [enabled by default]
luasocket.c:56:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:56:5: warning: (near initialization for ‘mod[5]’) [enabled by default]
luasocket.c:56:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:56:5: warning: (near initialization for ‘mod[5]’) [enabled by default]
luasocket.c:56:5: error: initializer element is not computable at load time
luasocket.c:56:5: error: (near initialization for ‘mod[5]’)
luasocket.c:56:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:56:5: warning: (near initialization for ‘mod[5]’) [enabled by default]
luasocket.c:57:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:57:5: warning: (near initialization for ‘mod[6]’) [enabled by default]
luasocket.c:57:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:57:5: warning: (near initialization for ‘mod[6]’) [enabled by default]
luasocket.c:57:5: error: initializer element is not computable at load time
luasocket.c:57:5: error: (near initialization for ‘mod[6]’)
luasocket.c:57:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:57:5: warning: (near initialization for ‘mod[6]’) [enabled by default]
luasocket.c:58:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:58:5: warning: (near initialization for ‘mod[7]’) [enabled by default]
luasocket.c:58:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:58:5: warning: (near initialization for ‘mod[7]’) [enabled by default]
luasocket.c:58:5: error: initializer element is not computable at load time
luasocket.c:58:5: error: (near initialization for ‘mod[7]’)
luasocket.c:58:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:58:5: warning: (near initialization for ‘mod[7]’) [enabled by default]
luasocket.c:59:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:59:5: warning: (near initialization for ‘mod[8]’) [enabled by default]
luasocket.c:59:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:59:5: warning: (near initialization for ‘mod[8]’) [enabled by default]
luasocket.c:59:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:59:5: warning: (near initialization for ‘mod[8]’) [enabled by default]
luasocket.c:62:1: error: unknown type name ‘luaL_reg’
luasocket.c:63:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:63:5: warning: (near initialization for ‘func[0]’) [enabled by default]
luasocket.c:63:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:63:5: warning: (near initialization for ‘func[0]’) [enabled by default]
luasocket.c:63:5: error: initializer element is not computable at load time
luasocket.c:63:5: error: (near initialization for ‘func[0]’)
luasocket.c:63:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:63:5: warning: (near initialization for ‘func[0]’) [enabled by default]
luasocket.c:64:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:64:5: warning: (near initialization for ‘func[1]’) [enabled by default]
luasocket.c:64:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:64:5: warning: (near initialization for ‘func[1]’) [enabled by default]
luasocket.c:64:5: error: initializer element is not computable at load time
luasocket.c:64:5: error: (near initialization for ‘func[1]’)
luasocket.c:64:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:64:5: warning: (near initialization for ‘func[1]’) [enabled by default]
luasocket.c:65:5: warning: braces around scalar initializer [enabled by default]
luasocket.c:65:5: warning: (near initialization for ‘func[2]’) [enabled by default]
luasocket.c:65:5: warning: initialization makes integer from pointer without a cast [enabled by default]
luasocket.c:65:5: warning: (near initialization for ‘func[2]’) [enabled by default]
luasocket.c:65:5: warning: excess elements in scalar initializer [enabled by default]
luasocket.c:65:5: warning: (near initialization for ‘func[2]’) [enabled by default]
luasocket.c: In function ‘base_open’:
luasocket.c:92:9: warning: implicit declaration of function ‘luaL_openlib’ [-Wimplicit-function-declaration]
luasocket.c: In function ‘luaopen_socket_core’:
luasocket.c:116:23: error: request for member ‘name’ in something not a structure or union
luasocket.c:116:41: error: request for member ‘func’ in something not a structure or union
luasocket.c:116:46: error: called object ‘<erroneous-expression>’ is not a function
luasocket.c:116:35: warning: statement with no effect [-Wunused-value]
make[1]: *** [luasocket.o] Error 1
make[1]: Leaving directory `/home/masterkorp/Public/builds/luasocket/src/luasocket-2.0.2/src'
make: *** [all] Error 2
pkulchenko commented 11 years ago

@masterkorp, are you building this luasocket with Lua 5.2? This is probably not going to work as for 5.2 you need the branch you used earlier, but 2.0.2 needs to be compiled with Lua 5.1.

alfredopalhares commented 11 years ago

I am using lua5.1 Maybe luasockets its not recognizing it ? pacman -Ql lua51

lua51 /usr/
lua51 /usr/bin/
lua51 /usr/bin/lua5.1
lua51 /usr/bin/luac5.1
lua51 /usr/include/
lua51 /usr/include/lua5.1/
lua51 /usr/include/lua5.1/lauxlib.h
lua51 /usr/include/lua5.1/lua.h
lua51 /usr/include/lua5.1/lua.hpp
lua51 /usr/include/lua5.1/luaconf.h
lua51 /usr/include/lua5.1/lualib.h
lua51 /usr/lib/
lua51 /usr/lib/liblua.so.5.1
lua51 /usr/lib/liblua.so.5.1.5
lua51 /usr/lib/liblua5.1.a
lua51 /usr/lib/liblua5.1.so
lua51 /usr/lib/liblua5.1.so.5.1
lua51 /usr/lib/liblua5.1.so.5.1.5
lua51 /usr/lib/pkgconfig/
lua51 /usr/lib/pkgconfig/lua5.1.pc
lua51 /usr/share/
lua51 /usr/share/doc/
lua51 /usr/share/doc/lua51/
lua51 /usr/share/doc/lua51/contents.html
lua51 /usr/share/doc/lua51/cover.png
lua51 /usr/share/doc/lua51/logo.gif
lua51 /usr/share/doc/lua51/lua.css
lua51 /usr/share/doc/lua51/lua.html
lua51 /usr/share/doc/lua51/luac.html
lua51 /usr/share/doc/lua51/manual.css
lua51 /usr/share/doc/lua51/manual.html
lua51 /usr/share/doc/lua51/readme.html
lua51 /usr/share/licenses/
lua51 /usr/share/licenses/lua51/
lua51 /usr/share/licenses/lua51/COPYRIGHT
lua51 /usr/share/man/
lua51 /usr/share/man/man1/
lua51 /usr/share/man/man1/lua5.1.1.gz
lua51 /usr/share/man/man1/luac5.1.1.gz
pkulchenko commented 11 years ago

In file included from luasocket.c:31:0: auxiliar.h:38:61: error: unknown type name ‘luaL_reg’

@masterkorp, this looks like it may still be using Lua 5.2 includes. From auxiliar.h:

#include "lauxlib.h"

int auxiliar_open(lua_State *L);
void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func);

Lua 5.1 lauxlib.h includes defined for luaL_reg (line 170):

#define luaL_reg    luaL_Reg

but Lua 5.2 lauxlib.h doesn't include that, which would explain why the type is unknown.

alfredopalhares commented 11 years ago

Sorry for the delayed awsner, I can now confirm luasocket 2.0.2 compiled against working! But I need 5.2 support for my app. If you could port that, or give me pointers how to do it, I would be thankful.

pkulchenko commented 11 years ago

@masterkorp, is this still an issue? Closing for now; please re-open if you have additional information that can help with this.