Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail with Lua binaries Max OSX Snow Leopard #1

Closed
yehielliv opened this issue Jun 16, 2012 · 3 comments
Closed

Fail with Lua binaries Max OSX Snow Leopard #1

yehielliv opened this issue Jun 16, 2012 · 3 comments
Assignees

Comments

@yehielliv
Copy link

I have a Lua binaries 5.1 compiled with Lua socket 2.02.
I have in the current directory the CompleteLua(Lua binary with socket complie with xcode 4) and the moddebug.lua and all the test files.

./CompleteLua mobdebug.lua
will come out with no error. Then from the > propmt of the interpreter I type

require("mobdebug").listen("*", 8171)
Lua Remote Debugger
Run the program you wish to debug
./mobdebug.lua:866: attempt to call field 'bind' (a nil value)
stack traceback:
./mobdebug.lua:866: in function 'listen'
stdin:1: in main chunk
[C]: ?

@ghost ghost assigned pkulchenko Jun 16, 2012
@pkulchenko
Copy link
Owner

Elik, I tested on a MacBookPro, but cannot reproduce this issue. I also have lua socket 2.0.2, but it is not compiled into the same binary as Lua. I tested running the server (exactly as you did) and also running a client (only using require('mobdebug').start("localhost",8171) call. They could communicate without any issues on the same machine.

The error you are getting is a bit strange, because it happens after the module is already loaded. For some reason it can't find the bind method. Are you sure you have access to socket.lua file? bind and connect methods are defined in that file. Try to get the following code to run (without mobdebug; just two lines in a Lua file):

  local socket = require "socket"
  local server = socket.bind("*", 8171)

I'm sure it will work with mobdebug if this code runs without problems.

@pkulchenko
Copy link
Owner

I tested with the CompleteLua file you sent me and indeed it fails on calling socket.bind, which may be related to the fact that it is provided in socket.lua file, which doesn't seem to be included in your case. I'm not sure how exactly this was done, but this issue doesn't seem to be with MobDebug. You may want to ask on Lua maillist if anyone knows how to get one executable with luasocket.

@pkulchenko
Copy link
Owner

Elik, closing this as it doesn't seem to be caused by MobDebug. Please let me know (and feel free to reopen) if you have any new information on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants