lcmark
lcmark copied to clipboard
Why dependencies yaml? Mac luajit build error.
Hi @jgm
I wanted to use lcmark and was looking forward to the luajit support.
But, depency, yaml has build error.
Although yaml has not been maintained for a long time, but Is there a problem with using a maintained library such as lyaml (https://github.com/gvvaughan/lyaml)?
$ luarocks install lcmark
Warning: falling back to wget - install luasec to get native HTTPS support
Installing https://luarocks.org/lcmark-0.29.0-5.src.rock
Missing dependencies for lcmark 0.29.0-5:
yaml >= 1.1 (not installed)
optparse >= 1.0.1 (not installed)
lcmark 0.29.0-5 depends on lua >= 5.1 (5.1-1 provided by VM)
lcmark 0.29.0-5 depends on cmark >= 0.29.0 (0.29.0-1 installed)
lcmark 0.29.0-5 depends on yaml >= 1.1 (not installed)
Installing https://luarocks.org/yaml-1.1.2-1.src.rock
yaml 1.1.2-1 depends on lua >= 5.1, < 5.4 (5.1-1 provided by VM)
yaml 1.1.2-1 depends on lub >= 1.0.3, < 2 (1.1.0-1 installed)
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/usr/local/include/luajit-2.1 -c src/api.c -o src/api.o -Isrc
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/usr/local/include/luajit-2.1 -c src/b64.c -o src/b64.o -Isrc
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/usr/local/include/luajit-2.1 -c src/dumper.c -o src/dumper.o -Isrc
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/usr/local/include/luajit-2.1 -c src/emitter.c -o src/emitter.o -Isrc
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/usr/local/include/luajit-2.1 -c src/loader.c -o src/loader.o -Isrc
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/usr/local/include/luajit-2.1 -c src/lyaml.c -o src/lyaml.o -Isrc
src/lyaml.c:593:15: error: implicit declaration of function 'luaL_getn' is
invalid in C99 [-Werror,-Wimplicit-function-declaration]
int i, n = luaL_getn(dumper->L, -1);
^
src/lyaml.c:660:11: error: implicit declaration of function 'luaL_getn' is
invalid in C99 [-Werror,-Wimplicit-function-declaration]
luaL_getn(dumper->L, -1) > 0) {
^
2 errors generated.
Error: Failed installing dependency: https://luarocks.org/yaml-1.1.2-1.src.rock - Build error: Failed compiling object src/lyaml.o
I understand there are maintenance issues with yaml and lyaml is indeed a good library. That being said...
I don't have a problem building or using yaml with LuaJIT (either beta3 or OpenResty). It also builds and runs under Lua 5.4, in spite of the Rockspec suggesting otherwise.
Have you tried compiling against normal Lua 5.1 (not the LuaJIT beta that has some header file issues)?
It also builds and runs under Lua 5.4, in spite of the Rockspec suggesting otherwise.
Is there some easy way to force that for those of us that don't know about this stuff?
Ok I had to pull down locally both yaml.rock and lub.rock, modify their version dependencies then install then manually.
Now I have lcmark installed.