Bug 209768 - devel/autoconf: fix with Perl 5.25 (I think)
Summary: devel/autoconf: fix with Perl 5.25 (I think)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tijl Coosemans
URL: http://aragorn.in.absolight.net/p/dat...
Depends on:
Reported: 2016-05-26 15:50 UTC by Mathieu Arnold
Modified: 2016-05-31 12:12 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (tijl)

patch (599 bytes, patch)
2016-05-26 15:50 UTC, Mathieu Arnold
no flags Details | Diff
patch-v2 (614 bytes, patch)
2016-05-26 16:00 UTC, Mathieu Arnold
no flags Details | Diff
patch-v3 (517 bytes, patch)
2016-05-31 10:49 UTC, Mathieu Arnold
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Arnold freebsd_committer 2016-05-26 15:50:49 UTC
Created attachment 170685 [details]

It fails with a strange error:

Updating man page autoscan.1
PATH="../tests:../build-aux:$PATH"; \
export PATH; \
/bin/sh /home/mat/work/tmp/home/mat/work/freebsd/ports/devel/autoconf/work/autoconf-2.69/build-aux/missing --run help2man \
    --include=autoscan.x \
    --include=./common.x \
    --source='GNU Autoconf 2.69' \
    --output=autoscan.1.t `echo 'autoscan' | sed 's,.*/,,'`
help2man: can't get `--help' info from autoscan
Try `--no-discard-stderr' if option outputs to stderr

Adding --no-discard-stderr to the command "fixes" the build, but I'm not sure it's really what should be done, and as it's not just some common port, I'd rather the maintainer have a look...
Comment 1 Mathieu Arnold freebsd_committer 2016-05-26 16:00:26 UTC
Created attachment 170687 [details]

With a patch that works.
Comment 2 Tijl Coosemans freebsd_committer 2016-05-30 19:37:28 UTC
Does '/home/mat/work/tmp/home/mat/work/freebsd/ports/devel/autoconf/work/autoconf-2.69/autoscan --help' output anything?  And is that on stdout or stderr?
Comment 3 Tijl Coosemans freebsd_committer 2016-05-30 19:38:19 UTC
That should be '/home/mat/work/tmp/home/mat/work/freebsd/ports/devel/autoconf/work/autoconf-2.69/bin/autoscan --help'
Comment 4 Mathieu Arnold freebsd_committer 2016-05-31 10:41:34 UTC
Ah, I thought I was masking the problem instead of fixing it... It fails:

root@10amd64-ports-perl5-devel:~ # /wrkdirs/usr/ports/devel/autoconf/work/autoconf-2.69/bin/autoscan --help
Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /usr/local/share/autoconf-2.69 /usr/local/lib/perl5/site_perl/mach/5.25 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.25/mach /usr/local/lib/perl5/5.25 .) at /wrkdirs/usr/ports/devel/autoconf/work/autoconf-2.69/bin/autoscan line 38.
BEGIN failed--compilation aborted at /wrkdirs/usr/ports/devel/autoconf/work/autoconf-2.69/bin/autoscan line 38.

I'll investigate and report back :-)
Comment 5 Mathieu Arnold freebsd_committer 2016-05-31 10:47:24 UTC
And with the correct PERL5LIB, it's failing with another problem, which is the real problem, I'll provide a correct patch.

root@10amd64-ports-perl5-devel:/usr/ports/devel/autoconf # env PERL5LIB=/wrkdirs/usr/ports/devel/autoconf/work/autoconf-2.69/lib /wrkdirs/usr/ports/devel/autoconf/work/autoconf-2.69/bin/autoscan --help
Unescaped left brace in regex is illegal in regex; marked by <-- HERE in m/\${ <-- HERE [^\}]*}/ at /wrkdirs/usr/ports/devel/autoconf/work/autoconf-2.69/bin/autoscan line 361.
Comment 6 Mathieu Arnold freebsd_committer 2016-05-31 10:49:07 UTC
Created attachment 170861 [details]

Having unescaped braces was always bad, it started emitting warnings with Perl 5.22, and it is illegal in Perl 5.25.1
Comment 7 commit-hook freebsd_committer 2016-05-31 12:10:22 UTC
A commit references this bug:

Author: tijl
Date: Tue May 31 12:09:50 UTC 2016
New revision: 416194
URL: https://svnweb.freebsd.org/changeset/ports/416194

  Fix autoscan script with newer versions of Perl (escape left brace in regex)

  PR:		209768
  Submitted by:	mat