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

Error using luarocks installation #54

Open
hugeblank opened this issue Apr 27, 2018 · 3 comments
Open

Error using luarocks installation #54

hugeblank opened this issue Apr 27, 2018 · 3 comments

Comments

@hugeblank
Copy link

lua_cjson.c: In function ‘json_append_data’:
lua_cjson.c:743:19: warning: implicit declaration of function ‘lua_objlen’ [-Wimplicit-function-declaration]
             len = lua_objlen(l, -1);
                   ^~~~~~~~~~

I'm using lua 5.3, and according to the manual lua_objlen is a thing, so I don't see why this would error, but it does

@ignacio
Copy link

ignacio commented Apr 27, 2018

Check how your Lua installation was built. lua_objlen is only available if you compile Lua with certain compatibility flags: https://www.lua.org/source/5.3/luaconf.h.html

It was renamed to lua_rawlen in 5.2.

You need to rebuild with -DLUA_COMPAT_5_1

@hugeblank
Copy link
Author

@ignacio Thanks for the pointer! I'll be sure to try that when I get home, If it works I'll make sure to report back and close this issue.

@tanhaipeng
Copy link

mark

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