beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 138 forks source link

Cygwin CPAN ack-2.18 Can't exec "bash" #651

Closed dcgomesbr closed 4 years ago

dcgomesbr commented 7 years ago

I saw this being reported for 2.12 and fixed in 2.14, or something like that.

I've just tried to install from CPAN in 2.18 and got the same error.

The problem is that I've got bash installed:

$ bash --version GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

cpan[5]> install App::Ack
Running install for module 'App::Ack'
Checksum for /home/DANIELDEGomes/.cpan/sources/authors/id/P/PE/PETDANCE/ack-2.18.tar.gz ok
Configuring P/PE/PETDANCE/ack-2.18.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for ack
Writing MYMETA.yml and MYMETA.json
  PETDANCE/ack-2.18.tar.gz
  /usr/bin/perl Makefile.PL -- OK
Running make for P/PE/PETDANCE/ack-2.18.tar.gz
cp IsPath.pm blib/lib/App/Ack/Filter/IsPath.pm
cp Default.pm blib/lib/App/Ack/Filter/Default.pm
cp IsGroup.pm blib/lib/App/Ack/Filter/IsGroup.pm
cp ConfigFinder.pm blib/lib/App/Ack/ConfigFinder.pm
cp ConfigDefault.pm blib/lib/App/Ack/ConfigDefault.pm
cp Is.pm blib/lib/App/Ack/Filter/Is.pm
cp Extension.pm blib/lib/App/Ack/Filter/Extension.pm
cp Filter.pm blib/lib/App/Ack/Filter.pm
cp ExtensionGroup.pm blib/lib/App/Ack/Filter/ExtensionGroup.pm
cp Collection.pm blib/lib/App/Ack/Filter/Collection.pm
cp IsPathGroup.pm blib/lib/App/Ack/Filter/IsPathGroup.pm
cp Resource.pm blib/lib/App/Ack/Resource.pm
cp FirstLineMatch.pm blib/lib/App/Ack/Filter/FirstLineMatch.pm
cp Match.pm blib/lib/App/Ack/Filter/Match.pm
cp Resources.pm blib/lib/App/Ack/Resources.pm
cp Ack.pm blib/lib/App/Ack.pm
cp MatchGroup.pm blib/lib/App/Ack/Filter/MatchGroup.pm
cp ConfigLoader.pm blib/lib/App/Ack/ConfigLoader.pm
cp Inverse.pm blib/lib/App/Ack/Filter/Inverse.pm
cp ack blib/script/ack
"/usr/bin/perl.exe" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/ack
Manifying 1 pod document
  PETDANCE/ack-2.18.tar.gz
  make -- OK
Running make test
Manifying 1 pod document
"/usr/bin/perl.exe" t/runtests.pl 0 0 "blib/lib" "blib/arch" t/*.t t/lib/*.t
Running tests on blib/script/ack
t/00-load.t .................. 1/1 # Testing ack version 2.18 under Perl 5.022004, /usr/bin/perl
# Using File::Next 1.16
# Using File::Spec 3.56_02
# Using Getopt::Long 2.45
# Using Pod::Usage 1.64
# Using Test::Harness 3.35_01
# Using Test::More 1.001014
t/00-load.t .................. ok
t/ack-1.t .................... ok
t/ack-c.t .................... ok
t/ack-color.t ................ ok
t/ack-column.t ............... ok
t/ack-create-ackrc.t ......... ok
t/ack-dump.t ................. ok
t/ack-f.t .................... ok
t/ack-files-from.t ........... ok
t/ack-filetypes.t ............ ok
t/ack-g.t .................... ok
t/ack-group.t ................ ok
t/ack-h.t .................... ok
t/ack-help-types.t ........... ok
t/ack-help.t ................. ok
t/ack-i.t .................... ok
t/ack-ignore-dir.t ........... ok
t/ack-ignore-file.t .......... skipped: Not yet implemented
t/ack-interactive.t .......... ok
t/ack-invalid-ackrc.t ........ skipped: Don't yet have a reliable way to ignore the Unicode complaints from Pod::Perldoc
t/ack-k.t .................... ok
t/ack-known-types.t .......... ok
t/ack-line.t ................. ok
t/ack-m.t .................... ok
t/ack-match.t ................ ok
t/ack-n.t .................... ok
t/ack-named-pipes.t .......... ok
t/ack-o.t .................... ok
t/ack-output.t ............... ok
t/ack-pager.t ................ 1/15
    #   Failed test 'PAGER'
    #   at t/Util.pm line 415.
    #     Structures begin differing at:
    #          $got->[0] = '/usr/bin/env: ‘perl’: No such file or directory'
    #     $expected->[0] = 't/text/boy-named-sue.txt'
    # actual[
    #   '/usr/bin/env: ‘perl’: No such file or directory'
    # ]
    # expected[
    #   't/text/boy-named-sue.txt',
    #   '6:Was before he left, he went and named me Sue.',
    #   '13:I tell ya, life ain\'t easy for a boy named Sue.',
    #   '27:Sat the dirty, mangy dog that named me Sue.',
    #   '34:And I said: "My name is Sue! How do you do! Now you gonna die!"',
    #   '62:Cause I\'m the son-of-a-bitch that named you Sue."',
    #   '70:Bill or George! Anything but Sue! I still hate that name!',
    #   '72:    -- "A Boy Named Sue", Johnny Cash'
    # ]
    # Looks like you failed 1 test of 1.

#   Failed test 'lists_match( PAGER )'
#   at t/ack-pager.t line 57.
t/ack-pager.t ................ 3/15
    #   Failed test 'PAGER_WITH_OPTS'
    #   at t/Util.pm line 415.
    #     Structures begin differing at:
    #          $got->[0] = '/usr/bin/env: ‘perl’: No such file or directory'
    #     $expected->[0] = 't/text/boy-named-sue.txt'
    # actual[
    #   '/usr/bin/env: ‘perl’: No such file or directory'
    # ]
    # expected[
    #   't/text/boy-named-sue.txt',
    #   '13:I tell ya, life ain\'t easy for a boy named Sue.',
    #   '34:And I said: "My name is Sue! How do you do! Now you gonna die!"',
    #   '70:Bill or George! Anything but Sue! I still hate that name!'
    # ]
    # Looks like you failed 1 test of 1.

#   Failed test 'lists_match( PAGER_WITH_OPTS )'
#   at t/ack-pager.t line 72.
t/ack-pager.t ................ 7/15
    #   Failed test 'PAGER_ACKRC'
    #   at t/Util.pm line 415.
    #     Structures begin differing at:
    #          $got->[0] = '/usr/bin/env: ‘perl’: No such file or directory'
    #     $expected->[0] = 't/text/boy-named-sue.txt'
    # actual[
    #   '/usr/bin/env: ‘perl’: No such file or directory'
    # ]
    # expected[
    #   't/text/boy-named-sue.txt',
    #   '13:I tell ya, life ain\'t easy for a boy named Sue.',
    #   '34:And I said: "My name is Sue! How do you do! Now you gonna die!"',
    #   '70:Bill or George! Anything but Sue! I still hate that name!'
    # ]
    # Looks like you failed 1 test of 1.

#   Failed test 'lists_match( PAGER_ACKRC )'
#   at t/ack-pager.t line 152.
t/ack-pager.t ................ 12/15 # Looks like you failed 3 tests of 15.
t/ack-pager.t ................ Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/15 subtests
t/ack-passthru.t ............. ok
t/ack-print0.t ............... ok
t/ack-removed-options.t ...... ok
t/ack-s.t .................... ok
t/ack-show-types.t ........... ok
t/ack-type-del.t ............. ok
t/ack-type.t ................. ok
t/ack-v.t .................... ok
t/ack-w.t .................... ok
t/ack-x.t .................... ok
t/anchored.t ................. ok
t/asp-net-ext.t .............. ok
t/bad-ackrc-opt.t ............ ok
t/basic.t .................... ok
t/command-line-files.t ....... ok
t/config-backwards-compat.t .. ok
t/config-finder.t ............ ok
t/config-loader.t ............ ok
t/context.t .................. ok
t/default-filter.t ........... ok
t/exit-code.t ................ ok
t/ext-filter.t ............... ok
t/file-permission.t .......... ok
t/filetypes.t ................ ok
t/filter.t ................... ok
t/firstlinematch-filter.t .... ok
t/highlighting.t ............. ok
t/illegal-regex.t ............ ok
t/incomplete-last-line.t ..... ok
t/inverted-file-filter.t ..... ok
t/is-filter.t ................ ok
t/issue244.t ................. ok
t/issue276.t ................. ok
t/issue491.t ................. ok
t/issue522.t ................. ok
t/issue562.t ................. ok
t/issue571.t ................. ok
t/lib/00-coverage.t .......... ok
t/lib/Ack.t .................. ok
t/lib/Collection.t ........... ok
t/lib/ConfigDefault.t ........ ok
t/lib/ConfigFinder.t ......... ok
t/lib/ConfigLoader.t ......... ok
t/lib/Default.t .............. ok
t/lib/Extension.t ............ ok
t/lib/ExtensionGroup.t ....... ok
t/lib/Filter.t ............... ok
t/lib/FirstLineMatch.t ....... ok
t/lib/Inverse.t .............. ok
t/lib/Is.t ................... ok
t/lib/IsGroup.t .............. ok
t/lib/IsPath.t ............... ok
t/lib/IsPathGroup.t .......... ok
t/lib/Match.t ................ ok
t/lib/MatchGroup.t ........... ok
t/lib/Resource.t ............. ok
t/lib/Resources.t ............ ok
t/longopts.t ................. ok
t/lua-shebang.t .............. ok
t/match-filter.t ............. ok
t/mutex-options.t ............ ok
t/noackrc.t .................. ok
t/noenv.t .................... ok
t/process-substitution.t ..... Can't exec "bash": No such file or directory at t/process-substitution.t line 21.
t/process-substitution.t ..... skipped: You need bash to run this test
t/r-lang-ext.t ............... ok
t/resource-iterator.t ........ ok
t/zero.t ..................... ok

Test Summary Report
-------------------
t/ack-pager.t              (Wstat: 768 Tests: 15 Failed: 3)
  Failed tests:  2-3, 7
  Non-zero exit status: 3
Files=97, Tests=1043, 345 wallclock secs ( 0.55 usr  0.81 sys + 97.24 cusr 202.06 csys = 300.66 CPU)
Result: FAIL
Failed 1/97 test programs. 3/1043 subtests failed.
make: *** [Makefile:1039: test_classic] Error 255
  PETDANCE/ack-2.18.tar.gz
  make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports PETDANCE/ack-2.18.tar.gz
Failed during this command:
 PETDANCE/ack-2.18.tar.gz                     : make_test NO
petdance commented 7 years ago

This error here:

'/usr/bin/env: ‘perl’: No such file or directory'

makes me think there's something weird in your configuration. Is your perl somewhere weird? Or that it's not in your path?

dcgomesbr commented 7 years ago

Hm, this is odd because I have a vanilla cygwin instalation in a Windows 10:

$ which perl /usr/bin/perl

My path has it and I can execute it from there. Why is it searching for perl in /usr/bin/env ?

petdance commented 7 years ago

It's not "in" /usr/bin/env. env is a program that runs another program, without having to specify the absolute path to it. There may be something weird in how Cygwin does modules. I can't tell, because I don't have Windows.