You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2017/07/03 07:25:03 UTC

[Bug 61245] New: httpd 2.4.26 no longer building against lua 5.3.1 or lua 5.3.4

https://bz.apache.org/bugzilla/show_bug.cgi?id=61245

            Bug ID: 61245
           Summary: httpd 2.4.26 no longer building against lua 5.3.1 or
                    lua 5.3.4
           Product: Apache httpd-2
           Version: 2.4.26
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Build
          Assignee: bugs@httpd.apache.org
          Reporter: matthew@mucklo.com
  Target Milestone: ---

Building Apache 2.4.26 against lua 5.3.1, or 5.3.4 compiled from scratch
(latest version as of this writing) does not work.

Compilation against lua 5.3.1 did work with 2.4.25.

So far downgrading to lua 5.2.4 seems to have fixed things.

The error seen is as follows:

checking for lua.h in
/opt/amp/amptools/releases_develop/develop-3b8c979-81/include/lua-5.3... no
checking for lua.h in
/opt/amp/amptools/releases_develop/develop-3b8c979-81/include/lua5.3... no
checking for lua.h in
/opt/amp/amptools/releases_develop/develop-3b8c979-81/include/lua53... no
checking for lua.h in
/opt/amp/amptools/releases_develop/develop-3b8c979-81/include... yes
checking for luaL_newstate in -llua... yes
checking for luaL_register in -llua... no
checking for lua.h in
/opt/amp/amptools/releases_develop/develop-3b8c979-81/include/lua-5.2... no
checking for lua.h in
/opt/amp/amptools/releases_develop/develop-3b8c979-81/include/lua5.2... no
checking for lua.h in
/opt/amp/amptools/releases_develop/develop-3b8c979-81/include/lua52... no
checking for lua.h in
/opt/amp/amptools/releases_develop/develop-3b8c979-81/include/lua-5.1... no
checking for lua.h in
/opt/amp/amptools/releases_develop/develop-3b8c979-81/include/lua5.1... no
checking for lua.h in
/opt/amp/amptools/releases_develop/develop-3b8c979-81/include/lua51... no
configure: WARNING: *** Lua 5.3 5.2 or 5.1 library not found.
configure: error: Lua 5.3 5.2 or 5.1 library is required

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61245] httpd 2.4.26 no longer building against lua 5.3.1 or lua 5.3.4

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61245

--- Comment #2 from Luca Toscano <to...@gmail.com> ---
Sorry completely missed the fact that it was working on 2.4.25, will try to
repro asap.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61245] httpd 2.4.26 no longer building against lua 5.3.1 or lua 5.3.4

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61245

--- Comment #9 from Luca Toscano <to...@gmail.com> ---
Tested HEAD of 2.4.x and it now configure/compiles correctly on Debian Stretch
with lua 5.3.x. I also tested a simple script/handler to be sure and everything
works correctly.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61245] httpd 2.4.26 no longer building against lua 5.3.1 or lua 5.3.4

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61245

--- Comment #6 from Matthew J Mucklo <ma...@mucklo.com> ---
(In reply to Jacob Champion from comment #4)
> Possible dupe of bug 60831?
> 
> If I recall correctly, 5.3 wasn't supported in 2.4.25. It would "build" but
> not function. Now (as of 2.4.26) it functions, but won't build without the
> Lua compatibility APIs enabled.

Interesting.

I need to double check how lua was compiled.  I may need to ensure the
following flags are set then if what you're saying is correct:

MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1"

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61245] httpd 2.4.26 no longer building against lua 5.3.1 or lua 5.3.4

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61245

--- Comment #1 from Luca Toscano <to...@gmail.com> ---
Hi Matthew,

probably modules/lua/config.m4 would need to be updated, but afaics you should
be able to use --with-lua=PATH as configure parameter and get around the 5.3.1
limitation.

./configure --help | grep lua
  --enable-lua            Apache Lua Framework
  --enable-luajit         Enable LuaJit Support
  --with-lua=PATH         Path to the Lua 5.3/5.2/5.1 prefix

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61245] httpd 2.4.26 no longer building against lua 5.3.1 or lua 5.3.4

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61245

--- Comment #4 from Jacob Champion <jc...@apache.org> ---
Possible dupe of bug 60831?

If I recall correctly, 5.3 wasn't supported in 2.4.25. It would "build" but not
function. Now (as of 2.4.26) it functions, but won't build without the Lua
compatibility APIs enabled.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61245] httpd 2.4.26 no longer building against lua 5.3.1 or lua 5.3.4

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61245

Rainer Jung <ra...@kippdata.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #8 from Rainer Jung <ra...@kippdata.de> ---
I applied a variant of the patch from BZ 58188 to httpd trunk and backported it
to 2.4.x in r1800835. With this patch, mod_lua should also compile against lua
5.1, 5.2 and 5.3 which were build without any COMPAT flags defined.

It will be part of version 2.4.27.

It would be nice if you could verify the fix either from the current 2.4.x head
or during the release vote with the 2.4.27 candidate or after the release of
2.4.27.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61245] httpd 2.4.26 no longer building against lua 5.3.1 or lua 5.3.4

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61245

--- Comment #5 from Luca Toscano <to...@gmail.com> ---
On Debian Stretch I can see the following:

$ dpkg --list | grep lua
rc  liblua5.1-0:amd64                      5.1.5-7.1                      amd64
       Shared library for the Lua interpreter version 5.1
ii  liblua5.3-0:amd64                      5.3.3-1                        amd64
       Shared library for the Lua interpreter version 5.3
ii  liblua5.3-dev:amd64                    5.3.3-1                        amd64
       Development files for the Lua language version 5.


configure:19958: checking whether to enable mod_lua
configure:20017: result: checking dependencies
configure:20037: checking for pow in -lm
configure:20062: gcc -o conftest  -g -O2 -pthread  -DLINUX -D_REENTRANT
-D_GNU_SOURCE   conftest.c -lm   >&5
conftest.c:52:6: warning: conflicting types for built-in function 'pow'
 char pow ();
      ^~~
configure:20062: $? = 0
configure:20071: result: yes
configure:20077: checking for sqrt in -lm
configure:20102: gcc -o conftest  -g -O2 -pthread  -DLINUX -D_REENTRANT
-D_GNU_SOURCE   conftest.c -lm   >&5
conftest.c:52:6: warning: conflicting types for built-in function 'sqrt'
 char sqrt ();
      ^~~~
configure:20102: $? = 0
configure:20111: result: yes
configure:20118: checking for lua.h in ./include/lua-5.3
configure:20247: result: no
configure:20251: checking for lua.h in ./include/lua5.3
configure:20380: result: no
configure:20384: checking for lua.h in ./include/lua53
configure:20513: result: no
configure:20518: checking for lua.h in ./include
configure:20647: result: no
configure:20652: checking for lua.h in ./include/lua-5.2
configure:20781: result: no
configure:20785: checking for lua.h in ./include/lua5.2
configure:20914: result: no
configure:20918: checking for lua.h in ./include/lua52
configure:21047: result: no
configure:21052: checking for lua.h in ./include/lua-5.1
configure:21181: result: no
configure:21185: checking for lua.h in ./include/lua5.1
configure:21314: result: no
configure:21318: checking for lua.h in ./include/lua51
configure:21447: result: no
configure:20118: checking for lua.h in /usr/local/include/lua-5.3
configure:20247: result: no
configure:20251: checking for lua.h in /usr/local/include/lua5.3
configure:20380: result: no
configure:20384: checking for lua.h in /usr/local/include/lua53
configure:20513: result: no
configure:20518: checking for lua.h in /usr/local/include
configure:20647: result: no
configure:20652: checking for lua.h in /usr/local/include/lua-5.2
configure:20781: result: no
configure:20785: checking for lua.h in /usr/local/include/lua5.2
configure:20914: result: no
configure:20918: checking for lua.h in /usr/local/include/lua52
configure:21047: result: no
configure:21052: checking for lua.h in /usr/local/include/lua-5.1
configure:21181: result: no
configure:21185: checking for lua.h in /usr/local/include/lua5.1
configure:21314: result: no
configure:21318: checking for lua.h in /usr/local/include/lua51
configure:21447: result: no
configure:20118: checking for lua.h in /usr/include/lua-5.3
configure:20247: result: no
configure:20251: checking for lua.h in /usr/include/lua5.3
configure:20254: result: yes
configure:20264: checking for luaL_newstate in -llua5.3
configure:20289: gcc -o conftest  -g -O2 -pthread  -DLINUX -D_REENTRANT
-D_GNU_SOURCE -L/usr/lib   -lm conftest.c -llua5.3   >&5
configure:20289: $? = 0
configure:20298: result: yes
configure:20302: checking for luaL_register in -llua5.3
configure:20330: gcc -o conftest  -g -O2 -pthread -I/usr/include/lua5.3 
-DLINUX -D_REENTRANT -D_GNU_SOURCE -L/usr/lib   -lm conftest.c -llua5.3 >&5
/tmp/ccs0jUf9.o: In function `main':
/home/vagrant/httpd-2.4.x/conftest.c:60: undefined reference to `luaL_openlib'
collect2: error: ld returned 1 exit status
configure:20330: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_STRING_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_PWD_H 1
| #define HAVE_GRP_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_PRCTL_H 1
| #define HAVE_SYS_SEM_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_GETPWNAM 1
| #define HAVE_GETGRNAM 1
| #define HAVE_INITGROUPS 1
| #define HAVE_PRCTL 1
| #define HAVE_TIMEGM 1
| #define HAVE_GETPGID 1
| #define HAVE_FOPEN64 1
| #define HAVE_GETLOADAVG 1
| #define HAVE_GETTID 1
| #define HAVE_GMTOFF 1
| /* end confdefs.h.  */
| 
| 
|                     #define LUA_COMPAT_ALL
|                     #define LUA_COMPAT_5_2
|                     #define LUA_COMPAT_5_1
|                     #define LUA_COMPAT_MODULE
| 
|                     #include <lua.h>
|                     #include <lauxlib.h>
| 
| int
| main ()
| {
| 
|                     /* This isn't a valid call, but we're testing linkability
*/
|                     luaL_register(NULL, NULL, NULL);
| 
|   ;
|   return 0;
| }
| 
configure:20362: result: no
configure:20384: checking for lua.h in /usr/include/lua53
configure:20513: result: no
configure:20518: checking for lua.h in /usr/include
configure:20647: result: no
configure:20652: checking for lua.h in /usr/include/lua-5.2
configure:20781: result: no
configure:20785: checking for lua.h in /usr/include/lua5.2
configure:20914: result: no
configure:20918: checking for lua.h in /usr/include/lua52
configure:21047: result: no
configure:21052: checking for lua.h in /usr/include/lua-5.1
configure:21181: result: no
configure:21185: checking for lua.h in /usr/include/lua5.1
configure:21314: result: no
configure:21318: checking for lua.h in /usr/include/lua51
configure:21447: result: no
configure:21457: WARNING: *** Lua 5.3 5.2 or 5.1 library not found.
configure:21461: WARNING: Lua 5.3 5.2 or 5.1 library is required
configure:21547: checking whether to enable mod_lua
configure:21553: error: mod_lua has been requested but can not be built due to
prerequisite failures

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61245] httpd 2.4.26 no longer building against lua 5.3.1 or lua 5.3.4

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61245

--- Comment #3 from Rainer Jung <ra...@kippdata.de> ---
To the OP: can you please provide your file config.log from the top level build
directory?

Since the file is relatively big, we would need at least the part that starts
similar to:

configure:20506: checking for lua.h in
/opt/amp/amptools/releases_develop/develop-3b8c979-81/include
configure:20509: result: yes
configure:20519: checking for luaL_newstate in -llua
...

and then all the rest to the end of the file.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61245] httpd 2.4.26 no longer building against lua 5.3.1 or lua 5.3.4

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61245

--- Comment #7 from Rainer Jung <ra...@kippdata.de> ---
Thanks Luca.

Due to our compat settings, the symbol luaL_register() that we use in our code
will fall back to a define:

#define luaL_register(L,n,l)      (luaL_openlib(L,(n),(l),0))

in the lua include file lauxlib.h for Lua 5.3.

Unfortunately when the lua lib itself gets build, Lua 5.3 only includes code
for Lua 5.2 compatibility (the Makefile of Lua 5.3 by default defines
LUA_COMPAT_5_2), but not those for 5.1 which luaL_openlib() is part of and
which we need for mod_lua.

One solution is building lua by oneself and adding the define LUA_COMPAT_5_1
when building it. That only helps people who are prepared to build their lua
themselves (which is not hard but most would probably want to stick to a
distribution provided build).

The other solution for us would be to make the code at least compatible with
5.2 (first released on December 2011), maybe even conditionally compatible with
5.3. I do not know how easy that will be.

Regards,

Rainer

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org