I need MSVC help

brian_d_foy on 2007-10-17T07:16:00

I'm helping David Cantrell with Devel::AssertLib -- particularly with Win32 portability.

I have a branch that passes tests on my Linux and Strawberry Perl platforms, and I've added code that I *think* should work with ActiveState and MSVC, but I don't have that platform set up anywhere.

I'd greatly appreciate if someone(s) would download the branch from my repository, try running tests and let me know what happens:

http://dagolden.googlecode.com/svn/shadow/Devel-AssertLib/branches/dagolden/

If it fails and you can patch it to work, that would be wonderful as well.

Thank you very much

-- dagolden


It fails...

AndyArmstrong on 2007-10-17T12:42:48

It's failing currently. I'll see if I can fix it :)

C:\cygwin\home\Administrator\Works\Perl\Devel-AssertLib\dagolden>nmake test

Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.

                C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00-load........ok
t/found..........'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
t/found..........1/3
# Failed test 'lib => 'm''
# at t/found.t line 29.
# got: 'Can't build and link to 'm'
# BEGIN failed--compilation aborted at (eval 10) line 2.
# '
# expected: ''

# Failed test 'lib => ['m', 'kernel32']'
# at t/found.t line 29.
# got: 'Can't build and link to 'm', 'kernel32'
# BEGIN failed--compilation aborted at (eval 12) line 2.
# '
# expected: ''
# Looks like you failed 2 tests of 3.
t/found.......... Dubious, test returned 2 (wstat 512, 0x200)
  Failed 2/3 subtests
t/not_found......1/9
# Failed test 'missing 'foo' detected'
# at t/not_found.t line 24.
# 'Can't build and link to 'm', 'foo'
# BEGIN failed--compilation aborted at (eval 11) line 2.
# '
# doesn't match '/^Can't build and link to 'foo'/ms'
# Looks like you failed 1 test of 9.
t/not_found...... Dubious, test returned 1 (wstat 256, 0x100)
  Failed 1/9 subtests

Test Summary Report
-------------------
t/found.t (Wstat: 512 Tests: 3 Failed: 2)
    Failed test number(s): 2-3
    Non-zero exit status: 2
t/not_found.t (Wstat: 256 Tests: 9 Failed: 1)
    Failed test number(s): 5
    Non-zero exit status: 1
Files=3, Tests=13, 1 wallclock secs ( 0.01 usr + 0.04 sys = 0.05 CPU)
Result: FAIL
Failed 2/3 test programs. 3/13 subtests failed.
NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x1'
Stop.

Re:It fails...

dagolden on 2007-10-17T13:11:00

Ah! The old "spaces in the PATH" trick. Either converting the system() call to array or else just calling the programs by their name instead of full path (after confirming they can be found in the full path) will probably do the trick.

Thanks for looking into it so quickly.

-- dagolden

Re:It fails...

AndyArmstrong on 2007-10-17T13:13:57

It gets worse. Get the name of the compiler right (it has spaces in the name) and

C:\cygwin\home\Administrator\Works\Perl\Devel-AssertLib\dagolden\bazbam.c ANDYARMSTRO89E4\Administrator:F
                                                                                                                                                    ANDYARMSTRO89E4\None:R
                                                                                                                                                    Everyone:R

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

bazbam.c
c1 : fatal error C1083: Cannot open source file: 'bazbam.c': Permission denied

I put bazbam.c in the project directory in case the temp dir was the problem. I can compile it manually using the same command line with no problem.

I'd forgotten just how profoundly painful the simplest things are in Windows :)

I'm going to have to take a break from this for now. I'll try to have another look at it later.

Re:It fails...

dagolden on 2007-10-17T13:56:57

Damn. Well, thanks very much for manually smoking this for me. I'll have to see about getting AS/MSVC up in a virtual machine and working this problem from there.

-- dagolden

Re:It fails...

AndyArmstrong on 2007-10-17T15:04:38

I'll try to have another look at it later David. Just got bogged down in the day job :)