Perl-Toolchain-Gang / ExtUtils-MakeMaker

Perl module to make Makefiles and build modules (what backs Makefile.PL)
https://metacpan.org/release/ExtUtils-MakeMaker
64 stars 77 forks source link

32 bit chcp doesn't exist on Win64, test failures #193

Closed bulk88 closed 9 years ago

bulk88 commented 9 years ago

On my Server 2003 R2 SP2 Win64 OS machine, EUMM with 32 bit (but not 64 bit) bleed perl is now failing.

Test Summary Report
-------------------
../cpan/ExtUtils-MakeMaker/t/min_perl_version.t                  (Wstat: 512 Tes
ts: 36 Failed: 2)
  Failed tests:  19, 25
  Non-zero exit status: 2
../cpan/ExtUtils-MakeMaker/t/pm_to_blib.t                        (Wstat: 0 Tests
: 14 Failed: 0)
  TODO passed:   10-11
../cpan/ExtUtils-MakeMaker/t/prereq_print.t                      (Wstat: 768 Tes
ts: 11 Failed: 3)
  Failed tests:  5-6, 9
  Non-zero exit status: 3
../cpan/parent/t/parent-pmc.t                                    (Wstat: 768 Tes
ts: 3 Failed: 3)
  Failed tests:  1-3
  Non-zero exit status: 3
../ext/IPC-Open3/t/IPC-Open3.t                                   (Wstat: 0 Tests
: 44 Failed: 0)
  TODO passed:   25
Files=2429, Tests=665872, 3493 wallclock secs (177.02 usr + 24.64 sys = 201.66 C
PU)
Result: FAIL
NMAKE : fatal error U1077: '.\perl.exe' : return code '0x8'
Stop.

C:\p521\srcnew\win32>

../cpan/parent/t/parent-pmc.t is unrelated to ticket.

C:\p521\srcnew\t>perl harness -v ../cpan/ExtUtils-MakeMaker/t/min_perl_version.t

../cpan/ExtUtils-MakeMaker/t/min_perl_version.t .. 'chcp' is not recognized as a
n internal or external command,
operable program or batch file.

1..36
ok 1 - setup
ok 2 - entering dir Min-PerlVers
# Argument verification
ok 3 - capturing stdout
ok 4 - MIN_PERL_VERSION=5 does not trigger a warning
ok 5 -   nor a hard failure
ok 6 - MIN_PERL_VERSION=X.Y.Z does not trigger a warning
ok 7 -   nor a hard failure
ok 8 - MIN_PERL_VERSION=X.Y.Z does not trigger a warning
ok 9 -   nor a hard failure
ok 10 - MIN_PERL_VERSION=X.Y.Z does not trigger a warning
ok 11 -   nor a hard failure
ok 12 - MIN_PERL_VERSION=999999 triggers a warning
ok 13 -   with expected message text
ok 14 -   and without a hard failure
ok 15 - MIN_PERL_VERSION=999999 and PREREQ_FATAL: no warning
ok 16 -   correct exception
ok 17 - Invalid MIN_PERL_VERSION is fatal
# PREREQ_PRINT output

ok 18 - PREREQ_PRINT exiting normally#   Failed test '  and talking like we expe
ct'

#   at t/min_perl_version.t line 142.
# 'chcp' is not recognized as an internal or external command,
not ok 19 -   and talking like we expect# operable program or batch file.

# $PREREQ_PM = {
#                'strict' => '0'
#              };
# $MIN_PERL_VERSION = '5.005';
# $BUILD_REQUIRES = {};
ok 20 # skip not going to evaluate rubbish
ok 21 # skip not going to evaluate rubbish
ok 22 # skip not going to evaluate rubbish
# PRINT_PREREQ output
ok 23 - PRINT_PREREQ exiting normally

ok 24 -   and not complaining loudly#   Failed test 'dump has prereqs and perl v
ersion'

#   at t/min_perl_version.t line 166.
#                   ''chcp' is not recognized as an internal or external command
,
not ok 25 - dump has prereqs and perl version# operable program or batch file.

# perl(perl)>=5.005  perl(strict)>=0
# '
#     doesn't match '(?^x:^perl\(perl\) \s* >= 5\.005 \s+ perl\(strict\) \s* >=
\s* 0 \s*$)'
# generated files verification
ok 26 - Makefile.PL exiting normally
ok 27 - Makefile present
# ppd output
ok 28 - Make ppd exiting normally
ok 29 -   .ppd file present
ok 30 -   .ppd file content good
# META.yml output
ok 31 - META.yml validates
ok 32 - META.yml has runtime/requires perl 5.005
ok 33 - META.json validates
ok 34 - META.json has runtime/requires perl 5.005
ok 35 - leaving dir
ok 36 - teardown
# Looks like you failed 2 tests of 36.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/36 subtests
        (less 3 skipped subtests: 31 okay)

Test Summary Report
-------------------
../cpan/ExtUtils-MakeMaker/t/min_perl_version.t (Wstat: 512 Tests: 36 Failed: 2)

  Failed tests:  19, 25
  Non-zero exit status: 2
Files=1, Tests=36, 12 wallclock secs ( 0.02 usr +  0.01 sys =  0.03 CPU)
Result: FAIL

C:\p521\srcnew\t>
C:\p521\srcnew\t>perl harness -v ../cpan/ExtUtils-MakeMaker/t/prereq_print.t
../cpan/ExtUtils-MakeMaker/t/prereq_print.t .. 'chcp' is not recognized as an in
ternal or external command,
operable program or batch file.

1..11
ok 1 - setup
ok 2 - chdir'd to Big-Dummy
ok 3 - PREREQ_PRINT produces no MakefileBareword found where operator expected a
t (eval 30) line 1, near "'chcp' is"

        (Missing operator before is?)
Unquoted string "is" may clash with future reserved word at (eval 30) line 1.
ok 4 -   exited normally

#   Failed test 'prereqs dumped'
#   at t/prereq_print.t line 56.
#     Structures begin differing at:
#          $got = undef
#     $expected = HASH(0x2576ad4)
not ok 5 - prereqs dumped

#   Failed test '  without error'
#   at t/prereq_print.t line 57.
not ok 6 -   without error#          got: 'syntax error at (eval 30) line 1, nea
r "'chcp' is "

# '
#     expected: ''
ok 7 - PRINT_PREREQ produces no Makefile

#   Failed test 'prereqs dumped'
ok 8 -   exited normally#   at t/prereq_print.t line 64.

#                   ''chcp' is not recognized as an internal or external command
,
# operable program or batch file.
not ok 9 - prereqs dumped# perl(strict)>=0

# '
#     doesn't match '(?^x:^perl\(strict\) \s* >= \s* 0 \s*$)'
ok 10
ok 11 - teardown
# Looks like you failed 3 tests of 11.
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/11 subtests

Test Summary Report
-------------------
../cpan/ExtUtils-MakeMaker/t/prereq_print.t (Wstat: 768 Tests: 11 Failed: 3)
  Failed tests:  5-6, 9
  Non-zero exit status: 3
Files=1, Tests=11,  3 wallclock secs ( 0.08 usr +  0.00 sys =  0.08 CPU)
Result: FAIL

C:\p521\srcnew\t>

With a 32 bit cmd.exe (64 bit cmd.exe won't work for demo since it will search the 64 bit system32)

C:\p521\srcnew\t>C:\windows\system32\chcp.com
'C:\windows\system32\chcp.com' is not recognized as an internal or external comm
and,
operable program or batch file.

C:\p521\srcnew\t>C:\windows\sysnative\chcp.com
Active code page: 437

C:\p521\srcnew\t>C:\windows\syswow64\chcp.com
'C:\windows\syswow64\chcp.com' is not recognized as an internal or external comm
and,
operable program or batch file.

C:\p521\srcnew\t>where chcp.com
INFO: Could not find files for the given pattern(s).

C:\p521\srcnew\t>

now with a 64 bit cmd.exe

C:\Documents and Settings\Administrator>chcp.com
Active code page: 437

C:\Documents and Settings\Administrator>where chcp.com
C:\WINDOWS\system32\chcp.com

C:\Documents and Settings\Administrator>C:\windows\system32\chcp.com
Active code page: 437

C:\Documents and Settings\Administrator>

I will assume everyone knows how WOW64 works so ill skip that. The "chcp" execution is from https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/commit/01f64a64cbd41f1701d2c0779ad20e9ea7f5efdc .

A couple internet links say 32 bit chcp doesn't exist on server 2003 x64. https://support.ca.com/cadocs/0/CA%203Tera%20Applogic%203%200-ENU/Bookshelf_Files/HTML/Developer_Guide/index.htm?toc.htm?WinInstallRefSingleCDInstall.html

If you are installing a 64-bit non-English localized version of Windows Server 2003, copy chcp.com from C:\WINDOWS\system32 to C:\WINDOWS\SYSWOW64 as described above. 

http://download4.boulder.ibm.com/sar/CMA/TIA/012uz/0/1.0.0-TIV-TKLM-FP0004.README.html

When using 32-bit DB2 on 64-bit Windows, the log %TIO_LOGS%\fixpack\checkDBpassword.log may contain the error message: 'chcp' is not recognized as an internal or external command, operable program or batch file.

This is a limitation of 64-bit Windows, which hides commands such as chcp from 32-bit applications.

The error can be ignored. It does not have any impact on DB2 functionality.

http://h10032.www1.hp.com/ctg/Manual/c01800114.pdf

Minor Issues
The following is a minor issue for vseassist Troubleshooting Utility .
• “chcp” Error when Running vseassist Managed Node Configuration Checks for a 64-bit
Windows Managed System When running vseassist Managed Node Configuration
checks for a 64-bit Windows managed system, the following message will be displayed in
stderr:
'chcp' is not recognized as an internal or external command, operable program or batch file.
This is an issue with the remote command execution facility (DTF) of SIM, and the message
can be ignored.

sysnative for server 2003 is a MS optional "hotfix" which I installed. Other server 2003 users might not have it.

I dont like the existance of ExtUtils::MakeMaker::Locale the module. It repeatedly tries to load XS on miniperl, which throws an exceptions. Waste of many milliseconds. EUMM never loaded Encode, Win32::API, or Win32::Console previously (6.56 specifically), the only XS module 6.56 used in a EUMM 6.56 process were Cwd:: and Win32::. ExtUtils::MakeMaker::Locale didn't exist for 20 years, why does it need to exist now?

bulk88 commented 9 years ago

extended log of failing tests

C:\p521\srcnew\t>perl harness -v ../cpan/ExtUtils-MakeMaker/t/min_perl_version.t

../cpan/ExtUtils-MakeMaker/t/min_perl_version.t .. 'chcp' is not recognized as a
n internal or external command,
operable program or batch file.

1..36
ok 1 - setup
ok 2 - entering dir Min-PerlVers
# Argument verification
ok 3 - capturing stdout
ok 4 - MIN_PERL_VERSION=5 does not trigger a warning
ok 5 -   nor a hard failure
ok 6 - MIN_PERL_VERSION=X.Y.Z does not trigger a warning
ok 7 -   nor a hard failure
ok 8 - MIN_PERL_VERSION=X.Y.Z does not trigger a warning
ok 9 -   nor a hard failure
ok 10 - MIN_PERL_VERSION=X.Y.Z does not trigger a warning
ok 11 -   nor a hard failure
ok 12 - MIN_PERL_VERSION=999999 triggers a warning
ok 13 -   with expected message text
ok 14 -   and without a hard failure
ok 15 - MIN_PERL_VERSION=999999 and PREREQ_FATAL: no warning
ok 16 -   correct exception
ok 17 - Invalid MIN_PERL_VERSION is fatal
# PREREQ_PRINT output

#   Failed test '  and talking like we expect'
ok 18 - PREREQ_PRINT exiting normally#   at t/min_perl_version.t line 142.

# 'chcp' is not recognized as an internal or external command,
not ok 19 -   and talking like we expect# operable program or batch file.

# $PREREQ_PM = {
#                'strict' => '0'
#              };
# $MIN_PERL_VERSION = '5.005';
# $BUILD_REQUIRES = {};
ok 20 # skip not going to evaluate rubbish
ok 21 # skip not going to evaluate rubbish
ok 22 # skip not going to evaluate rubbish
# PRINT_PREREQ output
ok 23 - PRINT_PREREQ exiting normally

#   Failed test 'dump has prereqs and perl version'
ok 24 -   and not complaining loudly#   at t/min_perl_version.t line 166.

#                   ''chcp' is not recognized as an internal or external command
,
# operable program or batch file.
not ok 25 - dump has prereqs and perl version# perl(perl)>=5.005  perl(strict)>=
0

# '
#     doesn't match '(?^x:^perl\(perl\) \s* >= 5\.005 \s+ perl\(strict\) \s* >=
\s* 0 \s*$)'
# generated files verification
ok 26 - Makefile.PL exiting normally
ok 27 - Makefile present
# ppd output
ok 28 - Make ppd exiting normally
ok 29 -   .ppd file present
ok 30 -   .ppd file content good
# META.yml output
ok 31 - META.yml validates
ok 32 - META.yml has runtime/requires perl 5.005
ok 33 - META.json validates
ok 34 - META.json has runtime/requires perl 5.005
ok 35 - leaving dir
ok 36 - teardown
# Looks like you failed 2 tests of 36.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/36 subtests
        (less 3 skipped subtests: 31 okay)

Test Summary Report
-------------------
../cpan/ExtUtils-MakeMaker/t/min_perl_version.t (Wstat: 512 Tests: 36 Failed: 2)

  Failed tests:  19, 25
  Non-zero exit status: 2
Files=1, Tests=36,  9 wallclock secs ( 0.00 usr +  0.01 sys =  0.01 CPU)
Result: FAIL

C:\p521\srcnew\t>
C:\p521\srcnew\t>perl harness -v ../cpan/ExtUtils-MakeMaker/t/prereq_print.t
../cpan/ExtUtils-MakeMaker/t/prereq_print.t .. 'chcp' is not recognized as an in
ternal or external command,
operable program or batch file.

1..11
ok 1 - setup
ok 2 - chdir'd to Big-Dummy
ok 3 - PREREQ_PRINT produces no MakefileBareword found where operator expected a
t (eval 30) line 1, near "'chcp' is"

        (Missing operator before is?)
Unquoted string "is" may clash with future reserved word at (eval 30) line 1.
ok 4 -   exited normally

#   Failed test 'prereqs dumped'
#   at t/prereq_print.t line 56.
not ok 5 - prereqs dumped
#     Structures begin differing at:
#          $got = undef
#     $expected = HASH(0x25669bc)

#   Failed test '  without error'
#   at t/prereq_print.t line 57.
not ok 6 -   without error#          got: 'syntax error at (eval 30) line 1, nea
r "'chcp' is "

# '
#     expected: ''
ok 7 - PRINT_PREREQ produces no Makefile
ok 8 -   exited normally

#   Failed test 'prereqs dumped'
#   at t/prereq_print.t line 64.
not ok 9 - prereqs dumped
#                   ''chcp' is not recognized as an internal or external command
,
# operable program or batch file.
# perl(strict)>=0
# '
#     doesn't match '(?^x:^perl\(strict\) \s* >= \s* 0 \s*$)'
ok 10
ok 11 - teardown
# Looks like you failed 3 tests of 11.
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/11 subtests

Test Summary Report
-------------------
../cpan/ExtUtils-MakeMaker/t/prereq_print.t (Wstat: 768 Tests: 11 Failed: 3)
  Failed tests:  5-6, 9
  Non-zero exit status: 3
Files=1, Tests=11,  2 wallclock secs ( 0.00 usr +  0.02 sys =  0.02 CPU)
Result: FAIL

C:\p521\srcnew\t>
bulk88 commented 9 years ago

One idea is, if chcp doesn't work, try "reg.exe" and read the system wide CPs http://stackoverflow.com/questions/10702103/how-to-get-windows-xp-gui-default-code-page . It is very unlikely for the console to be a different CP/locale/international setting from the OS wide value.

mohawk2 commented 9 years ago

I believe this commit (https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/commit/cda0edd5067a2348f183d9100cc5b0fa92336937) will make those tests now pass. Could you try git latest EUMM?

bulk88 commented 9 years ago

fixed, tests dont fail on blead with 7.05