Skip Menu |

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

Report information
The Basics
Id: 47722
Status: resolved
Worked: 5 min
Priority: 0/
Queue: ExtUtils-MakeMaker

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

Bug Information
Severity: Important
Broken in:
  • 6.53_01
  • 6.53_02
  • 6.53_03
  • 6.54
Fixed in: (no value)



Subject: t/xs.t broken for MSVC compilation on Windows
Microsoft Visual C needs the LIB environment variable to point to the directory of import libraries for the OS itself. Commit c04777 removed the LIB environment variable for MakeMaker tests: http://github.com/schwern/extutils-makemaker/blame/c04777f0fbf4563e0c3ea00ac24e2fe5ff152ce7/t/lib/MakeMaker/Test/Utils.pm The reason why I marked the bug as "important" is that it shows up as a test failure for 5.10.1 RC0. The trivial patch below also includes enabling '2>&1' redirection for Windows NT and later (cmd.exe). It isn't connected to this bug; just some drive-by bug-fixing while I was looking at the file. :) --- perl/5.10/t/lib/MakeMaker/Test/Utils.pm.~1~ Wed Jul 8 16:15:01 2009 +++ perl/5.10/t/lib/MakeMaker/Test/Utils.pm Wed Jul 8 16:15:01 2009 @@ -29,7 +29,6 @@ HARNESS_OPTIONS HARNESS_VERBOSE PREFIX - LIB MAKEFLAGS ); @@ -293,7 +292,7 @@ # Unix can handle 2>&1 and OS/2 from 5.005_54 up. # This makes our failure diagnostics nicer to read. - if( MM->os_flavor_is('Unix') or + if( MM->os_flavor_is('Unix') or MM->os_flavor_is('Win32', 'WinNT') or ($] > 5.00554 and MM->os_flavor_is('OS/2')) ) { return `$cmd 2>&1`; End of Patch.
On Wed Jul 08 19:53:24 2009, JDB wrote: Show quoted text
> Microsoft Visual C needs the LIB environment variable to point to the > directory of import libraries for the OS itself. > > Commit c04777 removed the LIB environment variable for MakeMaker > tests: > > http://github.com/schwern/extutils- >
makemaker/blame/c04777f0fbf4563e0c3ea00ac24e2fe5ff152ce7/t/lib/MakeMaker/Test/Utils.pm Show quoted text
> > The reason why I marked the bug as "important" is that it shows up as > a > test failure for 5.10.1 RC0.
Thanks, I put that in. Show quoted text
> The trivial patch below also includes enabling '2>&1' redirection for > Windows NT and later (cmd.exe). It isn't connected to this bug; just > some drive-by bug-fixing while I was looking at the file. :) > > --- perl/5.10/t/lib/MakeMaker/Test/Utils.pm.~1~ Wed Jul 8 16:15:01 > 2009 > +++ perl/5.10/t/lib/MakeMaker/Test/Utils.pm Wed Jul 8 16:15:01 2009 > @@ -293,7 +292,7 @@ > > # Unix can handle 2>&1 and OS/2 from 5.005_54 up. > # This makes our failure diagnostics nicer to read. > - if( MM->os_flavor_is('Unix') or > + if( MM->os_flavor_is('Unix') or MM->os_flavor_is('Win32', > 'WinNT') or > ($] > 5.00554 and MM->os_flavor_is('OS/2')) > ) { > return `$cmd 2>&1`; > End of Patch.
Oh, uhh, it seems detection of Windows NT was never implemented. Just Windows 95. I guess MakeMaker never needed it. Defining what the useful subsets of Windows are is not something I feel I'm an expert in. Even OSType and Devel::CheckOS don't bother. If you want to give it a shot please do. Also os_flavor_is() is an OR not an AND. So it would just be MM->os_flavor_is("WinNT"). Meanwhile, it seems we can do this as "everything which is not Windows 9x". --- a/t/lib/MakeMaker/Test/Utils.pm +++ b/t/lib/MakeMaker/Test/Utils.pm @@ -290,9 +290,10 @@ sub run { use ExtUtils::MM; - # Unix can handle 2>&1 and OS/2 from 5.005_54 up. + # Unix, modern Windows and OS/2 from 5.005_54 up can handle can handle 2>&1 # This makes our failure diagnostics nicer to read. - if( MM->os_flavor_is('Unix') or + if( MM->os_flavor_is('Unix') or + (MM->os_flavor_is('Win32') and !MM->os_flavor_is('Win9x')) or ($] > 5.00554 and MM->os_flavor_is('OS/2')) ) { return `$cmd 2>&1`;
This appears to have been resolved. Many thanks.