Skip Menu |
 

This queue is for tickets about the PathTools CPAN distribution.

Report information
The Basics
Id: 17394
Status: resolved
Priority: 0/
Queue: PathTools

People
Owner: Nobody in particular
Requestors: jdhedden [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 3.16
Fixed in: (no value)



Subject: 'make test' failes under Cygwin
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 4706
Download (untitled) / with headers
text/plain 4.5k
PathTools v3.16 fails on 'make test' under Cygwin with Perl 5.8.8 RC1 Show quoted text
> make test
/usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/crossplatform....ok 7/50 skipped: Can't load File::Spec::VMS t/cwd..............ok 1/30Usage: Cwd::cwd() at t/cwd.t line 132. # Looks like you planned 30 tests but only ran 18. # Looks like your test died just after 18. t/cwd..............dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 19-30 Failed 12/30 tests, 60.00% okay t/Functions........ok t/rel2abs2rel......ok t/Spec.............ok 83/473 skipped: various reasons t/taint............ok t/tmpdir...........ok t/win32............skipped all skipped: this is not win32 Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/cwd.t 255 65280 30 24 80.00% 19-30 1 test and 90 subtests skipped. Failed 1/8 test scripts, 87.50% okay. 12/580 subtests failed, 97.93% okay. make: *** [test_dynamic] Error 255 Show quoted text
> perl -Mblib t/cwd.t
1..30 not ok 1 - Cwd should be loaded from blib/ during testing # Failed test (t/cwd.t at line 30) # '/usr/lib/perl5/5.8/cygwin/Cwd.pm' # doesn't match '(?i-xsm:blib)' ok 2 - main->can(...) ok 3 - chdir() not exported by default ok 4 - nor abs_path() ok 5 - nor fast_abs_path() ok 6 - cwd() shouldn't create spurious entries in %ENV # native pwd = '/usr/bin/pwd.exe' ok 7 - cwd() ok 8 - getcwd() ok 9 - fastcwd() ok 10 - fastgetcwd() ok 11 ok 12 - cwd() ok 13 ok 14 - getcwd() ok 15 ok 16 - fastcwd() ok 17 ok 18 - fastgetcwd() Usage: Cwd::cwd() at t/cwd.t line 132. # Looks like you planned 30 tests but only ran 18. # Looks like your test died just after 18. My system: Show quoted text
> perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=cygwin, osvers=1.5.19(0.15042), archname=cygwin-thread-multi-64int uname='cygwin_nt-5.0 pn100-02-2-054p 1.5.19(0.15042) 2006-01-20 13:28 i686 cygwin ' config_args='-de -Duse64bitint -Dusethreads -DPERL_DONT_CREATE_GVSV -Uusemymalloc -A define:optimize=-O3 -pipe -frename-registers -fomit-frame-pointer -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -A define:ld=/usr/bin/ld2' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -Wdeclaration-after-statement', optimize='-O3 -pipe -frename-registers -fomit-frame-pointer -march=pentium4 -mfpmath=sse -mmmx -msse -msse2', cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -Wdeclaration-after-statement' ccversion='', gccversion='3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='/usr/bin/ld2', ldflags =' -s -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /lib libs=-lgdbm -ldb -lcrypt -lgdbm_compat perllibs=-lcrypt -lgdbm_compat libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s' cccdlflags=' ', lddlflags=' -s -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_USE_SAFE_PUTENV SPRINTF_RETURNS_STRLEN USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Locally applied patches: MAINT26907 26934 Built under cygwin Compiled at Jan 24 2006 13:26:21 %ENV: PERLIO="perlio" CYGWIN="server ntsec forkchunk:32768" @INC: /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 .
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Message-Id: <rt-3.5.HEAD-1793-1140819072-512.17394-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1140819072-1793-4"
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 374
Download (untitled) / with headers
text/plain 374b
On Tue Jan 31 08:00:59 2006, JDHEDDEN wrote: Show quoted text
> PathTools v3.16 fails on 'make test' under Cygwin with Perl 5.8.8 RC1 > > t/cwd..............ok 1/30Usage: Cwd::cwd() at t/cwd.t line 132.
This is caused by Cygwin Perl having its own build-in Cwd::cwd() command. Therefore, the new test added in 3.16 must be skipped under Cygwin. Attached is a patch to t/cwd.t to fix this.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: multipart/mixed; boundary="----------=_1140819072-1793-3"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="cwd.patch"
Content-Disposition: inline; filename="cwd.patch"
Content-Transfer-Encoding: base64
Content-Length: 435
Download cwd.patch
text/x-diff 435b
--- t/cwd.t 2006-01-30 21:49:50.000000000 -0500 +++ t/cwd.t.fixed 2006-02-24 17:07:48.000000000 -0500 @@ -125,7 +125,9 @@ dir_ends_with( $result, $Test_Dir, "$func()" ); } -{ +SKIP: { + skip 'Cygwin has builtin Cwd::cwd', 1) if ($^O eq 'cygwin'); + # Some versions of File::Path (e.g. that shipped with perl 5.8.5) # call getcwd() with an argument (perhaps by calling it as a # method?), so make sure that doesn't die.
MIME-Version: 1.0
In-Reply-To: <rt-3.5.HEAD-1793-1140819072-512.17394-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-25633-1141355416-1447.17394-0-0 [...] rt.cpan.org>
References: <rt-3.5.HEAD-1793-1140819072-512.17394-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 193
Download (untitled) / with headers
text/plain 193b
Hi, I don't think that patch is a good idea - the fact remains that File::Path will call Cwd::cwd() with an argument, and that will die. It would be better to fix the actual problem. -Ken
MIME-Version: 1.0
Subject: PathTools 'make test' fails under Cygwin [cf. perl #38628]
In-Reply-To: <rt-3.5.HEAD-25633-1141355416-1447.17394-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
References: <rt-3.5.HEAD-1793-1140819072-512.17394-0-0 [...] rt.cpan.org> <rt-3.5.HEAD-25633-1141355416-1447.17394-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.5.HEAD-31824-1141395922-754.17394-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
RT-Send-CC: perl5-porters [...] perl.org
Content-Length: 1405
Download (untitled) / with headers
text/plain 1.3k
KWILLIAMS wrote: Show quoted text
> I don't think that patch [to skip, under Cygwin, the test of > allowing an arg to Cwd::cwd] is a good idea - the fact remains that > File::Path will call Cwd::cwd() with an argument, and that will > die.
True. However, your test does not fix that either. It just prevents PathTools from being installed under Cygwin. So what's the point? If you're ignoring an arg, then why test that you're ignoring it? Show quoted text
> It would be better to fix the actual problem.
I don't disagree, but what is your notion of 'the actual problem'? Is it File::Path calling cwd with args? In that case, you shouldn't have modified Cwd's behaviour, but should have submitted a bug report against File::Path. If 'the actual problem' is Cygwin Perl's built-in Cwd::cwd no longer matching PathTools', that Perl needs to be patched. I have submitted just such a patch: http://rt.perl.org/rt3/Ticket/Display.html?id=38628 However, until that gets through to a released version of Perl, PathTools' testing should skip that test under Cywgin. I'm just trying to help things along, namely, getting PathTools' and Cygwin's Cwd::cwd behaviour to match, AND to allow PathTools to install on Cygwin using CPAN (without having to use 'force'). What is really needed is for you and Yitzchak Scott-Thoennes (sthoenna[at]efn.org) to coordinate the scheduling of changes for PathTools and Perl on this matter. Thanks.
MIME-Version: 1.0
In-Reply-To: <rt-3.5.HEAD-31824-1141395922-754.17394-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-31820-1141414444-885.17394-0-0 [...] rt.cpan.org>
References: <rt-3.5.HEAD-1793-1140819072-512.17394-0-0 [...] rt.cpan.org> <rt-3.5.HEAD-25633-1141355416-1447.17394-0-0 [...] rt.cpan.org> <rt-3.5.HEAD-31824-1141395922-754.17394-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 2029
Download (untitled) / with headers
text/plain 1.9k
On Fri Mar 03 09:25:22 2006, JDHEDDEN wrote: Show quoted text
> KWILLIAMS wrote:
> > I don't think that patch [to skip, under Cygwin, the test of > > allowing an arg to Cwd::cwd] is a good idea - the fact remains that > > File::Path will call Cwd::cwd() with an argument, and that will > > die.
> > True. However, your test does not fix that either.
Right. This is a cygwin bug for which there so far is no fix. Show quoted text
> I don't disagree, but what is your notion of 'the actual problem'? Is > it File::Path calling cwd with args? In that case, you shouldn't have > modified Cwd's behaviour, but should have submitted a bug report > against File::Path.
My notion of the actual problem is that cwd() dies on certain systems when called with arguments, which does happen in The Wild. That test exposes the problem. Sure, it would be nice if we could just submit a bug report to File::Path and wash our hands of it, but I don't think that would be very nice to do. It would mean we'd have to declare a dependency on that version of File::Path, but it's not available as a separate distro, so that's no good. And I don't want any non-zero version numbers in dependencies for this distro anyway, it's too fundamental to depend on other stuff. I think the following patch should get things working. Could you try it out? It seemed to do the trick for me. -Ken Index: Cwd.pm ========================================================= ========== RCS file: /Users/ken/src/CVS-repository/modules/PathTools/Cwd.pm,v retrieving revision 1.42 diff -u -r1.42 Cwd.pm --- Cwd.pm 2006/01/31 02:49:03 1.42 +++ Cwd.pm 2006/03/03 19:33:36 @@ -357,6 +357,15 @@ } } +if ($^O eq 'cygwin') { + # We need to make sure cwd() is called with no args, because it's + # got an arg-less prototype and will die if args are present. + local $^W = 0; + my $orig_cwd = \&cwd; + *cwd = sub { &$orig_cwd() } +} + + # set a reasonable (and very safe) default for fastgetcwd, in case it # isn't redefined later (20001212 rspier) *fastgetcwd = \&cwd;
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-1.0 required=8.0 tests=BAYES_00,RCVD_IN_BL_SPAMCOP_NET
Received-SPF: neutral (x1.develooper.com: local policy)
Content-Type: TEXT/plain; charset="utf-8"
X-RT-Original-Encoding: US-ASCII
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 719194D8404 for <cpan-bug+pathtools [...] diesel.bestpractical.com>; Fri, 3 Mar 2006 15:07:49 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id A3E814D8114 for <bug-PathTools [...] rt.cpan.org>; Fri, 3 Mar 2006 15:07:47 -0500 (EST)
Received: (qmail 10060 invoked by alias); 3 Mar 2006 20:07:46 -0000
Received: from smtpout11-01.prod.mesa1.secureserver.net (HELO smtpout11-01.prod.mesa1.secureserver.net) (68.178.232.1) by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Fri, 03 Mar 2006 12:07:40 -0800
Received: (qmail 23849 invoked from network); 3 Mar 2006 20:07:35 -0000
Received: from unknown (HELO gem-wbe17.prod.mesa1.secureserver.net) (64.202.189.221) by smtpout11-01.prod.mesa1.secureserver.net with SMTP; 3 Mar 2006 20:07:35 -0000
Received: (qmail 17228 invoked by uid 99); 3 Mar 2006 20:07:35 -0000
Delivered-To: cpan-bug+pathtools [...] diesel.bestpractical.com
Subject: RE: [rt.cpan.org #17394] 'make test' failes under Cygwin
Return-Path: <jerry [...] hedden.us>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+pathtools [...] diesel.bestpractical.com
Date: Fri, 03 Mar 2006 13:07:35 -0700
Message-Id: <20060303130735.fb30e530d17747c2b054d625b8945d88.eb3bf9153d.wbe [...] email.email.secureserver.net>
X-Originating-Ip: 199.172.169.17
To: bug-PathTools [...] rt.cpan.org
From: "Jerry D. Hedden" <jerry [...] hedden.us>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-31820-1141416474-462.17394-0-0 [...] rt.cpan.org>
Content-Length: 1106
Show quoted text
> Right. This is a cygwin bug for which there so far is no fix.\
It's not really a Cygwin bug. It's a Cygwin Perl bug. There's a file in the Perl source called cygwin.c that has Cwd::cwd coded in it. That's want I submitted the Perl patch against. Show quoted text
> Index: Cwd.pm > ========================================================= > ========== > RCS file: /Users/ken/src/CVS-repository/modules/PathTools/Cwd.pm,v > retrieving revision 1.42 > diff -u -r1.42 Cwd.pm > --- Cwd.pm 2006/01/31 02:49:03 1.42 > +++ Cwd.pm 2006/03/03 19:33:36 > @@ -357,6 +357,15 @@ > } > } > > +if ($^O eq 'cygwin') { > + # We need to make sure cwd() is called with no args, because it's > + # got an arg-less prototype and will die if args are present. > + local $^W = 0; > + my $orig_cwd = \&cwd; > + *cwd = sub { &$orig_cwd() } > +} > + > + > # set a reasonable (and very safe) default for fastgetcwd, in case it > # isn't redefined later (20001212 rspier) > *fastgetcwd = \&cwd;
The patch works fine. Is "local $^W = 0;" because of backward compatibility? If not, wouldn't "no warnings 'redefine';" be better?
MIME-Version: 1.0
In-Reply-To: <rt-3.5.HEAD-31820-1141416474-462.17394-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-31812-1141420263-642.17394-0-0 [...] rt.cpan.org>
References: <20060303130735.fb30e530d17747c2b054d625b8945d88.eb3bf9153d.wbe [...] email.email.secureserver.net> <rt-3.5.HEAD-31820-1141416474-462.17394-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 417
Download (untitled) / with headers
text/plain 417b
On Fri Mar 03 15:07:54 2006, jerry@hedden.us wrote: Show quoted text
> > Right. This is a cygwin bug for which there so far is no fix.\
> > It's not really a Cygwin bug. It's a Cygwin Perl bug.
Sorry, that's what I meant. Show quoted text
> The patch works fine.
Great, I'll release. Show quoted text
> Is "local $^W = 0;" because of backward compatibility? >
Yup, warnings.pm first shipped with perl 5.6, but we target earlier versions than that. -Ken
MIME-Version: 1.0
In-Reply-To: <rt-3.5.HEAD-31824-1141395922-754.17394-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-31824-1141426060-262.17394-0-0 [...] rt.cpan.org>
References: <rt-3.5.HEAD-1793-1140819072-512.17394-0-0 [...] rt.cpan.org> <rt-3.5.HEAD-25633-1141355416-1447.17394-0-0 [...] rt.cpan.org> <rt-3.5.HEAD-31824-1141395922-754.17394-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 155
Download (untitled) / with headers
text/plain 155b
BTW, I do think your patch to cygwin.c is a good idea. If it's accepted, we could skip the wrapping step when the version of perl is high enough. -Ken


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.