0

I have Kamailio version 5.5.2 source code and I am trying to compile Lua module (app_lua.so) to be included. However, running make all command results in a following error for that module:

CC (gcc) [M app_lua.so]     app_lua_api.o
app_lua_api.c:1942:2: error: implicit declaration of function 'luaL_openlib' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        luaL_openlib(L, "KSR", _sr_crt_KSRMethods, 0);
        ^
app_lua_api.c:1942:2: note: did you mean 'luaL_openlibs'?
/usr/local/include/lua/lualib.h:49:18: note: 'luaL_openlibs' declared here
LUALIB_API void (luaL_openlibs) (lua_State *L);
                 ^
1 error generated.

Any suggestions? I do have Lua installed, it is version 5.4.3.

-- update -- Just tried older app_lua_sr package, same error persists there as well.

mike.tihonchik
  • 6,855
  • 3
  • 32
  • 47

1 Answers1

0

Lua 5.4.x is not supported by Kamailio at this moment. Lua 5.4.x changed the embedding API, becoming incompatible with older ones. Try with Lua 5.2.x, I think 5.3.x works also because it defines compatibility mode by checking the version (pkg-config is required).

miconda
  • 1,754
  • 11
  • 14