Neopallium / lua-zmq

Lua zeromq2 binding
http://github.com/Neopallium/lua-zmq
MIT License
151 stars 36 forks source link

Compiling lua-zmq with luajit : error: lua.h: No such file or directory #39

Closed rohitjoshi closed 11 years ago

rohitjoshi commented 11 years ago

Hello, I am trying to compile lua-zmq with luajit.

ubuntu@ip-10-170-77-212:~/downloads/lua-zmq/lua-zmq-master/build$ cmake .. -DLUA_LIBRARIES=/opt/openresty/luajit/lib -DLUA_INCLUDE_DIR=/opt/openrest y/luajit/include -DZMQ_PATH=/opt/zeromq -- Configuring done -- Generating done -- Build files have been written to: /home/ubuntu/downloads/lua-zmq/lua-zmq-master/build ubuntu@ip-10-170-77-212:~/downloads/lua-zmq/lua-zmq-master/build$ ls CMakeCache.txt CMakeFiles cmake_install.cmake Makefile ubuntu@ip-10-170-77-212:~/downloads/lua-zmq/lua-zmq-master/build$ make Scanning dependencies of target lua-zmq [100%] Building C object CMakeFiles/lua-zmq.dir/src/pre_generated-zmq.nobj.c.o /home/ubuntu/downloads/lua-zmq/lua-zmq-master/src/pre_generated-zmq.nobj.c:9:17: fatal error: lua.h: No such file or directory compilation terminated. make[2]: * [CMakeFiles/lua-zmq.dir/src/pre_generated-zmq.nobj.c.o] Error 1 make[1]: * [CMakeFiles/lua-zmq.dir/all] Error 2 make: *\ [all] Error 2

rohitjoshi commented 11 years ago

I resolved it using work around where copied all lua header files from luajit/include to /usr/include directory but It would be good if it supports -DLUA_INCLUDE_DIR cmake flag.

Neopallium commented 11 years ago

LUA_LIBRARIES and LUA_INCLUDE_DIR variables are set by the FindLua51 cmake module. I will look into adding them as variables that can be set by the user.

Neopallium commented 11 years ago

hmmm. It seems that LUA_INCLUDE_DIR can be overridden from the command line.

Can you provide the output from: make clean && make VERBOSE=1 with the luajit header in there normal location?

Also check the value of LUA_INCLUDE_DIR in CMakeCache.txt It should equal the value you set on the command line.