package/squid: fix automake breakage

Message ID 20180711193452.19461-1-jean-francois.tetu@savoirfairelinux.com
State New
Headers show
Series
  • package/squid: fix automake breakage
Related show

Commit Message

Jean-François Têtu July 11, 2018, 7:34 p.m.
Much like e27ccbabc1, the recent bump in automake causes a build error.
If the host automake is not the same version as the one used to generate
the squid package, the build fails while building the copy of libltdl
included in the package.

This happens regardless of the Buildroot automake version since the
included library is not reconfigured properly. The previous fix set the
ACLOCAL and AUTOMAKE variables to the Buildroot generated aclocal and
automake thereby ensuring that the subpackage would build correctly.
What is needed is to make sure that both the squid configure script and
the libltdl configure script are reconfigured following a change to
either configure.ac files.

This commit adds an option passed to autoreconf which ensures both
configure scripts are regenerated with Buildroot's autotools.

Fixes:
 http://autobuild.buildroot.net/results/83d/83d8fb0fc25205d6fb8c96a9877e5901275c6766
 http://autobuild.buildroot.net/results/948/948737590ba648f7dbade1661c0e2e8d9db6522b

CC: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Jean-François Têtu <jean-francois.tetu@savoirfairelinux.com>
---
 package/squid/squid.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Arnout Vandecappelle July 11, 2018, 9:08 p.m. | #1
On 11-07-18 21:34, Jean-François Têtu wrote:
> Much like e27ccbabc1, the recent bump in automake causes a build error.
> If the host automake is not the same version as the one used to generate
> the squid package, the build fails while building the copy of libltdl
> included in the package.
> 
> This happens regardless of the Buildroot automake version since the
> included library is not reconfigured properly. The previous fix set the
> ACLOCAL and AUTOMAKE variables to the Buildroot generated aclocal and
> automake thereby ensuring that the subpackage would build correctly.
> What is needed is to make sure that both the squid configure script and
> the libltdl configure script are reconfigured following a change to
> either configure.ac files.
> 
> This commit adds an option passed to autoreconf which ensures both
> configure scripts are regenerated with Buildroot's autotools.

 Nicely found!

 However, have you also looked into the option of using Buildroot's libtool
instead of the bundled libltdl? If that doesn't work for some reason, I'd like
to add it in the commit log so a future developer who wants to give it go can
see what has been tried already.

 Regards,
 Arnout

> 
> Fixes:
>  http://autobuild.buildroot.net/results/83d/83d8fb0fc25205d6fb8c96a9877e5901275c6766
>  http://autobuild.buildroot.net/results/948/948737590ba648f7dbade1661c0e2e8d9db6522b
> 
> CC: Gustavo Zacarias <gustavo@zacarias.com.ar>
> Signed-off-by: Jean-François Têtu <jean-francois.tetu@savoirfairelinux.com>
> ---
>  package/squid/squid.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/squid/squid.mk b/package/squid/squid.mk
> index 2d21ad8858..06442157d6 100644
> --- a/package/squid/squid.mk
> +++ b/package/squid/squid.mk
> @@ -12,6 +12,7 @@ SQUID_LICENSE = GPL-2.0+
>  SQUID_LICENSE_FILES = COPYING
>  # For 0001-assume-get-certificate-ok.patch
>  SQUID_AUTORECONF = YES
> +SQUID_AUTORECONF_OPTS = -fi configure.ac libltdl/configure.ac
>  SQUID_DEPENDENCIES = libcap host-libcap host-pkgconf \
>  	$(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack)
>  SQUID_CONF_ENV = \
>
Jean-François Têtu July 12, 2018, 12:47 a.m. | #2
Hello!

On Wednesday, July 11, 2018 5:08:13 PM, Arnout Vandecappelle wrote:
> On 11-07-18 21:34, Jean-François Têtu wrote:
>> Much like e27ccbabc1, the recent bump in automake causes a build error.
>> If the host automake is not the same version as the one used to generate
>> the squid package, the build fails while building the copy of libltdl
>> included in the package.
>> 
>> This happens regardless of the Buildroot automake version since the
>> included library is not reconfigured properly. The previous fix set the
>> ACLOCAL and AUTOMAKE variables to the Buildroot generated aclocal and
>> automake thereby ensuring that the subpackage would build correctly.
>> What is needed is to make sure that both the squid configure script and
>> the libltdl configure script are reconfigured following a change to
>> either configure.ac files.
>> 
>> This commit adds an option passed to autoreconf which ensures both
>> configure scripts are regenerated with Buildroot's autotools.
> 
> Nicely found!
> 

Thanks :)

> However, have you also looked into the option of using Buildroot's libtool
> instead of the bundled libltdl? If that doesn't work for some reason, I'd like
> to add it in the commit log so a future developer who wants to give it go can
> see what has been tried already.
> 

I can look into how we could pull in Buildroot's libltdl because
currently, Squid relies on its bootstrap script to pull in libtldl from
the machine that is generating the package. Maybe this could be done
with the autotools instead of the bootstrap?

> Regards,
> Arnout
> 
>> 
>> Fixes:
>>  http://autobuild.buildroot.net/results/83d/83d8fb0fc25205d6fb8c96a9877e5901275c6766
>>  http://autobuild.buildroot.net/results/948/948737590ba648f7dbade1661c0e2e8d9db6522b
>> 
>> CC: Gustavo Zacarias <gustavo@zacarias.com.ar>
>> Signed-off-by: Jean-François Têtu <jean-francois.tetu@savoirfairelinux.com>
>> ---
>>  package/squid/squid.mk | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/package/squid/squid.mk b/package/squid/squid.mk
>> index 2d21ad8858..06442157d6 100644
>> --- a/package/squid/squid.mk
>> +++ b/package/squid/squid.mk
>> @@ -12,6 +12,7 @@ SQUID_LICENSE = GPL-2.0+
>>  SQUID_LICENSE_FILES = COPYING
>>  # For 0001-assume-get-certificate-ok.patch
>>  SQUID_AUTORECONF = YES
>> +SQUID_AUTORECONF_OPTS = -fi configure.ac libltdl/configure.ac
>>  SQUID_DEPENDENCIES = libcap host-libcap host-pkgconf \
>>  	$(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack)
>>  SQUID_CONF_ENV = \
>> 
> 
> --
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF


Regards,

--
Jean-François Têtu
Jean-François Têtu July 12, 2018, 6:24 p.m. | #3
Hello Arnout,

On Wednesday, July 11, 2018 8:47:23 PM, Jean-François Têtu wrote:
> Hello!
> 
> On Wednesday, July 11, 2018 5:08:13 PM, Arnout Vandecappelle wrote:
>> On 11-07-18 21:34, Jean-François Têtu wrote:
>>> Much like e27ccbabc1, the recent bump in automake causes a build error.
>>> If the host automake is not the same version as the one used to generate
>>> the squid package, the build fails while building the copy of libltdl
>>> included in the package.
>>> 
>>> This happens regardless of the Buildroot automake version since the
>>> included library is not reconfigured properly. The previous fix set the
>>> ACLOCAL and AUTOMAKE variables to the Buildroot generated aclocal and
>>> automake thereby ensuring that the subpackage would build correctly.
>>> What is needed is to make sure that both the squid configure script and
>>> the libltdl configure script are reconfigured following a change to
>>> either configure.ac files.
>>> 
>>> This commit adds an option passed to autoreconf which ensures both
>>> configure scripts are regenerated with Buildroot's autotools.
>> 
>> Nicely found!
>> 
> 
> Thanks :)
> 
>> However, have you also looked into the option of using Buildroot's libtool
>> instead of the bundled libltdl? If that doesn't work for some reason, I'd like
>> to add it in the commit log so a future developer who wants to give it go can
>> see what has been tried already.
>> 
> 
> I can look into how we could pull in Buildroot's libltdl because
> currently, Squid relies on its bootstrap script to pull in libtldl from
> the machine that is generating the package. Maybe this could be done
> with the autotools instead of the bootstrap?
> 

From what I understand, the packaged libltdl in Squid comes from its
bootstrap. This pulls in libltdl from the host's libtool during the
libtoolize step.  Currently, the latest version of libtool is 2.4.6.
This version was itself created using automake 1.15. Ultimately, this
means that the included libltdl in Squid is made to be built with
automake 1.15. Unless its forcibly reconf'd with automake 1.16.1.

To fix this issue would require a version of libtool made with automake
1.16.1.  This version currently does not exist as the latest version of
libtool dates back from 2015-02-15, just after the release of automake 
1.15 on 2015-01-05.

In order to build Squid in a sustainable manner, the autoreconf flags
are needed, at least until libtool is bumped.

Would you like me to add a note reflecting this in the commitmsg?

Regards,

--
Jean-François Têtu
Arnout Vandecappelle July 13, 2018, 10:10 a.m. | #4
On 12-07-18 20:24, Jean-François Têtu wrote:
> Hello Arnout,
> 
> On Wednesday, July 11, 2018 8:47:23 PM, Jean-François Têtu wrote:
>> Hello!
>>
>> On Wednesday, July 11, 2018 5:08:13 PM, Arnout Vandecappelle wrote:
>>> On 11-07-18 21:34, Jean-François Têtu wrote:
>>>> Much like e27ccbabc1, the recent bump in automake causes a build error.
>>>> If the host automake is not the same version as the one used to generate
>>>> the squid package, the build fails while building the copy of libltdl
>>>> included in the package.
>>>>
>>>> This happens regardless of the Buildroot automake version since the
>>>> included library is not reconfigured properly. The previous fix set the
>>>> ACLOCAL and AUTOMAKE variables to the Buildroot generated aclocal and
>>>> automake thereby ensuring that the subpackage would build correctly.
>>>> What is needed is to make sure that both the squid configure script and
>>>> the libltdl configure script are reconfigured following a change to
>>>> either configure.ac files.
>>>>
>>>> This commit adds an option passed to autoreconf which ensures both
>>>> configure scripts are regenerated with Buildroot's autotools.
>>>
>>> Nicely found!
>>>
>>
>> Thanks :)
>>
>>> However, have you also looked into the option of using Buildroot's libtool
>>> instead of the bundled libltdl? If that doesn't work for some reason, I'd like
>>> to add it in the commit log so a future developer who wants to give it go can
>>> see what has been tried already.
>>>
>>
>> I can look into how we could pull in Buildroot's libltdl because
>> currently, Squid relies on its bootstrap script to pull in libtldl from
>> the machine that is generating the package. Maybe this could be done
>> with the autotools instead of the bootstrap?
>>
> 
> From what I understand, the packaged libltdl in Squid comes from its
> bootstrap.

 We probably don't want to use the bootstrap script :-)

 What I meant was: make squid depend on libtool (target libtool, not host
libtool), and remove libltdl from SUBDIRS in Makefile.am. Probably something
goes wrong somewhere on the way, so that would have to be fixed as well.

 Regards,
 Arnout

> This pulls in libltdl from the host's libtool during the
> libtoolize step.  Currently, the latest version of libtool is 2.4.6.
> This version was itself created using automake 1.15. Ultimately, this
> means that the included libltdl in Squid is made to be built with
> automake 1.15. Unless its forcibly reconf'd with automake 1.16.1.
> 
> To fix this issue would require a version of libtool made with automake
> 1.16.1.  This version currently does not exist as the latest version of
> libtool dates back from 2015-02-15, just after the release of automake 
> 1.15 on 2015-01-05.
> 
> In order to build Squid in a sustainable manner, the autoreconf flags
> are needed, at least until libtool is bumped.
> 
> Would you like me to add a note reflecting this in the commitmsg?
> 
> Regards,
> 
> --
> Jean-François Têtu
>
Jean-François Têtu July 16, 2018, 2:08 p.m. | #5
Hello


On Friday, July 13, 2018 6:10:47 AM, Arnout Vandecappelle wrote:
> On 12-07-18 20:24, Jean-François Têtu wrote:
>> Hello Arnout,
>> 
>>> On Wednesday, July 11, 2018 5:08:13 PM, Arnout Vandecappelle wrote:
>>>>
>>>> However, have you also looked into the option of using Buildroot's libtool
>>>> instead of the bundled libltdl? If that doesn't work for some reason, I'd like
>>>> to add it in the commit log so a future developer who wants to give it go can
>>>> see what has been tried already.
>>>>
>> 
>> From what I understand, the packaged libltdl in Squid comes from its
>> bootstrap.
> 
> We probably don't want to use the bootstrap script :-)
> 
> What I meant was: make squid depend on libtool (target libtool, not host
> libtool), and remove libltdl from SUBDIRS in Makefile.am. Probably something
> goes wrong somewhere on the way, so that would have to be fixed as well.
> 

Yes, I see what you mean. I'll look into this and fix what breaks.

> Regards,
> Arnout
> 

--
Jean-François Têtu
Arnout Vandecappelle July 16, 2018, 5:53 p.m. | #6
On 16-07-18 16:08, Jean-François Têtu wrote:
> Hello
> 
> 
> On Friday, July 13, 2018 6:10:47 AM, Arnout Vandecappelle wrote:
>> On 12-07-18 20:24, Jean-François Têtu wrote:
>>> Hello Arnout,
>>>
>>>> On Wednesday, July 11, 2018 5:08:13 PM, Arnout Vandecappelle wrote:
>>>>>
>>>>> However, have you also looked into the option of using Buildroot's libtool
>>>>> instead of the bundled libltdl? If that doesn't work for some reason, I'd like
>>>>> to add it in the commit log so a future developer who wants to give it go can
>>>>> see what has been tried already.
>>>>>
>>>
>>> From what I understand, the packaged libltdl in Squid comes from its
>>> bootstrap.
>>
>> We probably don't want to use the bootstrap script :-)
>>
>> What I meant was: make squid depend on libtool (target libtool, not host
>> libtool), and remove libltdl from SUBDIRS in Makefile.am. Probably something
>> goes wrong somewhere on the way, so that would have to be fixed as well.
>>
> 
> Yes, I see what you mean. I'll look into this and fix what breaks.

 Great!

 Note that in the meantime, Thomas has reverted the automake bump as a quick way
to fix the issue. So when you repost, please also include the automake bump in
the series (the squid update should be the first patch, the automake bump the
second one).

 Thanks!

 Regards,
 Arnout

> 
>> Regards,
>> Arnout
>>
> 
> --
> Jean-François Têtu
>

Patch

diff --git a/package/squid/squid.mk b/package/squid/squid.mk
index 2d21ad8858..06442157d6 100644
--- a/package/squid/squid.mk
+++ b/package/squid/squid.mk
@@ -12,6 +12,7 @@  SQUID_LICENSE = GPL-2.0+
 SQUID_LICENSE_FILES = COPYING
 # For 0001-assume-get-certificate-ok.patch
 SQUID_AUTORECONF = YES
+SQUID_AUTORECONF_OPTS = -fi configure.ac libltdl/configure.ac
 SQUID_DEPENDENCIES = libcap host-libcap host-pkgconf \
 	$(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack)
 SQUID_CONF_ENV = \