Closed kaos closed 10 years ago
Hi kaos,
Currently, lua-capnproto works only with LuaJIT 2.1. There are some 64 bit int issues with LuaJIT 2.0 and Lua 5.1, Lua 5.2. You can checkout LuaJIT's repository "git clone http://luajit.org/git/luajit-2.0.git", switch to "v2.1" branch, and "make && sudo make install". LuaJIT is based on Lua 5.1, so you need luarocks to install libs to Lua 5.1 dirs. See http://stackoverflow.com/questions/20321560/how-do-install-libraries-for-both-lua5-2-and-5-1-using-luarocks. And then install lunitx and lua-cjson:
$sudo luarocks-5.1 install lua-cjson $sudo luarocks-5.1 install lunitx
And then you should run tests. Could you please pull the lua-capnproto repository, I just fixed some issues.
Ouch, that could be worth mentioning in the readme (that luajit should be >= 2.1). Even the comment in the rockspec is misleading regarding this (stating that luajit should be >= 2.0.0).
Thanks for the additional information, though. I find the issue resolved with the provided answer.
For now, I simply converted the output from capnpc -o
which cat<schema-file> | capnp decode ...
to a valid lua table structure.
I'll let you know how it works out once I get back to another attempt with lua-capnproto.
Yes, I should have wrote something. I just submitted a commit 3fb4fb2d36590e512bc73f439312dc76a3bdce27 mentioning it in the readme file.
Hi,
I see I have LuaJIT 2.0.3, which seems to be based on Lua 5.1.. while I have Lua 5.2 installed. So, luarocks installs libraries under a 5.2 path, while luajit fails to find them under a 5.1 one.. any hints on how to get around this? (I just started looking at it, maybe it will work just messing with lib paths..?)