atoomic / perl-TimeDate

time & date parsing and formatting perl library
http://search.cpan.org/dist/TimeDate/
1 stars 3 forks source link

NetBSD: Unable to install TimeDate distribution; WriteMakefile() gags #41

Closed jkeenan closed 4 years ago

jkeenan commented 4 years ago

Today I had occasion to try to install the TimeDate distribution (as a prerequisite to other modules) on NetBSD-8 against perl 5 blead at a commit between perl-5.31.10 and perl-5.31.11. I used 'cpanm' as the installer. 'cpanm' gagged on TimeDate's Makefile.PL, so the distro's modules and revdeps failed to install.

$ uname -mrs
NetBSD 8.0 amd64

$ bleadperl -v | head -2 | tail -1
This is perl 5, version 32, subversion 0 (v5.32.0 (v5.31.10-26-g45f87e6586)) built for amd64-netbsd-thread-multi

$ bleadperl Makefile.PL
Checking if your kit is complete...
Looks good
Bareword found where operator expected at ./Makefile.PL line 1, near "30 mtime"
        (Missing operator before mtime?)
ERROR from evaluation of /home/jkeenan/.cpanm/work/1588960732.3465/TimeDate-2.32/PaxHeader/Makefile.PL: syntax error at ./Makefile.PL line 1, near "30 mtime"

$ bleadperl -d Makefile.PL

Loading DB routines from perl5db.pl version 1.56
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main::(Makefile.PL:20):   (eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()),
main::(Makefile.PL:21): );
  DB<1> c
Checking if your kit is complete...
Looks good
Bareword found where operator expected at ./Makefile.PL line 1, near "30 mtime"
 at ./Makefile.PL line 1.
        require ./Makefile.PL called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 257
        ExtUtils::MakeMaker::eval_in_x(PACK001=HASH(0x7dfe553fd750), "/home/jkeenan/.cpanm/work/1588960732.3465/TimeDate-2.32/PaxHe"...) called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 244
        eval {...} called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 244
        ExtUtils::MakeMaker::eval_in_subdirs(PACK001=HASH(0x7dfe553fd750)) called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 824
        ExtUtils::MakeMaker::new("MM", PACK001=HASH(0x7dfe553fd750)) called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 77
        ExtUtils::MakeMaker::WriteMakefile("NAME", "Date::Parse", "DISTNAME", "TimeDate", "AUTHOR", "Graham Barr <gbarr\@pobox.com>", "VERSION_FROM", "lib/Date/Parse.pm", ...) called at Makefile.PL line 20
        (Missing operator before mtime?)
 at ./Makefile.PL line 1.
        require ./Makefile.PL called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 257
        ExtUtils::MakeMaker::eval_in_x(PACK001=HASH(0x7dfe553fd750), "/home/jkeenan/.cpanm/work/1588960732.3465/TimeDate-2.32/PaxHe"...) called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 244
        eval {...} called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 244
        ExtUtils::MakeMaker::eval_in_subdirs(PACK001=HASH(0x7dfe553fd750)) called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 824
        ExtUtils::MakeMaker::new("MM", PACK001=HASH(0x7dfe553fd750)) called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 77
        ExtUtils::MakeMaker::WriteMakefile("NAME", "Date::Parse", "DISTNAME", "TimeDate", "AUTHOR", "Graham Barr <gbarr\@pobox.com>", "VERSION_FROM", "lib/Date/Parse.pm", ...) called at Makefile.PL line 20
ERROR from evaluation of /home/jkeenan/.cpanm/work/1588960732.3465/TimeDate-2.32/PaxHeader/Makefile.PL: syntax error at ./Makefile.PL line 1, near "30 mtime"
 at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 248.
        ExtUtils::MakeMaker::eval_in_subdirs(PACK001=HASH(0x7dfe553fd750)) called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 824
        ExtUtils::MakeMaker::new("MM", PACK001=HASH(0x7dfe553fd750)) called at /home/jkeenan/testing/blead/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm line 77
        ExtUtils::MakeMaker::WriteMakefile("NAME", "Date::Parse", "DISTNAME", "TimeDate", "AUTHOR", "Graham Barr <gbarr\@pobox.com>", "VERSION_FROM", "lib/Date/Parse.pm", ...) called at Makefile.PL line 20
Debugged program terminated.  Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.
  DB<1> 

The distribution contains a file PaxHeader/Makefile.PL which appears to be confusing WriteMakefile().

$ cat PaxHeader/Makefile.PL 
30 mtime=1579556768.563418891

Can you investigate?

Thank you very much. Jim Keenan

jkeenan commented 4 years ago
  1. This problem is showing up in some (but not all) CPANtesters results for the TimeDate distribution on NetBSD. Tests are being graded UNKNOWN, which is typical for configure-time failures.
  2. The problem goes away if I rename PaxHeader/Makefile.PL so that it is no longer recognized as a subdirectory Makefile.PL and all trace of "PaxHeader" vanishes from the Makefile. I was able to configure, build, test and install the distribution and then install its important revdeps such as HTTP::Response. But I don't know what that implies for the TimeDate test suite.

Please investigate.

Thank you very much. Jim Keenan

atoomic commented 4 years ago

this needs investigation, will try to spend some time today on it I think the issue is coming from the published tarball containing some PAX Headers need to regenerate the tarball and confirm it's fine then publish

atoomic commented 4 years ago

I think the issue comes from using bsd tar from macOS when building the tarball

╰─> wget https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/TimeDate-2.32.tar.gz
╰─> zgrep -a -e '[P]axHeader' TimeDate-2.32.tar.gz.1
TimeDate-2.32/lib/000755 000767 000024 00000000000 13630020510 014465 5ustar00nicolasstaff000000 000000 TimeDate-2.32/PaxHeader/Makefile.PL000644 000767 000024 00000000036 13611417640 017656 xustar00nicolasstaff000000 000000 30 mtime=1579556768.563418891
1;TimeDate-2.32/lib/Date/Language/PaxHeader/French.pm000644 000767 000024 00000000036 13611433207 022612 xustar00nicolasstaff000000 000000 30 mtime=1579562631.973328945
atoomic commented 4 years ago

@jkeenan v2.33 should fix the issue, waiting for your confirmation before closing it's currently on its way to PAUSE

jkeenan commented 4 years ago
$ uname -mrs
NetBSD 8.0 amd64
$ bleadperl -v | head -2 | tail -1
This is perl 5, version 32, subversion 0 (v5.32.0 (v5.31.10-26-g45f87e6586)) built for amd64-netbsd-thread-multi
$ bleadperl -MTime::Zone -E 'say $Time::Zone::VERSION;'
2.24

LGTM. Thanks for your investigation. Closing.