owntracks / recorder

Store and access data published by OwnTracks apps
Other
884 stars 122 forks source link

Compilation fails if WITH_LUA ?= yes #68

Closed dazzag24 closed 8 years ago

dazzag24 commented 8 years ago

Using Ubuntu 15.10.

Activated WITH_LUA ?= yes in config.mk. Installed liblua5.2-dev as per the instructions at the end of the README.MD.

make then gives error:

$ make cc -Wall -Werror -I/usr/include -DGHASHPREC=7 -DWITH_PING=1 -DWITH_LUA=1 pkg-config --cflags lua -DWITH_LMDB=1 -Imdb/ -DWITH_HTTP=1 -DJSON_INDENT=NULL -DSTORAGEDEFAULT=\"/var/spool/owntracks/recorder/store\" -DDOCROOT=\"/var/spool/owntracks/recorder/htdocs\" -c -o recorder.o recorder.c Package lua was not found in the pkg-config search path. Perhaps you should add the directory containing `lua.pc' to the PKG_CONFIG_PATH environment variable No package 'lua' found In file included from recorder.c:51:0: hooks.h:5:18: fatal error: lua.h: No such file or directory compilation terminated.

: recipe for target 'recorder.o' failed make: **\* [recorder.o] Error 1 Confirmed that pkg-config is also unable to find lua: $ pkg-config --cflags lua Package lua was not found in the pkg-config search path. Perhaps you should add the directory containing `lua.pc' to the PKG_CONFIG_PATH environment variable No package 'lua' found However using "lua-5.2" works $ pkg-config --cflags lua-5.2 -I/usr/include/lua5.2 I think config.mk needs editing to reflect the requirement that pkg-config is expecting the full lua+version string.
rantanlan commented 6 years ago

aeons ago... but i just found this while having trouble compiling with lua and for all coming after me, see the end of the config.mk file and adapt as follwing i.e.

LUA_CFLAGS = pkg-config --cflags lua-5.2 LUA_LIBS = pkg-config --libs lua-5.2