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

Replace lunajson with lua-cjson #18

Closed
kaklakariada opened this issue Mar 7, 2022 · 0 comments · Fixed by #27
Closed

Replace lunajson with lua-cjson #18

kaklakariada opened this issue Mar 7, 2022 · 0 comments · Fixed by #27
Assignees
Labels
refactoring Code improvement without behavior change

Comments

@kaklakariada
Copy link
Collaborator

kaklakariada commented Mar 7, 2022

Currently we use lunajson, but lua-cjson is already available in Exasol.

Building lua-cjson on mac fails currently:

% luarocks install lua-cjson                 
Installing https://luarocks.org/lua-cjson-2.1.0.6-1.src.rock

lua-cjson 2.1.0.6-1 depends on lua >= 5.1 (5.4-1 provided by VM)
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/usr/local/opt/lua/include/lua5.4 -c lua_cjson.c -o lua_cjson.o
lua_cjson.c:743:19: error: implicit declaration of function 'lua_objlen' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            len = lua_objlen(l, -1);
                  ^
1 error generated.

See mpx/lua-cjson#54 for a potential solution.

Root cause: mpx/lua-cjson#56

Workarounds: Install it with flag -DLUA_COMPAT_5_3

luarocks install lua-cjson --local "CFLAGS=-O3 -Wall -pedantic -DNDEBUG -DLUA_COMPAT_5_3"

or pin the version: "lua-cjson == 2.1.0" in rockspec.

@kaklakariada kaklakariada added the refactoring Code improvement without behavior change label Mar 7, 2022
@kaklakariada kaklakariada self-assigned this Mar 23, 2022
kaklakariada added a commit that referenced this issue Mar 23, 2022
kaklakariada added a commit that referenced this issue Mar 23, 2022
* Migrate to lua-cjson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code improvement without behavior change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant