You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by William A Rowe Jr <wr...@rowe-clan.net> on 2018/02/22 21:54:17 UTC

Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

This wasn't pretty; candidate 2.4.30 build on current fedora...

/path/build/libtool --silent --mode=link gcc  -g -O2 -pthread
-L/path/lib      -o mod_lua.la -rpath /path/modules -module
-avoid-version  lua_apr.lo lua_config.lo mod_lua.lo lua_request.lo
lua_vmprep.lo lua_dbd.lo lua_passwd.lo -L/usr/lib -llua -lm -lcrypt
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libcrypt.so when searching
for -lcrypt
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when
searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc

-L/usr/lib ? That's F'ed up.

LUA_CFLAGS='-I/usr/include'
LUA_LIBS='-L/usr/lib -llua -lm'
MOD_LUA_LDADD='-L/usr/lib -llua -lm -lcrypt '

are our mistakes. Not sure this is a regression, but it is nonsense.

As illustrated by /usr/lib64/pkgconfig/lua.pc
V= 5.3
R= 5.3.4
prefix= /usr
exec_prefix=${prefix}
libdir= /usr/lib64
includedir=${prefix}/include

Name: Lua
Description: An Extensible Extension Language
Version: ${R}
Requires:
Libs: -llua -lm -ldl
Cflags: -I${includedir}


On Mon, Feb 19, 2018 at 8:54 AM,  <DR...@primary.net> wrote:
> Hi, all;
>
>    Please find below the proposed release tarball and signatures:
>
> https://dist.apache.org/repos/dist/dev/httpd/
>
>
>
> I would like to call a VOTE over the next few days to release this candidate
> tarball as 2.4.30:
>
>
>
> [ ] +1: It’s not just good, it’s good enough!
>
> [ ] +0: Let’s have a talk…
>
> [ ] -1: There’s trouble in paradise. Here’s what’s wrong.
>
> --
>
> Daniel Ruggeri
>
>

Re: Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Fri, Feb 23, 2018 at 2:17 AM, Ruediger Pluem <rp...@apache.org> wrote:
> Hm, it work for me on Centos 6 and 7. What lua packages have you installed?
> I only have the 64 bit versions installed. Do you have 32 bit versions installed as well?

The delta between the first attempt after installing lua-devel.i686 becomes;

/usr/bin/ld: skipping incompatible /usr/lib/liblua.so when searching for -llua
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libcrypt.so when searching
for -lcrypt
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when
searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc

Still not a failure, still clumsy, just louder. This is without Joe's patch.

That patch would benefit from extending the pkgconfig path to the specified
path given. If you look at the newest pcre logic, I've greatly simplified it
and (in theory) made it cross-arch build ready, but that is based on the
bin/lib-config schema and not pkg-config yet. I'd appreciate your feedback
before I propose inflicting it on all of our lib detection in trunk.

I'm currently fighting a one-liner with our current --with-libxml2 behavior
that would remain backwards compatible. Have not solved the lib path
issue at this moment, an -L/path/to/libxml2/lib/ may still be necessary.
Will propose this shortly. Joe's patch works around the immediate defect
and I'm happy to add a +1 there too once I try it out on ubuntu.




> On 02/22/2018 10:54 PM, William A Rowe Jr wrote:
>> This wasn't pretty; candidate 2.4.30 build on current fedora...
>>
>> /path/build/libtool --silent --mode=link gcc  -g -O2 -pthread
>> -L/path/lib      -o mod_lua.la -rpath /path/modules -module
>> -avoid-version  lua_apr.lo lua_config.lo mod_lua.lo lua_request.lo
>> lua_vmprep.lo lua_dbd.lo lua_passwd.lo -L/usr/lib -llua -lm -lcrypt
>> /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
>> /usr/bin/ld: skipping incompatible /usr/lib/libcrypt.so when searching
>> for -lcrypt
>> /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when
>> searching for -lpthread
>> /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
>>
>> -L/usr/lib ? That's F'ed up.
>>
>> LUA_CFLAGS='-I/usr/include'
>> LUA_LIBS='-L/usr/lib -llua -lm'
>> MOD_LUA_LDADD='-L/usr/lib -llua -lm -lcrypt '
>>
>> are our mistakes. Not sure this is a regression, but it is nonsense.
>>
>
> Hm, it works for me on Centos 6 and 7. What lua packages do you have installed?
> I only have the 64 bit versions installed. Do you have 32 bit versions installed as well?
> But having a quick look over modules/lua/config.m4 seems to confirm the nonsense you state
> and it seems to be luck that it works for me.
> But it does not seem to be a regression.
>
> Regards
>
> Rüdiger

Re: Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

Posted by Yann Ylavic <yl...@gmail.com>.
On Mon, Feb 26, 2018 at 11:46 AM, Joe Orton <jo...@redhat.com> wrote:
> On Fri, Feb 23, 2018 at 09:23:50PM +0100, Yann Ylavic wrote:
>> Though this is the "else" (legacy) branch.
>>
>> $ pkg-config --list-all |grep ^lua
> ...
>> lua51                          Lua - Lua language engine
>> lua52                          Lua - Lua language engine
>> lua5.2                         Lua - Lua language engine
>> lua5.3                         Lua - Lua language engine
> ...
>
> Should we use lua5.2 or lua-5.2 to use those then, can you work out? Or
> are these aliases for the same .pc file?

That's lua5.x yes, while lua-5.x are symlinks.

> It should still be quite
> simple to handle these too, something like the attached.

Works nicely (with or without the hyphen, probably better w/o since
it's the original name):

checking whether to enable mod_lua... checking dependencies
configure: using Lua 5.3.3 configuration from pkg-config
configure: using '-llua5.3' for Lua Library
  setting MOD_INCLUDES to "-I/usr/include/lua5.3"
  setting MOD_LUA_LDADD to "-llua5.3 -lcrypt "

Thanks Joe!

Re: Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

Posted by Joe Orton <jo...@redhat.com>.
On Fri, Feb 23, 2018 at 09:23:50PM +0100, Yann Ylavic wrote:
> Though this is the "else" (legacy) branch.
> 
> $ pkg-config --list-all |grep ^lua
...
> lua51                          Lua - Lua language engine
> lua52                          Lua - Lua language engine
> lua5.2                         Lua - Lua language engine
> lua5.3                         Lua - Lua language engine
...

Should we use lua5.2 or lua-5.2 to use those then, can you work out? Or 
are these aliases for the same .pc file?  It should still be quite 
simple to handle these too, something like the attached.

Regards, Joe

Re: Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

Posted by Yann Ylavic <yl...@gmail.com>.
On Fri, Feb 23, 2018 at 9:10 PM, Yann Ylavic <yl...@gmail.com> wrote:
> On Fri, Feb 23, 2018 at 6:56 PM, Joe Orton <jo...@redhat.com> wrote:
>> On Fri, Feb 23, 2018 at 10:04:30AM -0600, William A Rowe Jr wrote:
>>> Correct, as I said this may not be a regression, as it continues to locate
>>> /use/lib64 files.
>>>
>>> Modern ld is tolerant on linux at least when not in -Wall more. Other archs
>>> may not be so kind.
>>
>> r1825147 works for me on Fedora, so it probably breaks on Debian, I'll
>> wait to hear from buildbot...
>
> Works for me on Debian (9.3):
>
> configure:22729: checking for lua.h in /usr/include/lua5.3
> configure:22732: result: yes
> ...
> configure:23522: using '-L/usr/lib -llua5.3 -lm' for Lua Library

Though this is the "else" (legacy) branch.

$ pkg-config --list-all |grep ^lua
lua5.1-c++                     Lua - Lua language engine
lua53-c++                      Lua - Lua language engine
lua-5.3-c++                    Lua - Lua language engine
lua51                          Lua - Lua language engine
lua53                          Lua - Lua language engine
lua52                          Lua - Lua language engine
lua5.2                         Lua - Lua language engine
lua5.3                         Lua - Lua language engine
lua52-c++                      Lua - Lua language engine
lua5.1                         Lua - Lua language engine
lua-5.2-c++                    Lua - Lua language engine
lua-5.1                        Lua - Lua language engine
lua-5.3                        Lua - Lua language engine
lua-5.2                        Lua - Lua language engine
lua51-c++                      Lua - Lua language engine
lua5.3-c++                     Lua - Lua language engine
lua-5.1-c++                    Lua - Lua language engine
lua5.2-c++                     Lua - Lua language engine

So I'm not sure --atleast-version can work with Debian's Lua(s) since
it's in the name...

>
> Thanks,
> Yann.

Re: Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

Posted by Yann Ylavic <yl...@gmail.com>.
On Fri, Feb 23, 2018 at 6:56 PM, Joe Orton <jo...@redhat.com> wrote:
> On Fri, Feb 23, 2018 at 10:04:30AM -0600, William A Rowe Jr wrote:
>> Correct, as I said this may not be a regression, as it continues to locate
>> /use/lib64 files.
>>
>> Modern ld is tolerant on linux at least when not in -Wall more. Other archs
>> may not be so kind.
>
> r1825147 works for me on Fedora, so it probably breaks on Debian, I'll
> wait to hear from buildbot...

Works for me on Debian (9.3):

configure:22729: checking for lua.h in /usr/include/lua5.3
configure:22732: result: yes
...
configure:23522: using '-L/usr/lib -llua5.3 -lm' for Lua Library


Thanks,
Yann.

Re: Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

Posted by Joe Orton <jo...@redhat.com>.
On Fri, Feb 23, 2018 at 10:04:30AM -0600, William A Rowe Jr wrote:
> Correct, as I said this may not be a regression, as it continues to locate
> /use/lib64 files.
> 
> Modern ld is tolerant on linux at least when not in -Wall more. Other archs
> may not be so kind.

r1825147 works for me on Fedora, so it probably breaks on Debian, I'll 
wait to hear from buildbot...

Regards, Joe

Re: Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
Correct, as I said this may not be a regression, as it continues to locate
/use/lib64 files.

Modern ld is tolerant on linux at least when not in -Wall more. Other archs
may not be so kind.



On Feb 23, 2018 09:15, "Eric Covener" <co...@gmail.com> wrote:

>> Do you end up with an -L/usr/lib for the module in your CentOS example?
>> Did it happen to pick up the lib64 path? Or no lib path at all?
>
> /usr/src/apache/httpd-2.4.x/srclib/apr/libtool --silent --mode=link gcc
-std=gnu99  -pthread  -Wall -O2 -g         -o
> mod_lua.la -rpath /usr/src/apache/apache_2.4.x/modules -module
-avoid-version  lua_apr.lo lua_config.lo mod_lua.lo
> lua_request.lo lua_vmprep.lo lua_dbd.lo lua_passwd.lo -L/usr/lib -llua
-lm -lcrypt
>
> The line that fails for you is the same for me.
> Looking closer at your error message I guess the difference is that I
have only the 64 bit version of
> glibc-devel installed. Do you have the 32 bit version installed as well?

Aren't the "skipping..." messages harmless?  Other than pointing out
the suspicious paths it is probing.

Re: Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

Posted by Eric Covener <co...@gmail.com>.
>> Do you end up with an -L/usr/lib for the module in your CentOS example?
>> Did it happen to pick up the lib64 path? Or no lib path at all?
>
> /usr/src/apache/httpd-2.4.x/srclib/apr/libtool --silent --mode=link gcc -std=gnu99  -pthread  -Wall -O2 -g         -o
> mod_lua.la -rpath /usr/src/apache/apache_2.4.x/modules -module -avoid-version  lua_apr.lo lua_config.lo mod_lua.lo
> lua_request.lo lua_vmprep.lo lua_dbd.lo lua_passwd.lo -L/usr/lib -llua -lm -lcrypt
>
> The line that fails for you is the same for me.
> Looking closer at your error message I guess the difference is that I have only the 64 bit version of
> glibc-devel installed. Do you have the 32 bit version installed as well?

Aren't the "skipping..." messages harmless?  Other than pointing out
the suspicious paths it is probing.

Re: Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

Posted by Ruediger Pluem <rp...@apache.org>.

On 02/23/2018 03:43 PM, William A Rowe Jr wrote:
> On Fri, Feb 23, 2018 at 2:17 AM, Ruediger Pluem <rp...@apache.org> wrote:
>> Hm, it work for me on Centos 6 and 7. What lua packages have you installed?
>> I only have the 64 bit versions installed. Do you have 32 bit versions installed as well?
>>
>> On 02/22/2018 10:54 PM, William A Rowe Jr wrote:
>>> This wasn't pretty; candidate 2.4.30 build on current fedora...
>>>
>>> /path/build/libtool --silent --mode=link gcc  -g -O2 -pthread
>>> -L/path/lib      -o mod_lua.la -rpath /path/modules -module
>>> -avoid-version  lua_apr.lo lua_config.lo mod_lua.lo lua_request.lo
>>> lua_vmprep.lo lua_dbd.lo lua_passwd.lo -L/usr/lib -llua -lm -lcrypt
>>> /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
>>> /usr/bin/ld: skipping incompatible /usr/lib/libcrypt.so when searching
>>> for -lcrypt
>>> /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when
>>> searching for -lpthread
>>> /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
>>>
>>> -L/usr/lib ? That's F'ed up.
>>>
>>> LUA_CFLAGS='-I/usr/include'
>>> LUA_LIBS='-L/usr/lib -llua -lm'
>>> MOD_LUA_LDADD='-L/usr/lib -llua -lm -lcrypt '
>>>
>>> are our mistakes. Not sure this is a regression, but it is nonsense.
>>>
>>
>> Hm, it works for me on Centos 6 and 7. What lua packages do you have installed?
>> I only have the 64 bit versions installed. Do you have 32 bit versions installed as well?
> 
> Here's my deployment;
> 
> [wrowe@hub bld-candidate]$ ls /usr/lib/liblua*
> ls: cannot access '/usr/lib/liblua*': No such file or directory
> [wrowe@hub bld-candidate]$ ls /usr/lib/pkgconfig/lua*
> ls: cannot access '/usr/lib/pkgconfig/lua*': No such file or directory
> [wrowe@hub bld-candidate]$ ls /usr/lib64/liblua*
> /usr/lib64/liblua-5.1.so       /usr/lib64/libluajit-5.1.so.2.1.0
> /usr/lib64/liblua-5.3.so       /usr/lib64/liblua.so
> /usr/lib64/libluajit-5.1.so.2
> [wrowe@hub bld-candidate]$ ls /usr/lib64/pkgconfig/lua*
> /usr/lib64/pkgconfig/lua-5.1.pc  /usr/lib64/pkgconfig/lua.pc
> [wrowe@hub bld-candidate]$ ls /usr/include/lua*
> /usr/include/luaconf.h         /usr/include/lua.h    /usr/include/lualib.h
> /usr/include/luaconf-x86_64.h  /usr/include/lua.hpp
> /usr/include/lua-5.1:
> lauxlib.h  luaconf.h  lua.h  lua.hpp  lualib.h
> 
>> But having a quick look over modules/lua/config.m4 seems to confirm the nonsense you state
>> and it seems to be luck that it works for me.
> 
> Do you end up with an -L/usr/lib for the module in your CentOS example?
> Did it happen to pick up the lib64 path? Or no lib path at all?

/usr/src/apache/httpd-2.4.x/srclib/apr/libtool --silent --mode=link gcc -std=gnu99  -pthread  -Wall -O2 -g         -o
mod_lua.la -rpath /usr/src/apache/apache_2.4.x/modules -module -avoid-version  lua_apr.lo lua_config.lo mod_lua.lo
lua_request.lo lua_vmprep.lo lua_dbd.lo lua_passwd.lo -L/usr/lib -llua -lm -lcrypt

The line that fails for you is the same for me.
Looking closer at your error message I guess the difference is that I have only the 64 bit version of
glibc-devel installed. Do you have the 32 bit version installed as well?

Regards

Rüdiger


Re: Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Fri, Feb 23, 2018 at 2:17 AM, Ruediger Pluem <rp...@apache.org> wrote:
> Hm, it work for me on Centos 6 and 7. What lua packages have you installed?
> I only have the 64 bit versions installed. Do you have 32 bit versions installed as well?
>
> On 02/22/2018 10:54 PM, William A Rowe Jr wrote:
>> This wasn't pretty; candidate 2.4.30 build on current fedora...
>>
>> /path/build/libtool --silent --mode=link gcc  -g -O2 -pthread
>> -L/path/lib      -o mod_lua.la -rpath /path/modules -module
>> -avoid-version  lua_apr.lo lua_config.lo mod_lua.lo lua_request.lo
>> lua_vmprep.lo lua_dbd.lo lua_passwd.lo -L/usr/lib -llua -lm -lcrypt
>> /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
>> /usr/bin/ld: skipping incompatible /usr/lib/libcrypt.so when searching
>> for -lcrypt
>> /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when
>> searching for -lpthread
>> /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
>>
>> -L/usr/lib ? That's F'ed up.
>>
>> LUA_CFLAGS='-I/usr/include'
>> LUA_LIBS='-L/usr/lib -llua -lm'
>> MOD_LUA_LDADD='-L/usr/lib -llua -lm -lcrypt '
>>
>> are our mistakes. Not sure this is a regression, but it is nonsense.
>>
>
> Hm, it works for me on Centos 6 and 7. What lua packages do you have installed?
> I only have the 64 bit versions installed. Do you have 32 bit versions installed as well?

Here's my deployment;

[wrowe@hub bld-candidate]$ ls /usr/lib/liblua*
ls: cannot access '/usr/lib/liblua*': No such file or directory
[wrowe@hub bld-candidate]$ ls /usr/lib/pkgconfig/lua*
ls: cannot access '/usr/lib/pkgconfig/lua*': No such file or directory
[wrowe@hub bld-candidate]$ ls /usr/lib64/liblua*
/usr/lib64/liblua-5.1.so       /usr/lib64/libluajit-5.1.so.2.1.0
/usr/lib64/liblua-5.3.so       /usr/lib64/liblua.so
/usr/lib64/libluajit-5.1.so.2
[wrowe@hub bld-candidate]$ ls /usr/lib64/pkgconfig/lua*
/usr/lib64/pkgconfig/lua-5.1.pc  /usr/lib64/pkgconfig/lua.pc
[wrowe@hub bld-candidate]$ ls /usr/include/lua*
/usr/include/luaconf.h         /usr/include/lua.h    /usr/include/lualib.h
/usr/include/luaconf-x86_64.h  /usr/include/lua.hpp
/usr/include/lua-5.1:
lauxlib.h  luaconf.h  lua.h  lua.hpp  lualib.h

> But having a quick look over modules/lua/config.m4 seems to confirm the nonsense you state
> and it seems to be luck that it works for me.

Do you end up with an -L/usr/lib for the module in your CentOS example?
Did it happen to pick up the lib64 path? Or no lib path at all?

> But it does not seem to be a regression.

Glad for the confirmation.

Re: Lua detection autoconf mess (was: [VOTE] Release httpd-2.4.30)

Posted by Ruediger Pluem <rp...@apache.org>.
Hm, it work for me on Centos 6 and 7. What lua packages have you installed?
I only have the 64 bit versions installed. Do you have 32 bit versions installed as well?

On 02/22/2018 10:54 PM, William A Rowe Jr wrote:
> This wasn't pretty; candidate 2.4.30 build on current fedora...
> 
> /path/build/libtool --silent --mode=link gcc  -g -O2 -pthread
> -L/path/lib      -o mod_lua.la -rpath /path/modules -module
> -avoid-version  lua_apr.lo lua_config.lo mod_lua.lo lua_request.lo
> lua_vmprep.lo lua_dbd.lo lua_passwd.lo -L/usr/lib -llua -lm -lcrypt
> /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
> /usr/bin/ld: skipping incompatible /usr/lib/libcrypt.so when searching
> for -lcrypt
> /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when
> searching for -lpthread
> /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
> 
> -L/usr/lib ? That's F'ed up.
> 
> LUA_CFLAGS='-I/usr/include'
> LUA_LIBS='-L/usr/lib -llua -lm'
> MOD_LUA_LDADD='-L/usr/lib -llua -lm -lcrypt '
> 
> are our mistakes. Not sure this is a regression, but it is nonsense.
> 

Hm, it works for me on Centos 6 and 7. What lua packages do you have installed?
I only have the 64 bit versions installed. Do you have 32 bit versions installed as well?
But having a quick look over modules/lua/config.m4 seems to confirm the nonsense you state
and it seems to be luck that it works for me.
But it does not seem to be a regression.

Regards

Rüdiger