Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the ExtUtils-ParseXS CPAN distribution.

Report information
The Basics
Id: 53938
Status: resolved
Priority: 0/
Queue: ExtUtils-ParseXS

People
Owner: Nobody in particular
Requestors: pete.a64 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.2205
Fixed in: (no value)



Subject: MinGW Broken after 2.21
Building latest ExtUtils-ParseXS-2.22 using the MinGW32 3.4.5 Compiler with DMAKE. Have also built ExtUtils-ParseXS-2.22 under a Visual C 6 compiler with no problems. The follwing outlines the build with MinGW: E:\usr\cpan\build\ExtUtils-ParseXS-2.22>perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for ExtUtils::ParseXS E:\usr\cpan\build\ExtUtils-ParseXS-2.22>mk cp lib/ExtUtils/ParseXS.pm blib\lib\ExtUtils\ParseXS.pm cp lib/ExtUtils/xsubpp blib\lib\ExtUtils\xsubpp E:\usr\cpan\build\ExtUtils-ParseXS-2.22>tst E:\usr\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t [01:23:05] t/basic.t .. ok 2171 ms [01:23:08] t/more.t ... 1/25 XSMore.c:306:9: warning: universal character names are only valid in C++ and C99 XSMore.c:306:9: incomplete universal character name \u << Hum? XSMore.c:306:9: warning: unknown escape sequence '\p' << Hum? error building dll file from 'XSMore.c' at E:/usr/lib/ExtUtils/CBuilder/Platform/Windows.pm line 127. # Looks like you planned 25 tests but ran 2. # Looks like your test exited with 2 just after 2. [01:23:08] t/more.t ... Dubious, test returned 2 (wstat 512, 0x200) Failed 23/25 subtests [01:23:09] t/usage.t .. ok 2153 ms [01:23:11] Test Summary Report ------------------- t/more.t (Wstat: 512 Tests: 2 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 25 tests but ran 2. Files=3, Tests=36, 6 wallclock secs ( 0.09 usr + 0.08 sys = 0.17 CPU) Result: FAIL Failed 1/3 test programs. 0/36 subtests failed. dmake: Error code 255, while making 'test_dynamic' Examining XSMore.xs Line 109: INCLUDE_COMMAND: $^X -Ilib -It/lib -MIncludeTester -e IncludeTester::print_xs Then the generated line in XSMore.c: #line 7 "./E:\usr\bin\perl.exe -Ilib -It/lib -MIncludeTester -e IncludeTester::print_xs" The problem seems to be with the $^X path: ./E:\usr\bin\perl.exe Changing the path in XSMore.xs Line 109 from ./E:\usr\bin\perl.exe to E:/usr/bin/perl.exe or E:\\usr\\bin\\perl.exe the test 'more.t' passes but dropping the leading ./ and running the test produced no C code, no object file and no dll so in reality the pass is half-hearted. E:\usr\cpan\build\ExtUtils-ParseXS-2.22>tst E:\usr\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch ')" t/*.t [01:36:18] t/basic.t .. ok 2171 ms [01:36:20] t/more.t ... ok 2294 ms [01:36:23] t/usage.t .. ok 2169 ms [01:36:25] All tests successful. Files=3, Tests=59, 7 wallclock secs ( 0.14 usr + 0.05 sys = 0.19 CPU) Result: PASS With the leading ./ I get these errors: [01:56:04] t/more.t ... 1/25 '.' is not recognized as an internal or external command,operable program or batch file. [01:56:04] t/more.t ... 5/25 Undefined subroutine &XSMore::sum called at t/more.t line 91. Not certain what the fix to this is but possibly a change to 'sub INCLUDE_COMMAND_handler ()' in the ParseXS.pm. Any help most appreciated. -- Regards, Pete Armstrong pete.a64@gmail.com
CC: "Mueller, Steffen" <smueller [...] cpan.org>, Curtis Jewell <perl [...] csjewell.fastmail.us>
Subject: Re: [rt.cpan.org #53938] MinGW Broken after 2.21
Date: Sat, 23 Jan 2010 07:13:17 -0500
To: bug-ExtUtils-ParseXS [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
Thanks for the report. I'm not sure what the issue is, but I'm CC'ing a Windows expert and the person who wrote the INCLUDE_COMMAND feature in the hopes that they can shed some light on the problem. -- David On Sat, Jan 23, 2010 at 5:01 AM, Pete Armstrong via RT <bug-ExtUtils-ParseXS@rt.cpan.org> wrote: Show quoted text
> Sat Jan 23 05:01:18 2010: Request 53938 was acted upon. > Transaction: Ticket created by parmstro64 >       Queue: ExtUtils-ParseXS >     Subject: MinGW Broken after 2.21 >   Broken in: (no value) >    Severity: Important >       Owner: Nobody >  Requestors: pete.a64@gmail.com >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=53938 > > > > Building latest ExtUtils-ParseXS-2.22 using the MinGW32 3.4.5 Compiler > with DMAKE. > Have also built ExtUtils-ParseXS-2.22 under a Visual C 6 compiler with > no problems. > > The follwing outlines the build with MinGW: > > E:\usr\cpan\build\ExtUtils-ParseXS-2.22>perl Makefile.PL > Checking if your kit is complete... > Looks good > Writing Makefile for ExtUtils::ParseXS > > E:\usr\cpan\build\ExtUtils-ParseXS-2.22>mk > cp lib/ExtUtils/ParseXS.pm blib\lib\ExtUtils\ParseXS.pm > cp lib/ExtUtils/xsubpp blib\lib\ExtUtils\xsubpp > > E:\usr\cpan\build\ExtUtils-ParseXS-2.22>tst > E:\usr\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, > 'blib\lib', 'blib\arch')" t/*.t > [01:23:05] t/basic.t .. ok     2171 ms > [01:23:08] t/more.t ... 1/25 XSMore.c:306:9: warning: universal > character names are only valid in C++ and C99 > > XSMore.c:306:9: incomplete universal character name \u << Hum? > XSMore.c:306:9: warning: unknown escape sequence '\p'  << Hum? > > error building dll file from 'XSMore.c' at > E:/usr/lib/ExtUtils/CBuilder/Platform/Windows.pm line 127. > # Looks like you planned 25 tests but ran 2. > # Looks like your test exited with 2 just after 2. > [01:23:08] t/more.t ... Dubious, test returned 2 (wstat 512, 0x200) > Failed 23/25 subtests > [01:23:09] t/usage.t .. ok     2153 ms > [01:23:11] > > Test Summary Report > ------------------- > t/more.t (Wstat: 512 Tests: 2 Failed: 0) >  Non-zero exit status: 2 >  Parse errors: Bad plan.  You planned 25 tests but ran 2. > Files=3, Tests=36,  6 wallclock secs ( 0.09 usr +  0.08 sys =  0.17 CPU) > Result: FAIL > Failed 1/3 test programs. 0/36 subtests failed. > dmake:  Error code 255, while making 'test_dynamic' > > Examining XSMore.xs Line 109: > INCLUDE_COMMAND: $^X -Ilib -It/lib -MIncludeTester -e > IncludeTester::print_xs > > Then the generated line in XSMore.c: > #line 7 "./E:\usr\bin\perl.exe -Ilib -It/lib -MIncludeTester -e > IncludeTester::print_xs" > > The problem seems to be with the $^X path: ./E:\usr\bin\perl.exe > Changing the path in XSMore.xs Line 109 from ./E:\usr\bin\perl.exe to > E:/usr/bin/perl.exe or E:\\usr\\bin\\perl.exe the test 'more.t' passes > but dropping the leading ./ and running the test produced no C code, no > object file and no dll so in reality the pass is half-hearted. > > E:\usr\cpan\build\ExtUtils-ParseXS-2.22>tst > E:\usr\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, > 'blib\lib', 'blib\arch > ')" t/*.t > [01:36:18] t/basic.t .. ok     2171 ms > [01:36:20] t/more.t ... ok     2294 ms > [01:36:23] t/usage.t .. ok     2169 ms > [01:36:25] > All tests successful. > Files=3, Tests=59,  7 wallclock secs ( 0.14 usr +  0.05 sys =  0.19 CPU) > Result: PASS > > With the leading ./ I get these errors: > [01:56:04] t/more.t ... 1/25 '.' is not recognized as an internal or > external command,operable program or batch file. > [01:56:04] t/more.t ... 5/25 Undefined subroutine &XSMore::sum called at > t/more.t line 91. > > Not certain what the fix to this is but possibly a change to 'sub > INCLUDE_COMMAND_handler ()' in the ParseXS.pm. > > Any help most appreciated. > > -- > Regards, > Pete Armstrong > pete.a64@gmail.com >
Subject: Re: [rt.cpan.org #53938] MinGW Broken after 2.21
Date: Sat, 23 Jan 2010 11:20:24 -0800
To: bug-ExtUtils-ParseXS [...] rt.cpan.org
From: Pete Armstrong <pete.a64 [...] gmail.com>
Mr. Golden, Thanks for your quick response and I'll watch for follow-ups. Regards, Pete Armstrong pete.a64@gmail.com 866-503-9098 David Golden via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=53938 > > > Thanks for the report. I'm not sure what the issue is, but I'm CC'ing > a Windows expert and the person who wrote the INCLUDE_COMMAND feature > in the hopes that they can shed some light on the problem. > > -- David > > On Sat, Jan 23, 2010 at 5:01 AM, Pete Armstrong via RT > <bug-ExtUtils-ParseXS@rt.cpan.org> wrote: >
>> Sat Jan 23 05:01:18 2010: Request 53938 was acted upon. >> Transaction: Ticket created by parmstro64 >> Queue: ExtUtils-ParseXS >> Subject: MinGW Broken after 2.21 >> Broken in: (no value) >> Severity: Important >> Owner: Nobody >> Requestors: pete.a64@gmail.com >> Status: new >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=53938 > >> >> >> Building latest ExtUtils-ParseXS-2.22 using the MinGW32 3.4.5 Compiler >> with DMAKE. >> Have also built ExtUtils-ParseXS-2.22 under a Visual C 6 compiler with >> no problems. >> >> The follwing outlines the build with MinGW: >> >> E:\usr\cpan\build\ExtUtils-ParseXS-2.22>perl Makefile.PL >> Checking if your kit is complete... >> Looks good >> Writing Makefile for ExtUtils::ParseXS >> >> E:\usr\cpan\build\ExtUtils-ParseXS-2.22>mk >> cp lib/ExtUtils/ParseXS.pm blib\lib\ExtUtils\ParseXS.pm >> cp lib/ExtUtils/xsubpp blib\lib\ExtUtils\xsubpp >> >> E:\usr\cpan\build\ExtUtils-ParseXS-2.22>tst >> E:\usr\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, >> 'blib\lib', 'blib\arch')" t/*.t >> [01:23:05] t/basic.t .. ok 2171 ms >> [01:23:08] t/more.t ... 1/25 XSMore.c:306:9: warning: universal >> character names are only valid in C++ and C99 >> >> XSMore.c:306:9: incomplete universal character name \u << Hum? >> XSMore.c:306:9: warning: unknown escape sequence '\p' << Hum? >> >> error building dll file from 'XSMore.c' at >> E:/usr/lib/ExtUtils/CBuilder/Platform/Windows.pm line 127. >> # Looks like you planned 25 tests but ran 2. >> # Looks like your test exited with 2 just after 2. >> [01:23:08] t/more.t ... Dubious, test returned 2 (wstat 512, 0x200) >> Failed 23/25 subtests >> [01:23:09] t/usage.t .. ok 2153 ms >> [01:23:11] >> >> Test Summary Report >> ------------------- >> t/more.t (Wstat: 512 Tests: 2 Failed: 0) >> Non-zero exit status: 2 >> Parse errors: Bad plan. You planned 25 tests but ran 2. >> Files=3, Tests=36, 6 wallclock secs ( 0.09 usr + 0.08 sys = 0.17 CPU) >> Result: FAIL >> Failed 1/3 test programs. 0/36 subtests failed. >> dmake: Error code 255, while making 'test_dynamic' >> >> Examining XSMore.xs Line 109: >> INCLUDE_COMMAND: $^X -Ilib -It/lib -MIncludeTester -e >> IncludeTester::print_xs >> >> Then the generated line in XSMore.c: >> #line 7 "./E:\usr\bin\perl.exe -Ilib -It/lib -MIncludeTester -e >> IncludeTester::print_xs" >> >> The problem seems to be with the $^X path: ./E:\usr\bin\perl.exe >> Changing the path in XSMore.xs Line 109 from ./E:\usr\bin\perl.exe to >> E:/usr/bin/perl.exe or E:\\usr\\bin\\perl.exe the test 'more.t' passes >> but dropping the leading ./ and running the test produced no C code, no >> object file and no dll so in reality the pass is half-hearted. >> >> E:\usr\cpan\build\ExtUtils-ParseXS-2.22>tst >> E:\usr\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, >> 'blib\lib', 'blib\arch >> ')" t/*.t >> [01:36:18] t/basic.t .. ok 2171 ms >> [01:36:20] t/more.t ... ok 2294 ms >> [01:36:23] t/usage.t .. ok 2169 ms >> [01:36:25] >> All tests successful. >> Files=3, Tests=59, 7 wallclock secs ( 0.14 usr + 0.05 sys = 0.19 CPU) >> Result: PASS >> >> With the leading ./ I get these errors: >> [01:56:04] t/more.t ... 1/25 '.' is not recognized as an internal or >> external command,operable program or batch file. >> [01:56:04] t/more.t ... 5/25 Undefined subroutine &XSMore::sum called at >> t/more.t line 91. >> >> Not certain what the fix to this is but possibly a change to 'sub >> INCLUDE_COMMAND_handler ()' in the ParseXS.pm. >> >> Any help most appreciated. >> >> -- >> Regards, >> Pete Armstrong >> pete.a64@gmail.com >> >>
> >
Just ran into this bug when release-testing Perl::Dist::Strawberry... Since the release tests are being moved to xt\author, I get directories like this: ## Line 306 is below. #line 7 "./C:\PDStest\xt\release\tmp902\image\perl\bin\perl.exe -Ilib -It/lib -MIncludeTester -e IncludeTester::print_xs" which causes error messages like this: XSMore.c:306:9: warning: unknown escape sequence '\P' XSMore.c:306:9: \x used with no following hex digits XSMore.c:306:9: warning: unknown escape sequence '\i' XSMore.c:306:9: warning: unknown escape sequence '\p' XSMore.c:306:9: warning: unknown escape sequence '\p' error building dll file from 'XSMore.c' at C:/PDStest/xt/release/tmp902/image/perl/lib/ExtUtils/CBuilder/Platform/Windows.pm line 130. # Looks like you planned 25 tests but ran 2. # Looks like your test exited with 2 just after 2. Failed 1/3 test programs. 0/36 subtests failed. dmake.exe: Error code 255, while making 'test_dynamic' Maybe the fix is a quotemeta() call (to double the backslashes) at the appropriate place?
From: pete.a64 [...] gmail.com
On Sat Jan 23 05:01:18 2010, parmstro64 wrote: Show quoted text
> Building latest ExtUtils-ParseXS-2.22 using the MinGW32 3.4.5 Compiler > with DMAKE. > Have also built ExtUtils-ParseXS-2.22 under a Visual C 6 compiler with > no problems. > > The follwing outlines the build with MinGW: > > E:\usr\cpan\build\ExtUtils-ParseXS-2.22>perl Makefile.PL > Checking if your kit is complete... > Looks good > Writing Makefile for ExtUtils::ParseXS > > E:\usr\cpan\build\ExtUtils-ParseXS-2.22>mk > cp lib/ExtUtils/ParseXS.pm blib\lib\ExtUtils\ParseXS.pm > cp lib/ExtUtils/xsubpp blib\lib\ExtUtils\xsubpp > > E:\usr\cpan\build\ExtUtils-ParseXS-2.22>tst > E:\usr\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, > 'blib\lib', 'blib\arch')" t/*.t > [01:23:05] t/basic.t .. ok 2171 ms > [01:23:08] t/more.t ... 1/25 XSMore.c:306:9: warning: universal > character names are only valid in C++ and C99 > > XSMore.c:306:9: incomplete universal character name \u << Hum? > XSMore.c:306:9: warning: unknown escape sequence '\p' << Hum? > > error building dll file from 'XSMore.c' at > E:/usr/lib/ExtUtils/CBuilder/Platform/Windows.pm line 127. > # Looks like you planned 25 tests but ran 2. > # Looks like your test exited with 2 just after 2. > [01:23:08] t/more.t ... Dubious, test returned 2 (wstat 512, 0x200) > Failed 23/25 subtests > [01:23:09] t/usage.t .. ok 2153 ms > [01:23:11] > > Test Summary Report > ------------------- > t/more.t (Wstat: 512 Tests: 2 Failed: 0) > Non-zero exit status: 2 > Parse errors: Bad plan. You planned 25 tests but ran 2. > Files=3, Tests=36, 6 wallclock secs ( 0.09 usr + 0.08 sys = 0.17 CPU) > Result: FAIL > Failed 1/3 test programs. 0/36 subtests failed. > dmake: Error code 255, while making 'test_dynamic' > > Examining XSMore.xs Line 109: > INCLUDE_COMMAND: $^X -Ilib -It/lib -MIncludeTester -e > IncludeTester::print_xs > > Then the generated line in XSMore.c: > #line 7 "./E:\usr\bin\perl.exe -Ilib -It/lib -MIncludeTester -e > IncludeTester::print_xs" > > The problem seems to be with the $^X path: ./E:\usr\bin\perl.exe > Changing the path in XSMore.xs Line 109 from ./E:\usr\bin\perl.exe to > E:/usr/bin/perl.exe or E:\\usr\\bin\\perl.exe the test 'more.t' passes > but dropping the leading ./ and running the test produced no C code, no > object file and no dll so in reality the pass is half-hearted. > > E:\usr\cpan\build\ExtUtils-ParseXS-2.22>tst > E:\usr\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, > 'blib\lib', 'blib\arch > ')" t/*.t > [01:36:18] t/basic.t .. ok 2171 ms > [01:36:20] t/more.t ... ok 2294 ms > [01:36:23] t/usage.t .. ok 2169 ms > [01:36:25] > All tests successful. > Files=3, Tests=59, 7 wallclock secs ( 0.14 usr + 0.05 sys = 0.19 CPU) > Result: PASS > > With the leading ./ I get these errors: > [01:56:04] t/more.t ... 1/25 '.' is not recognized as an internal or > external command,operable program or batch file. > [01:56:04] t/more.t ... 5/25 Undefined subroutine &XSMore::sum called at > t/more.t line 91. > > Not certain what the fix to this is but possibly a change to 'sub > INCLUDE_COMMAND_handler ()' in the ParseXS.pm. > > Any help most appreciated.
I have found a problem with a regular expression used to generate the Perl executable path in lib/ExtUtils/ParseXS.pm : @@ -1604,7 +1604,7 @@ $filename = $_ ; $filepathname = $filename; - $filepathname =~ s/\"/\\"/g; ## << This does not work + $filepathname =~ s/\\/\\\\/g; ## << This works This patch was tested with Perl 5.12.3/MinGW GCC 4.5.3 and with MSVC6 and MSVC9 Perl 5.12.2 builds - all tests pass. I also added the patch submitted by mdootson cpan.org : gcc compilers on windows don't like backslashed paths in directives. Attached is the patch against 2.2206 correcting the Win32 MinGW problem. -- Regards, Pete Armstrong pete.a64@gmail.com
Subject: ExtUtils-ParseXS-Perl-Path.patch
--- ExtUtils-ParseXS-2.2206-Orig/lib/ExtUtils/ParseXS.pm +++ ExtUtils-ParseXS-2.2206-Patched/lib/ExtUtils/ParseXS.pm @@ -1546,7 +1546,7 @@ EOF $filename = $_ ; - $filepathname = File::Spec->catfile($dir, $filename); + $filepathname = ( $^O =~ /^mswin/i ) ? qq($dir/$filename) : File::Spec->catfile($dir, $filename); # Prime the pump by reading the first # non-blank line @@ -1604,7 +1604,7 @@ $filename = $_ ; $filepathname = $filename; - $filepathname =~ s/\"/\\"/g; + $filepathname =~ s/\\/\\\\/g; # Prime the pump by reading the first # non-blank line
I'll be bold and resolve this ticket after applying the patch(es). They'll be in an upcoming 3.00_04 release. Best regards, Steffen