Opened 8 years ago

Closed 8 years ago

#692 closed defect (fixed)

Infinite loop when building Search::Xapian with CPANPLUS

Reported by: Andreas Vögele Owned by: Olly Betts
Priority: normal Milestone: 1.2.22
Component: Search::Xapian Version: 1.2.21
Severity: normal Keywords: perl
Cc: Blocked By:
Blocking: Operating System: All

Description (last modified by Olly Betts)

When building Search::Xapian with CPANPLUS the script Makefile.PL overwrites the Makefile created by ExtUtils::MakeMaker with a stub Makefile as the variables $srcdir and $buildir are defined and identical. As a consequence the make command calls itself in an infinite loop. The attached patch replaces "if (defined $builddir)" with "if (defined $builddir && $builddir ne $srcdir)".

CPANPLUS executes Makefile.PL in the following way:

cd $srcdir
perl -e 'use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; }' $srcdir/Makefile.PL

Attachments (1)

Search_Xapian_Makefile_PL.diff (463 bytes ) - added by Andreas Vögele 8 years ago.
Patch for Makefile.PL

Download all attachments as: .zip

Change History (2)

by Andreas Vögele, 8 years ago

Patch for Makefile.PL

comment:1 by Olly Betts, 8 years ago

Description: modified (diff)
Milestone: 1.2.x1.2.22
Resolution: fixed
Status: newclosed

Fixed in [3769160f374cfffa3f4d860d14511dc8e6fe7dc5/git].

Your patch was appreciated, but I actually went for a slightly fancier fix which handles any explicit path to the current directory (not just one which is exactly the same as what pwd outputs), so cases such as this also work now:

perl ./Makefile.PL

I tested with the command you gave and it now works, but if my variant doesn't work with CPANPLUS for some reason, please let me know.

Note: See TracTickets for help on using tickets.