app_lua fails to install on CentOS due to the following error:
+ make every-module group_include=klua
CC (gcc) [M app_lua.so] app_lua_api.o
CC (gcc) [M app_lua.so] app_lua_exp.o
CC (gcc) [M app_lua.so] app_lua_mod.o
CC (gcc) [M app_lua.so] app_lua_sr.o
make[2]: `libkcore.so.1.0' is up to date.
LD (gcc) [M app_lua.so] app_lua.so
/usr/bin/ld: cannot find -llua5.1
collect2: ld returned 1 exit status
make[1]: *** [app_lua.so] Error 1
make: *** [modules] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.57650 (%build)
With the attached patch, it installs ok:
diff --git a/modules/app_lua/Makefile b/modules/app_lua/Makefile
index a466ab9..f703ac7 100644
--- a/modules/app_lua/Makefile
+++ b/modules/app_lua/Makefile
@@ -8,7 +8,7 @@
include ../../Makefile.defs
auto_gen=
NAME=app_lua.so
-LIBS= -llua5.1
+LIBS= -llua-5.1
DEFS+=-I/usr/include/lua5.1
DEFS+=-DOPENSER_MOD_INTERFACE
The library is lua-5.1:
# rpm -q --list lua
/usr/bin/lua
/usr/bin/luac
/usr/lib/liblua-5.1.so
/usr/share/doc/lua-5.1.2
/usr/share/doc/lua-5.1.2/COPYRIGHT
/usr/share/doc/lua-5.1.2/HISTORY
/usr/share/doc/lua-5.1.2/README
/usr/share/doc/lua-5.1.2/amazon.gif
/usr/share/doc/lua-5.1.2/contents.html
/usr/share/doc/lua-5.1.2/cover.png
/usr/share/doc/lua-5.1.2/logo.gif
/usr/share/doc/lua-5.1.2/lua.css
/usr/share/doc/lua-5.1.2/lua.html
/usr/share/doc/lua-5.1.2/luac.html
/usr/share/doc/lua-5.1.2/manual.css
/usr/share/doc/lua-5.1.2/manual.html
/usr/share/doc/lua-5.1.2/readme.html
/usr/share/man/man1/lua.1.gz
/usr/share/man/man1/luac.1.gz
Most likely the above patch will break app_lua on other platform.
We need a way to properly identify the proper lua lib that needs to be
passed during the linking process.
Also, on CentOS the lua include files are under /usr/include:
# rpm -q --list lua-devel
/usr/include/lauxlib.h
/usr/include/lua.h
/usr/include/lua.hpp
/usr/include/luaconf.h
/usr/include/lualib.h
/usr/lib/liblua.so
/usr/lib/pkgconfig/lua.pc
As a result, 'DEFS+=-I/usr/include/lua5.1' is not needed on CentOS
(having it defined is harmless).
Regards,
Ovidiu Sas