Linuxbrew-core: "help2man: can't get `--help' info from automake-1.16"

Created on 27 Feb 2018  ·  22Comments  ·  Source: Homebrew/linuxbrew-core

Builds on macosx high sierra fine, but not #linuxbrew:

==> Downloading https://ftp.gnu.org/gnu/automake/automake-1.16.tar.xz
################################################################################################### 100.0%
==> ./configure --prefix=/home/linuxbrew/.linuxbrew/Cellar/automake/1.16
==> make install
Last 15 lines from /home/linuxbrew/.cache/Homebrew/Logs/automake/02.make:
  GEN      t/ax/shell-no-trail-bslash
  GEN      t/ax/cc-no-c-o
  GEN      doc/aclocal.1
  GEN      runtest
  GEN      doc/automake.1
  GEN      lib/Automake/Config.pm
  GEN      t/ax/test-defs.sh
  GEN      bin/aclocal-1.16
  GEN      doc/aclocal-1.16.1
  GEN      bin/automake-1.16
  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
make: *** [doc/automake-1.16.1] Error 255
make: *** Waiting for unfinished jobs....

On macosx the lines after this are:

 lib/install-sh -c -d '/usr/local/Cellar/automake/1.16/bin'
 lib/install-sh -c -d '/usr/local/Cellar/automake/1.16/share/automake-1.16/am'
 lib/install-sh -c -d '/usr/local/Cellar/automake/1.16/share/aclocal-1.16'
 lib/install-sh -c -d '/usr/local/Cellar/automake/1.16/share/aclocal-1.16/internal'
mkdir: /usr/local/Cellar/automake/1.16/share: File exists
 /usr/bin/install -c bin/automake bin/aclocal '/usr/local/Cellar/automake/1.16/bin'
build failure outdated

Most helpful comment

I just hit the same error trying to install automake (brew install automake). I'm on CentOS 6.9.

All 22 comments

Hmm, when i run gist-logs:

brew gist-logs automake
Error: source sequence is illegal/malformed utf-8
Please report this bug:
  https://github.com/Linuxbrew/brew/blob/master/docs/Troubleshooting.md#troubleshooting
/home/linuxbrew/.linuxbrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/json/common.rb:224:in `generate'
/home/linuxbrew/.linuxbrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/json/common.rb:224:in `generate'
/home/linuxbrew/.linuxbrew/Library/Homebrew/utils/github.rb:146:in `open'
/home/linuxbrew/.linuxbrew/Library/Homebrew/cmd/gist-logs.rb:116:in `create_gist'
/home/linuxbrew/.linuxbrew/Library/Homebrew/cmd/gist-logs.rb:48:in `gistify_logs'
/home/linuxbrew/.linuxbrew/Library/Homebrew/cmd/gist-logs.rb:129:in `gist_logs'
/home/linuxbrew/.linuxbrew/Library/Homebrew/brew.rb:100:in `<main>'

I just hit the same error trying to install automake (brew install automake). I'm on CentOS 6.9.

I just pushed the bottle: #6270
Build works on ubuntu 16.04.

Maybe you could dig a little bit further to try to debug this?

(Hello there @dsarov!)

Ok, so help2man accepts a GNU-style binary, and runs it with --help and outputs a man page for the tool. Very slick.

% help2man automake

.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.5.
.TH AUTOMAKE "1" "February 2018" "automake 1.15.1" "User Commands"
.SH NAME
automake \- manual page for automake 1.15.1
.SH SYNOPSIS

help2man comes from the help2man package.

Does it need depends_on "help2man" => :build ?
it's running it on automake-1.6 and not automake. why is that?

I've installed the bottle and run

% help2man /home/linuxbrew/.linuxbrew/Cellar/automake/1.16/bin/automake-1.16

help2man: can't get `--help' info from /home/linuxbrew/.linuxbrew/Cellar/automake/1.16/bin/automake-1.16
Try `--no-discard-stderr' if option outputs to stderr

to reproduce the error.

So I tried to run the help directly:

/home/linuxbrew/.linuxbrew/Cellar/automake/1.16/bin/automake --help
"none" is not exported by the List::Util module
Can't continue after import errors at /home/linuxbrew/.linuxbrew/Cellar/automake/1.16/bin/automake line 76.
BEGIN failed--compilation aborted at /home/linuxbrew/.linuxbrew/Cellar/automake/1.16/bin/automake line 76.

Turns out it is a Perl script!
With the non-brewed header: #!/usr/bin/perl -w

The recipe has ENV["PERL"] = "/usr/bin/perl" if OS.mac?

@iMichka - i guess we need to point it to /usr/bin/env perl and ordepends_on perl ?

i add --env=std and build successfully
who can explain about env args
i have installed brewed help2man/perl

@okhowang mac or linux? if linux, which dist?

linux centos6
my system has no help2man
but i installed a brewed help2man in my PATH
but it seems not recognized when brew upgrade automake without --env=std

Changing #!/usr/bin/perl -w to the brewed Perl worked around the issue for me.

@iMichka How should we resolve this? I'm afraid that if we make automake depend on brewed perl it will cause cyclic dependencies. Change the interpreter to #!/usr/bin/env perl?

❯❯❯ /usr/bin/perl -e 'use List::Util qw(none)'
"none" is not exported by the List::Util module
Can't continue after import errors at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
❯❯❯ /usr/bin/perl --version
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi

Why hasn't this issue come up before? Is List::Util qw(none) a new dependency of Automake? What version of Perl does include List::Util qw(none any)?

List::Util has been around in perl core for a long time, and the none() function has too I believe. So this is weird.

Since version 1.33.

https://perldoc.perl.org/List/Util.html#any

❯❯❯ /usr/bin/perl -MList::Util -e 'print $List::Util::VERSION';
1.27
❯❯❯ /usr/bin/perl --version
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
❯❯❯ cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 

😭

❯❯❯ docker run -it --rm ubuntu:14.04 /usr/bin/perl -MList::Util -e 'print $List::Util::VERSION'
1.27
❯❯❯ docker run -it --rm ubuntu:16.04 /usr/bin/perl -MList::Util -e 'print $List::Util::VERSION'
1.41
❯❯❯ docker run -it --rm ubuntu:14.04 /usr/bin/perl --version
This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi
❯❯❯ docker run -it --rm ubuntu:16.04 /usr/bin/perl --version
This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi

Ubuntu 14.04 was 17 April 2014 ... 4 years ago.

The perl version was 2 versions earlier (odds are dev), and the module is core. This means none was not a function is 1.27 version of the module I guess?

Perl is now at 5.26 or 5.28. I never liked the way they added functions to core modules. Causes so much pain.

So it seems none came in at List::Util 1.33 @sjackman
It is just ! any ...

notall
    my $bool = none { BLOCK } @list;
    my $bool = notall { BLOCK } @list;

Since version 1.33.

Similar to "any" and "all", but with the return sense inverted. none 
returns true only if no value in the @list causes the BLOCK to return true, 
and notall returns true only if not all of the values do.

it's hard to embed as you need to compile the XS code as well. Bloody annoying.

Best solution would be for automake to use ! any instead.

WE ARE NOT ALONE!

http://lists.gnu.org/archive/html/bug-automake/2018-02/msg00018.html

"I get this build failure when building automake 1.6 with perl 5.18.2"

It looks like any, all, none, notall were all introduced in List::Util 1.33.
https://perldoc.perl.org/List/Util.html#any

WHOOPS.

@sjackman I have patched automake for linuxbrew https://github.com/Linuxbrew/homebrew-core/pull/6352/files

It should work with older versions of Perl List::Util. It makes it's own none function using reduce instead.

THis is a blocker because I can't build any autogen.sh packages on bio.

CircleCI is running on Ubuntu 16.04, which should be fine. Once the formulae are bottled, you can use those bottles on your machine, since automake is a build dependency. I agree it's an important issue to fix, but it shouldn't hold back your Brewsci/bio development.

This issue will hopefully be resolved by PR https://github.com/Linuxbrew/homebrew-core/pull/6352

Was this page helpful?
0 / 5 - 0 ratings