Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed tests of pm_to_blib.t occurred during the installation of perl-5.38.2 #22064

Closed
qingliu111 opened this issue Mar 5, 2024 · 7 comments
Closed

Comments

@qingliu111
Copy link

Dear Sir or Madam:

When installing perl-5.38.2 using perlbrew (App::perlbrew/0.98) in the local $HOME directory, I encountered the following errors while running 'make test':

#../cpan/ExtUtils-MakeMaker/t/pm.t .................................... ok

#   Failed test at t/pm_to_blib.t line 68.
#                   'package Big::Dummy;
#
# $VERSION = 0.01;
#
# =head1 NAME
#
# Big::Dummy - Try "our" hot dog's, $andwiche$ and $(ub)$!
#
# =cut
#
# 1;
# '
#     doesn't match '(?^:Something else\n$)'

#   Failed test at t/pm_to_blib.t line 80.
Test Summary Report
-------------------
../cpan/ExtUtils-MakeMaker/t/pm_to_blib.t                          (Wstat: 512 (exited 2) Tests: 14 Failed: 2)
  Failed tests:  8, 11
  Non-zero exit status: 2
Files=2768, Tests=1184586, 1670 wallclock secs (97.72 usr 15.89 sys + 629.17 cusr 173.17 csys = 915.95 CPU)
Result: FAIL
Finished test run at Tue Mar  5 20:26:48 2024.
make: *** [test_harness] error 2
##### Brew Failed #####

I have checked the issues regarding 'pm_to_blib', but I have not found how to modify it.

The system information:
Linux version 3.10.0-862.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) ) #1 SMP Fri Apr 20 16:44:24 UTC 2018

@jkeenan
Copy link
Contributor

jkeenan commented Mar 5, 2024

Did you have a version of perl previously installed in that directory?

Can you provide the exact command-line invocation you used to try this installation?

Although I use perlbrew on my home machine, I concede that I am not an expert in it. @gugod may have some insight here. In any event, this is probably not a big problem to worry about.

@jkeenan
Copy link
Contributor

jkeenan commented Mar 5, 2024

If you examine the source code for the test file which failed, you will see some inline comments acknowledging the possibility of race conditions which the program attempts to work around.

    # Seems there are occasional race conditions with these tests
    # waiting a couple of seconds appears to resolve these
    sleep 2;
    run_ok(qq{$perl Makefile.PL});

    # XXX This is a fragile way to check that it reran.

Reproducing race conditions is often difficult and frustrating. I doubt that this indicates any serious problem with your perl, but I recognize that that's not a satisfying response.

@qingliu111
Copy link
Author

@jkeenan
Thank you for your response!

I didn’t install any version perl in this directory before.

The command-line using perlbrew to install perl-5.38.2:

perlbrew install 5.38.2

Besides using perlbrew to install, I also tried to install a local perl as follows:

wget https://www.cpan.org/src/5.0/perl-5.38.2.tar.gz
tar -zxvf perl-5.38.2.tar.gz
cd perl-5.38.2
./Configure -des -Dprefix=$HOME/software/perl-5.18.0 -Dusethreads
make
make test

Both methods get the same error message.

I also checked the source code which located at t/pm_to_blib.t line 80. The inline comments exactly have ‘race conditions’:

# Change a pm file, it should be copied.
{
    # Wait a couple seconds else our changed file will have the same timestamp
    # as the blib file
    sleep 2;

    ok( open my $fh, ">>", "lib/Big/Dummy.pm" ) or die $!;
    print $fh "Something else\n";
    close $fh;

    run_ok($make);
    like slurp("blib/lib/Big/Dummy.pm"), qr/Something else\n$/;
}


# Rerun the Makefile.PL, pm_to_blib should rerun
{
    # Seems there are occasional race conditions with these tests
    # waiting a couple of seconds appears to resolve these
    sleep 2;
    run_ok(qq{$perl Makefile.PL});

    # XXX This is a fragile way to check that it reran.
    like run_ok($make), qr/^Skip /ms;

    ok( -e "blib/lib/Big/Dummy.pm", "blib copied pm file" );
}
                                                                                                                                                           

Ignoring these error messages after ‘make test’, Perl can be installed without any errors reported when run the command ‘make install’. Does it mean that Perl can be used normally?

@jkeenan
Copy link
Contributor

jkeenan commented Mar 6, 2024

@jkeenan Thank you for your response!

I didn’t install any version perl in this directory before.

[snip and rearrange]

Ignoring these error messages after ‘make test’, Perl can be installed without any errors reported when run the command ‘make install’. Does it mean that Perl can be used normally?

Yes.

Besides using perlbrew to install, I also tried to install a local perl as follows:

wget https://www.cpan.org/src/5.0/perl-5.38.2.tar.gz
tar -zxvf perl-5.38.2.tar.gz
cd perl-5.38.2
./Configure -des -Dprefix=$HOME/software/perl-5.18.0 -Dusethreads
make
make test

Both methods get the same error message.

I am curious as to why you installed perl-5.38.2 to a directory named for a 10-year-old version of perl which is no longer supported.

@qingliu111
Copy link
Author

@jkeenan

I am curious as to why you installed perl-5.38.2 to a directory named for a 10-year-old version of perl which is no longer supported.

Oh, my apologies! I made an error in writing. The local directory is labeled perl-5.38.2.

@jkeenan
Copy link
Contributor

jkeenan commented Mar 17, 2024

@qingliu111, are you still unable to install perl-5.38.2 via perlbrew?

If not, we'll close this ticket. Thanks.

@qingliu111
Copy link
Author

@jkeenan
Thanks to your guidance and support, Perl has been successfully installed on my system.

@jkeenan jkeenan closed this as completed Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants