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

cjson with luajit2.1 #51

Open
jney opened this issue May 23, 2017 · 3 comments
Open

cjson with luajit2.1 #51

jney opened this issue May 23, 2017 · 3 comments

Comments

@jney
Copy link

jney commented May 23, 2017

Hi. I've got problems installing cjson with luajit2.1:

lua_cjson.c:1298:13: error: static declaration of ‘luaL_setfuncs’ follows non-static declaration
 static void luaL_setfuncs (lua_State *l, const luaL_Reg *reg, int nup)
             ^
In file included from lua_cjson.c:44:0:
/home/travis/build/OystParis/lua-nats/install/lua/include/luajit-2.1/lauxlib.h:88:18: note: previous declaration of ‘luaL_setfuncs’ was here
 LUALIB_API void (luaL_setfuncs) (lua_State *L, const luaL_Reg *l, int nup);
                  ^
Error: Failed installing dependency: https://luarocks.org/lua-cjson-2.1.0-1.src.rock - Build error: Failed compiling object lua_cjson.o

do you have any idea?

@concatime
Copy link

#40 Possible duplication?

@alkino
Copy link

alkino commented Jul 31, 2018

I found the same problem (and #40 don't look like a duplicate).

You are using branch v2.1 from luajit and you have been bitten by this change: LuaJIT/LuaJIT@de97b9d#diff-fa6206d4c14ef1b0f7109e58a6a78c19 which add luaL_setfuncs
lua-cjson add it too here: https://github.com/mpx/lua-cjson/blob/master/lua_cjson.c#L1312
The both have different signature (static or not)

@alkino
Copy link

alkino commented Jul 31, 2018

Learn more here: LuaJIT/LuaJIT#325

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

3 participants