GNU bug report logs -
#30631
Automake 1.6 fails to build with perl 5.18.2
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30631 in the body.
You can then email your comments to 30631 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#30631
; Package
automake
.
(Tue, 27 Feb 2018 18:05:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andreas Schwab <schwab <at> linux-m68k.org>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Tue, 27 Feb 2018 18:05:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I get this build failure when building automake 1.6 with perl 5.18.2:
$ make -j4
GEN bin/automake
GEN bin/aclocal
GEN t/ax/shell-no-trail-bslash
GEN t/ax/cc-no-c-o
GEN runtest
GEN doc/aclocal.1
GEN doc/automake.1
GEN lib/Automake/Config.pm
GEN t/ax/test-defs.sh
GEN bin/aclocal-1.16
GEN bin/automake-1.16
GEN doc/aclocal-1.16.1
GEN doc/automake-1.16.1
help2man: can't get `--help' info from automake-1.16
Try `--no-discard-stderr' if option outputs to stderr
Makefile:3694: recipe for target 'doc/automake-1.16.1' failed
make: *** [doc/automake-1.16.1] Error 255
make: *** Waiting for unfinished jobs....
$ ./pre-inst-env automake-1.16 --help
"none" is not exported by the List::Util module
Can't continue after import errors at /home/abuild/rpmbuild/BUILD/automake-1.16/bin/automake-1.16 line 76.
BEGIN failed--compilation aborted at /home/abuild/rpmbuild/BUILD/automake-1.16/bin/automake-1.16 line 76.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
bug-automake <at> gnu.org
:
bug#30631
; Package
automake
.
(Sat, 03 Mar 2018 15:06:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 30631 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
I have found the same bug as you (and have a solution)
The problem is that automake 1.16 is importing the function "none" from
perl List::Util module.
Unfortunately, "none" was only added to that module in v 1.33 and Perl
5.18 has an older version.
This only occurs in "bin/automake.in"
The simplest patch is for the authors to change
use List::Util 'none'
=>
use List::Util 'any'
And replace their use of the function (only one case) as so:
&& none {
=>
&& ! any {
I can't seem to find an online bug tracker for automake so I am guessing
the mailing list I
found your message on is all there is?
If so, could you please pass this on to the maintainers?
Best,
Torsten
A/Prof. Torsten Seemann
*Lead Bioinformatician*
*Melbourne Bioinformatics: melbournebioinformatics.org.au
<http://melbournebioinformatics.org.au>*
*Microbiological Diagnostic Unit Public Health Laboratory:
mduphl.unimelb.edu.au <http://mduphl.unimelb.edu.au>*
*University of Melbourne, Parkville, AUSTRALIA.*
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-automake <at> gnu.org
:
bug#30631
; Package
automake
.
(Sun, 04 Mar 2018 00:15:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 30631 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
Torsten Seemann <tseemann <at> unimelb.edu.au> writes:
> The problem is that automake 1.16 is importing the function "none"
> from perl List::Util module. Unfortunately, "none" was only added to
> that module in v 1.33 and Perl 5.18 has an older version. This only
> occurs in "bin/automake.in"
>
> The simplest patch is for the authors to change
>
> use List::Util 'none'
> =>
> use List::Util 'any'
>
> And replace their use of the function (only one case) as so:
>
> && none {
> =>
> && ! any {
According to [1] both 'none' and 'any' were added in List::Util 1.33.
There is indeed a portability bug on the Automake side since
'configure.ac' claims to be compatible with Perl 5.6 and Looking at the
perl distributions [2] it seems that 5.6.2 does not have List::Util.
This requirement could probably be relaxed since Perl 5.6 is 18 years
old, however this can't be done in the micro (bugfix) release I intend
to make after fixing this bug. So let's reimplement it ourselves for
now.
[0001-automake-Don-t-rely-on-List-Util-to-provide-none.patch (text/x-patch, inline)]
From 666b787749b5986f7a30453741ca206b6b6ff164 Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl <at> gnu.org>
Date: Sat, 3 Mar 2018 23:50:10 +0100
Subject: [PATCH] automake: Don't rely on List::Util to provide 'none'
This change fixes automake bug#30631.
This removes the use of List::Util which is not supported by Perl 5.6,
by reimplementing the 'none' subroutine.
* lib/Automake/General.pm (none): New subroutine.
* bin/automake.in (handle_single_transform): Use it.
* t/pm/General.pl: New test.
* t/list-of-tests.mk (perl_TESTS): Add it.
---
bin/automake.in | 3 +--
lib/Automake/General.pm | 20 +++++++++++++++++++-
t/list-of-tests.mk | 1 +
t/pm/General.pl | 27 +++++++++++++++++++++++++++
4 files changed, 48 insertions(+), 3 deletions(-)
create mode 100644 t/pm/General.pl
diff --git a/bin/automake.in b/bin/automake.in
index 16fb45182..a52a48951 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -73,7 +73,6 @@ use Automake::Wrap 'makefile_wrap';
use Automake::Language;
use File::Basename;
use File::Spec;
-use List::Util 'none';
use Carp;
## ----------------------- ##
@@ -1793,7 +1792,7 @@ sub handle_single_transform
my $dname = $derived;
if ($directory ne ''
&& option 'subdir-objects'
- && none { $dname =~ /$_$/ } @dup_shortnames)
+ && none { $dname =~ /$_[0]$/ } @dup_shortnames)
{
# At this point, we don't clear information about what
# parts of $derived are truly file name components. We can
diff --git a/lib/Automake/General.pm b/lib/Automake/General.pm
index 32f5c8db7..aa2de38b8 100644
--- a/lib/Automake/General.pm
+++ b/lib/Automake/General.pm
@@ -23,7 +23,7 @@ use File::Basename;
use vars qw (@ISA @EXPORT);
@ISA = qw (Exporter);
-@EXPORT = qw (&uniq $me);
+@EXPORT = qw (&uniq &none $me);
# Variable we share with the main package. Be sure to have a single
# copy of them: using 'my' together with multiple inclusion of this
@@ -66,5 +66,23 @@ sub uniq (@)
return wantarray ? @res : "@res";
}
+# $RES
+# none (&PRED, @LIST)
+# ------------
+# Return 1 when no element in LIST satisfies predicate PRED otherwise 0.
+sub none (&@)
+{
+ my ($pred, @list) = @_;
+ my $res = 1;
+ foreach my $item (@list)
+ {
+ if ($pred->($item))
+ {
+ $res = 0;
+ last;
+ }
+ }
+ return $res;
+}
1; # for require
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 271bfb573..84dd29af0 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -54,6 +54,7 @@ t/pm/DisjCon2.pl \
t/pm/DisjCon3.pl \
t/pm/DisjConditions.pl \
t/pm/DisjConditions-t.pl \
+t/pm/General.pl \
t/pm/Version.pl \
t/pm/Version2.pl \
t/pm/Version3.pl \
diff --git a/t/pm/General.pl b/t/pm/General.pl
new file mode 100644
index 000000000..0caefe7cf
--- /dev/null
+++ b/t/pm/General.pl
@@ -0,0 +1,27 @@
+# Copyright (C) 2018 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+use Automake::General;
+
+my $failed = 0;
+
+# Check 'none'.
+my $none_positive = none { $_[0] < 0 } (1, 7, 3, 8, 9);
+$failed = 1 if ($none_positive == 0);
+
+my $none_gt_8 = none { $_[0] >= 8 } (1, 7, 3, 8, 9);
+$failed = 1 if ($none_gt_8 == 1);
+
+exit $failed;
--
2.16.2
[Message part 3 (text/plain, inline)]
How does it sound?
[1] https://metacpan.org/changes/distribution/Scalar-List-Utils#L156
[2] https://www.cpan.org/src/README.html
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Information forwarded
to
bug-automake <at> gnu.org
:
bug#30631
; Package
automake
.
(Sun, 04 Mar 2018 04:41:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 30631 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Mathieu,
That patch looks good - removing List::Util altogether is probably the
right thing. And tests too.
For linuxbrew, this is the patch I proposed - it uses `reduce` which has
been part of List::Util from the start (I think).
https://github.com/Linuxbrew/homebrew-core/pull/6352/files
+-use List::Util 'none';
++use List::Util 'reduce';
++sub none (&@) { my $code=shift; reduce { $a && !$code->(local $_ = $b) }
1, @_; }
We appreciate the fast response, as there is lots of infrastructure still
on Ubuntu 14 LTS which uses old Perl 5.18.
Thank you,
Torsten.
A/Prof. Torsten Seemann
*Lead Bioinformatician*
*Melbourne Bioinformatics: melbournebioinformatics.org.au
<http://melbournebioinformatics.org.au>*
*Microbiological Diagnostic Unit Public Health Laboratory:
mduphl.unimelb.edu.au <http://mduphl.unimelb.edu.au>*
*University of Melbourne, Parkville, AUSTRALIA.*
On 4 March 2018 at 10:49, Mathieu Lirzin <mthl <at> gnu.org> wrote:
> Hello,
>
> Torsten Seemann <tseemann <at> unimelb.edu.au> writes:
>
> > The problem is that automake 1.16 is importing the function "none"
> > from perl List::Util module. Unfortunately, "none" was only added to
> > that module in v 1.33 and Perl 5.18 has an older version. This only
> > occurs in "bin/automake.in"
> >
> > The simplest patch is for the authors to change
> >
> > use List::Util 'none'
> > =>
> > use List::Util 'any'
> >
> > And replace their use of the function (only one case) as so:
> >
> > && none {
> > =>
> > && ! any {
>
> According to [1] both 'none' and 'any' were added in List::Util 1.33.
>
> There is indeed a portability bug on the Automake side since
> 'http://configure.ac' claims to be compatible with Perl 5.6 and Looking
> at the
> perl distributions [2] it seems that 5.6.2 does not have List::Util.
>
> This requirement could probably be relaxed since Perl 5.6 is 18 years
> old, however this can't be done in the micro (bugfix) release I intend
> to make after fixing this bug. So let's reimplement it ourselves for
> now.
>
>
>
> How does it sound?
>
> [1] https://metacpan.org/changes/distribution/Scalar-List-Utils#L156
> [2] https://www.cpan.org/src/README.html
>
> --
> Mathieu Lirzin
> GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
>
>
[Message part 2 (text/html, inline)]
Reply sent
to
Mathieu Lirzin <mthl <at> gnu.org>
:
You have taken responsibility.
(Thu, 08 Mar 2018 20:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Andreas Schwab <schwab <at> linux-m68k.org>
:
bug acknowledged by developer.
(Thu, 08 Mar 2018 20:41:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 30631-done <at> debbugs.gnu.org (full text, mbox):
Torsten Seemann <tseemann <at> unimelb.edu.au> writes:
> That patch looks good - removing List::Util altogether is probably the right thing. And tests too.
Pushed as commit 74902aa24d4c313ab51fa684142d9240f636971a.
Thanks for the review.
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Added tag(s) fixed.
Request was from
Mathieu Lirzin <mthl <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 08 Mar 2018 21:42:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-automake <at> gnu.org
:
bug#30631
; Package
automake
.
(Thu, 08 Mar 2018 23:09:01 GMT)
Full text and
rfc822 format available.
Message #24 received at 30631-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Awesome, thanks!
On 9 Mar. 2018 07:40, "Mathieu Lirzin" <mthl <at> gnu.org> wrote:
> Torsten Seemann <tseemann <at> unimelb.edu.au> writes:
>
> > That patch looks good - removing List::Util altogether is probably the
> right thing. And tests too.
>
> Pushed as commit 74902aa24d4c313ab51fa684142d9240f636971a.
>
> Thanks for the review.
>
> --
> Mathieu Lirzin
> GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
>
>
[Message part 2 (text/html, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 06 Apr 2018 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 70 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.