Skip Menu |

This queue is for tickets about the TermReadKey CPAN distribution.

Report information
The Basics
Id: 100932
Status: resolved
Priority: 0/
Queue: TermReadKey

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.32
Fixed in: 2.33



Subject: Parallel build fails
Running make in many jobs fails sometimes like this: make -j16 'OPTIMIZE=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' "/usr/bin/perl" -Mblib -I/usr/share/perl5 genchars.pl Cannot find blib even in /builddir/build/BUILD/TermReadKey-2.32/../../../../.. BEGIN failed--compilation aborted. Makefile:383: recipe for target 'cchars.h' failed make: *** [cchars.h] Error 2 make: *** Waiting for unfinished jobs.... This can been seen on the CPAN Testers matrix as "unknown" tasks. I think the problem is in the Makefile.PL which adds a new target which needs the "build" directory to be already present but it does not declare the dependency: sub MY::top_targets { my $self = shift; $_ = $self->MM::top_targets(); $_ .= " sgtty cchars.h: genchars.pl \$(PERL) -Mblib -I\$(PERL_LIB) genchars.pl distcc: genchars.pl \$(PERL) -Mblib -I\$(PERL_LIB) genchars.pl dist [...] } See lines with the "-MBlib" argument.
From: ppisar [...] redhat.com
Dne Po 15.pro.2014 14:48:55, ppisar napsal(a): Show quoted text
> Running make in many jobs fails sometimes like this: >
Attached patch fixes it. -- Petr
Subject: 0001-Do-not-use-blib-for-executing-genchars.pl.patch
From 221c2b2609b28ac0b4bb27d3448b22cdc148e8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <petr.pisar@atlas.cz> Date: Thu, 30 Apr 2015 19:13:00 +0200 Subject: [PATCH] Do not use blib for executing genchars.pl genchars.pl script uses Configure which resides top-level directory, therefore Makefile used to invoke genchars.pl with `perl -Mblib' because blib module searches not only in blib but also in parent directories. Unfortuntely the generated Makefile rule for executing genchars.pl did not declared dependency on blib directory, so the rule could be run before another Makefile rule created the blib directory which resulted in random failures like this: $ make -j16 "/usr/bin/perl" -Mblib -I/usr/share/perl5 genchars.pl Cannot find blib even in /builddir/build/BUILD/TermReadKey-2.32/../../../../.. BEGIN failed--compilation aborted. This patch fixes this race condition by replacing the -Mblib argument with -I. argument. CPAN RT#100932 --- Makefile.PL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 6ade4e7..4c97e22 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -52,10 +52,10 @@ sub MY::top_targets { $_ .= " sgtty cchars.h: genchars.pl - \$(PERL) -Mblib -I\$(PERL_LIB) genchars.pl + \$(PERL) -I. -I\$(PERL_LIB) genchars.pl distcc: genchars.pl - \$(PERL) -Mblib -I\$(PERL_LIB) genchars.pl dist + \$(PERL) -I. -I\$(PERL_LIB) genchars.pl dist ReadKey.c: cchars.h -- 2.0.5
Subject: Re: [rt.cpan.org #100932] Parallel build fails
Date: Thu, 30 Apr 2015 19:22:57 +0100
To: bug-TermReadKey [...] rt.cpan.org
From: Jonathan Stowe <jonathan.stowe [...] gmail.com>
Hi, thanks for this. Applied in https://github.com/jonathanstowe/TermReadKey/commit/5ea76c7d2e80f3c3659365af2737757fc0dd5563 For future reference github pull requests are by far the preferred way to receive patches :) Thanks again, I have a bit of cleaning up to do but will make a release soon. On Thu, 2015-04-30 at 13:25 -0400, Petr Pisar via RT wrote: Show quoted text
> Queue: TermReadKey > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=100932 > > > Dne Po 15.pro.2014 14:48:55, ppisar napsal(a):
> > Running make in many jobs fails sometimes like this: > >
> Attached patch fixes it. > > -- Petr
Release in 2.33