Bug 64591 - Failing to build mod_lua with Lua 5.4
Summary: Failing to build mod_lua with Lua 5.4
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_lua (show other bugs)
Version: 2.4.43
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2020-07-09 22:56 UTC by Lubos Uhliarik
Modified: 2020-08-01 14:51 UTC (History)
0 users



Attachments
Lua54 diff (5.87 KB, patch)
2020-08-01 14:51 UTC, Giovanni Bechis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lubos Uhliarik 2020-07-09 22:56:48 UTC
It's not possible to build mod_lua with Lua 5.4 installed, since they added 4th argument to lua_resume function in Lua 5.4.

With Lua 5.4 installed, compilation fails:

mod_lua.c: In function 'lua_setup_filter_ctx':
mod_lua.h:51:28: error: too few arguments to function 'lua_resume'
   51 | #define lua_resume(a,b)    lua_resume(a, NULL, b)
      |                            ^~~~~~~~~~
mod_lua.c:413:18: note: in expansion of macro 'lua_resume'
  413 |             rc = lua_resume(L, 1);
      |                  ^~~~~~~~~~
In file included from mod_lua.h:44,
                 from mod_lua.c:18:
/usr/include/lua.h:300:15: note: declared here
  300 | LUA_API int  (lua_resume)     (lua_State *L, lua_State *from, int narg,
      |               ^~~~~~~~~~
In file included from mod_lua.c:18:
mod_lua.c: In function 'lua_output_filter_handle':
mod_lua.h:51:28: error: too few arguments to function 'lua_resume'
   51 | #define lua_resume(a,b)    lua_resume(a, NULL, b)
      |                            ^~~~~~~~~~
mod_lua.c:495:17: note: in expansion of macro 'lua_resume'
  495 |             if (lua_resume(L, 0) == LUA_YIELD) {
      |                 ^~~~~~~~~~
In file included from mod_lua.h:44,
                 from mod_lua.c:18:
/usr/include/lua.h:300:15: note: declared here
  300 | LUA_API int  (lua_resume)     (lua_State *L, lua_State *from, int narg,
      |               ^~~~~~~~~~
In file included from mod_lua.c:18:
mod_lua.h:51:28: error: too few arguments to function 'lua_resume'
   51 | #define lua_resume(a,b)    lua_resume(a, NULL, b)
      |                            ^~~~~~~~~~
mod_lua.c:527:17: note: in expansion of macro 'lua_resume'
  527 |             if (lua_resume(L, 0) == LUA_YIELD) {
      |                 ^~~~~~~~~~
In file included from mod_lua.h:44,
                 from mod_lua.c:18:
/usr/include/lua.h:300:15: note: declared here
  300 | LUA_API int  (lua_resume)     (lua_State *L, lua_State *from, int narg,
      |               ^~~~~~~~~~
In file included from mod_lua.c:18:
mod_lua.c: In function 'lua_input_filter_handle':
mod_lua.h:51:28: error: too few arguments to function 'lua_resume'
   51 | #define lua_resume(a,b)    lua_resume(a, NULL, b)
      |                            ^~~~~~~~~~
mod_lua.c:624:17: note: in expansion of macro 'lua_resume'
  624 |             if (lua_resume(L, 0) == LUA_YIELD) {
      |                 ^~~~~~~~~~
In file included from mod_lua.h:44,
                 from mod_lua.c:18:
/usr/include/lua.h:300:15: note: declared here
  300 | LUA_API int  (lua_resume)     (lua_State *L, lua_State *from, int narg,
      |               ^~~~~~~~~~
In file included from mod_lua.c:18:
mod_lua.h:51:28: error: too few arguments to function 'lua_resume'
   51 | #define lua_resume(a,b)    lua_resume(a, NULL, b)
      |                            ^~~~~~~~~~
mod_lua.c:646:17: note: in expansion of macro 'lua_resume'
  646 |             if (lua_resume(L, 0) == LUA_YIELD) {
      |                 ^~~~~~~~~~
In file included from mod_lua.h:44,
                 from mod_lua.c:18:
/usr/include/lua.h:300:15: note: declared here
  300 | LUA_API int  (lua_resume)     (lua_State *L, lua_State *from, int narg,
      |               ^~~~~~~~~~
make[4]: *** [/builddir/build/BUILD/httpd-2.4.43/build/rules.mk:212: mod_lua.s
Comment 1 Lubos Uhliarik 2020-07-10 11:52:32 UTC
PR - https://github.com/apache/httpd/pull/133
Comment 2 Giovanni Bechis 2020-08-01 14:51:58 UTC
Created attachment 37379 [details]
Lua54 diff

Different diff similar to the one that has been committed to haproxy (https://github.com/haproxy/haproxy/commit/08ed98fd7963968de49593304fdd9234812845a4) with config.m4 bits added.