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

Compilation fails if WITH_LUA ?= yes #68

Closed
dazzag24 opened this issue Nov 6, 2015 · 1 comment
Closed

Compilation fails if WITH_LUA ?= yes #68

dazzag24 opened this issue Nov 6, 2015 · 1 comment

Comments

@dazzag24
Copy link

dazzag24 commented Nov 6, 2015

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.

@jpmens jpmens closed this as completed in 41731db Nov 6, 2015
@rantanlan
Copy link

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

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

2 participants