-
Notifications
You must be signed in to change notification settings - Fork 517
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
config for windows 64 #500
Comments
@albfan, yes, it should all work with 64bit libraries, but you need to have luasocket compiled for your platform. The situation for the platforms is this:
I'll make sure this is covered in the documentation. In terms of compiling ZBS for 64bits, it's probably possible, but I haven't tried this and don't see a pressing need to do this as you still should be able to debug 64bit apps from 32bit IDE. |
I'm preparing a fork on gh-pages and master ide windows layout. https://github.com/albfan/ZeroBraneStudio/commits/master I can send PR if you find it useful. Inspecting your 64 luasocket with http://www.dependencywalker.com/ shows it depends on lua51.dll, what about lua52 and lua53? Looking for luasocket sources I have only found https://github.com/diegonehab/luasocket which says is 3.0-rc1 http://w3.impa.br/~diego/software/luasocket/ doesn't help much. I have asked @diegonehab anyway lunarmodules/luasocket#125 |
With my fork I manage to start debug (now clink crashes but that's another history) If you are interested see mridgers/clink#334 |
@albfan, it's not going to work this way. You can't simply drop (1) If you already have 64bit lua51.dll, you don't need anything else. (2) If you have lua51.dll with a different name, you need a proxy dll that will forward requests from lua51.dll to your dll. (3) if you have statically compiled interpreter, you'll need to have a different type of dll that will forward the requests to the statically compiled Lua functions. Let me know which of the case match your situation and I can provide more details on how this can be done. There are instructions at the bottom of |
I didn't know internals of clink, hope @mridgers can help here. https://github.com/albfan/clink/blob/master/lua/README#L2 seems it uses a lua52 compiled statically from sources. I guess it's third case. |
Correct. Clink uses Lua 5.2 which is statically linked into the DLL. |
@mridgers, @albfan, so you have two options: (a) include luasocket into your static executable (in this case you can use ZBS to debug out of the box), or For step 2 you can use the build scripts from ZeroBrane Studio; something like this should compile 64bit luasocket for Lua 5.2: For step 1 you can follow the directions here and for step 3 you can use the directions for Lua Proxy DLL 4, just replace Lua 5.1 with Lua 5.2. I've done all this and the process works, but it involves several steps. I might be able to build luasocket for 64bit windows and build proxy DLLs for all the versions, just to save people some time, but it will probably be closer to the end of the month. The easiest way is to include luasocket into your statically compiled executable, but if it's not an option, we can make it work with the libraries as described above. |
For me it sounds quite thrilling @pkulchenko! if you want to start a WIP branch maybe we can speed up this! a serie of tagged issues and a milestone could help others to collaborate. |
As the first step, I'd confirm with @mridgers that the executable exposes Lua symbols or that it can be made to expose them. According to the instructions I referenced, it may require If that is done, I can build 64bit luasocket for Lua 5.2 and the appropriate proxy DLL to allow you, @albfan, to test it with clink (as long as the symbols are exported). It's will probably be couple of days before I get to it. |
I'm proud to became a tester for this. Don't hesitate to expand the test scope to support more scenarios related with 64bits, main objetive is to enhance ZeroBraneStudio. |
Clink can use Lua built as a DLL but it isn't quite as straight forward as just defining athe LUA_BUILD_AS_DLL because Clink injects its DLL into cmd.exe, and any dependencies such as a Lua DLL will also been to be injected. Provided you have at least mridgers/clink@6d9e58e you can use this patch to build Lua as a DLL. |
TORCH_INSTALL_PATH=C:/torch ZBS_INSTALL_PATH=X:/ZeroBraneStudio # ZeroBrane Studio 1.60; MobDebug 0.648 # Needed for local debugging with ZeroBrane Studio # Note that this is probably not the ideal solution cp $TORCH_INSTALL_PATH/bin/libluajit.dll $TORCH_INSTALL_PATH/bin/lua51.dll # See pkulchenko/ZeroBraneStudio#500 (comment) wget https://download.zerobrane.com/luasocket-win64.zip unzip luasocket-win64.zip -d $TORCH_INSTALL_PATH/bin cp $ZBS_INSTALL_PATH/lualibs/mobdebug/mobdebug.lua $ZBS_INSTALL_PATH/lualibs/socket.lua -t $TORCH_INSTALL_PATH/lua
Had to use 64bit socket/core.dll from pkulchenko/ZeroBraneStudio#500 https://download.zerobrane.com/luasocket-win64.zip
Trying to debug a windows 64 bits app, leads to:
Also I need to set zerobranestudio path with
/
or\\
dir separator\
is get as unicode escape sequence.Details for issue on mridgers/clink#334.
Can ZeroBraneStudio debug 64bits apps. Can It be compiled for 64bits?
Any help is appreciated.
The text was updated successfully, but these errors were encountered: