Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

help debugging why module install is failing

by Special_K (Monk)
on Nov 15, 2020 at 19:20 UTC ( [id://11123667]=perlquestion: print w/replies, xml ) Need Help??

Special_K has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to install IO::Async::Listener under cygwin but see the following failures:

cpan[2]> install IO::Async::Listener Running install for module 'IO::Async::Listener' PEVANS/IO-Async-0.77.tar.gz Has already been unwrapped into directory /home/User/.local/share/.c +pan/build/IO-Async-0.77-5 PEVANS/IO-Async-0.77.tar.gz Has already been prepared PEVANS/IO-Async-0.77.tar.gz Has already been made Running Build test for PEVANS/IO-Async-0.77.tar.gz t/00use.t .................... ok t/01timequeue.t .............. ok t/02os.t ..................... ok t/03loop-magic.t ............. ok t/04notifier.t ............... ok t/05notifier-loop.t .......... ok t/06notifier-mixin.t ......... ok t/07notifier-future.t ........ ok t/10loop-poll-io.t ........... 1/? # Failed test 'exceptional socket invokes on_read_ready' # at /home/User/.local/share/.cpan/build/IO-Async-0.77-5/blib/lib/IO +/Async/LoopTests.pm line 387. # got: '0' # expected: '1' # Looks like you failed 1 test of 22. t/10loop-poll-io.t ........... Dubious, test returned 1 (wstat 256, 0x +100) Failed 1/22 subtests (less 2 skipped subtests: 19 okay) t/10loop-select-io.t ......... 1/? # Failed test 'exceptional socket invokes on_read_ready' # at /home/User/.local/share/.cpan/build/IO-Async-0.77-5/blib/lib/IO +/Async/LoopTests.pm line 387. # got: '0' # expected: '1' # Looks like you failed 1 test of 22. t/10loop-select-io.t ......... Dubious, test returned 1 (wstat 256, 0x +100) Failed 1/22 subtests (less 2 skipped subtests: 19 okay) t/11loop-poll-timer.t ........ ok t/11loop-select-timer.t ...... ok t/12loop-poll-signal.t ....... ok t/12loop-select-signal.t ..... ok t/13loop-poll-idle.t ......... ok t/13loop-select-idle.t ....... ok t/14loop-poll-process.t ...... ok t/14loop-select-process.t .... ok t/15loop-poll-control.t ...... ok t/15loop-select-control.t .... ok t/16loop-poll-metrics.t ...... ok t/16loop-select-metrics.t .... ok t/18loop-poll-legacy.t ....... ok t/18loop-select-legacy.t ..... ok t/19loop-future.t ............ ok t/19test.t ................... ok t/20handle.t ................. ok t/21stream-1read.t ........... ok t/21stream-2write.t .......... ok t/21stream-3split.t .......... ok t/21stream-4encoding.t ....... ok t/22timer-absolute.t ......... ok t/22timer-countdown.t ........ ok t/22timer-periodic.t ......... ok t/23signal.t ................. ok t/24listener.t ............... ok t/25socket.t ................. ok t/26pid.t .................... ok t/27file.t ................... ok t/28filestream.t ............. ok t/30loop-fork.t .............. ok t/31loop-spawnchild.t ........ ok t/32loop-spawnchild-setup.t .. ok t/33process.t ................ ok t/34process-handles.t ........ ok t/35loop-openprocess.t ....... ok t/36loop-runchild.t .......... ok t/37loop-child-root.t ........ skipped: not root t/38loop-thread.t ............ ok t/39loop-runproccess.t ....... ok t/40channel.t ................ ok t/41routine.t ................ ok t/42function.t ............... 1/? Warning: unable to close filehandle + $wr properly: Bad file descriptor during global destruction. Warning: unable to close filehandle $wr properly: Bad file descriptor +during global destruction. Warning: unable to close filehandle $out properly: Bad file descriptor + during global destruction. Warning: unable to close filehandle $out properly: Bad file descriptor + during global destruction. Warning: unable to close filehandle properly: Bad file descriptor duri +ng global destruction. Warning: unable to close filehandle properly: Bad file descriptor duri +ng global destruction. t/42function.t ............... ok t/50resolver.t ............... 1/? # Failed test '->failure [3] gives EAI_NONAME or EAI_NODATA' # at t/50resolver.t line 342. # $errno is 2 # Looks like you failed 1 test of 35. t/50resolver.t ............... Dubious, test returned 1 (wstat 256, 0x +100) Failed 1/35 subtests t/51loop-connect.t ........... ok t/52loop-listen.t ............ ok t/53loop-extend.t ............ ok t/60protocol.t ............... ok t/61protocol-stream.t ........ ok t/62protocol-linestream.t .... ok t/63handle-connect.t ......... ok t/64handle-bind.t ............ ok t/70future-io.t .............. skipped: Future::IO is not available t/99pod.t .................... ok Test Summary Report ------------------- t/10loop-poll-io.t (Wstat: 256 Tests: 22 Failed: 1) Failed test: 19 Non-zero exit status: 1 t/10loop-select-io.t (Wstat: 256 Tests: 22 Failed: 1) Failed test: 19 Non-zero exit status: 1 t/50resolver.t (Wstat: 256 Tests: 35 Failed: 1) Failed test: 28 Non-zero exit status: 1 Files=64, Tests=1668, 119 wallclock secs ( 0.28 usr 0.30 sys + 7.79 +cusr 9.73 csys = 18.10 CPU) Result: FAIL Failed 3/64 test programs. 3/1668 subtests failed. PEVANS/IO-Async-0.77.tar.gz ./Build test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports PEVANS/IO-Async-0.77.tar.gz Failed during this command: PEVANS/IO-Async-0.77.tar.gz : make_test NO

How do I debug this? Searching for "Failed test 'exceptional socket invokes on_read_ready'" does return an open bug related to cygwin (https://rt.cpan.org/Public/Bug/Display.html?id=71706) although the reporter never replied back indicating whether or not they still see the same issue with the version referenced by the author (0.61), which is quit a bit older than the most recent version (0.77). Is there anything obvious I can do to debug this further other than contacting the author?

Replies are listed 'Best First'.
Re: help debugging why module install is failing
by syphilis (Archbishop) on Nov 15, 2020 at 22:50 UTC
    Is there anything obvious I can do to debug this further other than contacting the author?

    The module installs fine on native Windows (Strawberry Perl 5.32.0), where each of those 3 failing tests all pass.
    I therefore think the problem is likely to be in the way the Cygwin system operates - so debugging it might be quite involved.

    Also, the warnings issued by t/42function.t don't appear on Strawberry Perl, but there are 4 tests in that script that are skipped on Strawberry Perl (due to fork() being unavailable) that would be run on Cygwin. So maybe that's where the difference is.

    Paul Evans is still fairly active - so definitely worth contacting.
    I think it's best to file a bug report that provides the full output of the test suite, just as you've provided here.

    You can, of course, simply force install the module, despite its failing tests - but I'm guessing you already knew that.
    I recommend that you consider switching to Strawberry Perl unless you need the Unix emulation.
    And, if you do need Unix emulation, then you could alternatively try MSYS2. You might (I don't know) find that it doesn't suffer the bugginess that you've hit with Cygwin.

    Cheers,
    Rob
      > I recommend that you consider switching to Strawberry Perl unless you need the Unix emulation.

      I originally learned Perl in a Linux environment and have been using Cygwin under Windows 10 just for the sake of familiarity, but maybe I'll try Strawberry Perl since there's no fundamental reason why I need Linux commands to write Perl scripts (although the shell commands seem more intuitive to me than those of Windows). Ultimately all I'm trying to do is install WWW::Mechanize::Chrome and IO::Async::Listener is a prerequisite.

      > And, if you do need Unix emulation, then you could alternatively try MSYS2. You might (I don't know) find that it doesn't suffer the bugginess that you've hit with Cygwin.

      I already have MSYS2 installed so maybe I'll give that a try as well.

        If you are familiar with linux, you could try WSL (Windows Subsystem for Linux). I use it only very occasionaly, because I have it only on "my" machine, but see Perl on Windows 10.
      > The module installs fine on native Windows (Strawberry Perl 5.32.0), where each of those 3 failing tests all pass.

      I tried installing the module under Strawberry Perl but the t\50resolver.t test still fails with the exact same error. If you get a chance could you please take a look at the new thread I made: help installing WWW::Mechanize::Chrome in Strawberry Perl
Re: help debugging why module install is failing
by marto (Cardinal) on Nov 15, 2020 at 20:30 UTC

    Cygwin has no passing builds for the past few releases. Have you examined the code? There seems to have been several breakages in past releases.

Re: help debugging why module install is failing
by kcott (Archbishop) on Nov 16, 2020 at 07:21 UTC

    G'day Special_K,

    I have Cygwin running on Win10, so thought I'd give this a go to see if I got any different results. My Perl is 5.32.0; I used the cpan utility: cpan[1]> install IO::Async::Listener.

    I got the same Failed test 'exceptional socket invokes on_read_ready' for t/10loop-poll-io.t and t/10loop-select-io.t.

    I got the same six warnings for t/42function.t: Warning: unable to close filehandle ... during global destruction.

    This, however, was different from your report:

    t/50resolver.t ............... ok t/51loop-connect.t ........... 1/? Nothing was ready after 10 second w +ait; called at t/51loop-connect.t line 322 # Tests were run but no plan was declared and done_testing() was not s +een. # Looks like your test exited with 119 just after 31. t/51loop-connect.t ........... Dubious, test returned 119 (wstat 30464 +, 0x7700)

    Here's the full summary if you want to make a comparison:

    Test Summary Report ------------------- t/10loop-poll-io.t (Wstat: 256 Tests: 22 Failed: 1) Failed test: 19 Non-zero exit status: 1 t/10loop-select-io.t (Wstat: 256 Tests: 22 Failed: 1) Failed test: 19 Non-zero exit status: 1 t/51loop-connect.t (Wstat: 30464 Tests: 31 Failed: 0) Non-zero exit status: 119 Parse errors: No plan found in TAP output Files=64, Tests=1664, 127 wallclock secs ( 0.05 usr 0.08 sys + 5.89 +cusr 6.86 csys = 12.87 CPU) Result: FAIL Failed 3/64 test programs. 2/1664 subtests failed. PEVANS/IO-Async-0.77.tar.gz ./Build test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports PEVANS/IO-Async-0.77.tar.gz Failed during this command: PEVANS/IO-Async-0.77.tar.gz : make_test NO

    — Ken

      It may just be that Cygwin doesn't do exceptional-condition monitoring on those filehandles, at which point there really isn't anything this module can do about it. Could just skip those parts of the tests or something.
      How were you able to get Perl 5.32.0 on Cygwin? When I run the Cygwin setup utility, the most recent version listed for the perl Package is 5.30.3-1.
        How were you able to get Perl 5.32.0 on Cygwin?

        I don't know how leonerd kcott obtained it, but it built pretty easily for me from source. (Yes, that surprised me, too !)
        IIRC, I ran:
        ./Configure -des -Dprefix=/your/preferred/location make make test (might fail a test or two ... can't remember that part) make install
        Cheers,
        Rob
        "How were you able to get Perl 5.32.0 on Cygwin?"

        Short answer: I used Perlbrew.

        Detailed answer: "Re: Perl on Windows 10". That actually got me 5.30.0 (at that time, Cygwin had 5.26.3). I don't remember the exact details of how I upgraded that to 5.32.0, but it was probably just:

        perlbrew install perl-5.32.0

        So now I have:

        $ perl -v | head -2 | tail -1 This is perl 5, version 32, subversion 0 (v5.32.0) built for cygwin-th +read-multi

        You may also be interested in "App::perlbrew - Compiling Perl with thread support". It's possibly somewhat dated: I wrote it in 2012 and added an update in 2014. I didn't need to do anything special to get thread support this time around on Cygwin: I don't know if defaults have changed or this was platform-related (I was using Mac OS X back then).

        — Ken

Re: help debugging why module install is failing
by perlfan (Vicar) on Nov 19, 2020 at 05:50 UTC
    I hear good things about Strawberry Perl. Is there something in cygwin you need (like a *nix utility)? If you just need Perl then SP I believe is the recommended thing to use.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11123667]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2024-04-18 04:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found