Failing to set up environment for 64-bit compilers from SDK v7.0

p.f.moore's Avatar

p.f.moore

22 Sep, 2014 09:42 PM

I'm trying to set up the 64-bit SDK compilers from the MS SDK v7.0. The install section of my appveyor.yml file looks like this:

install:
  - "powershell appveyor\\install.ps1"
  - '"C:\Program Files\Microsoft SDKs\Windows\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release'

But I get the error:

"C:\Program Files\Microsoft SDKs\Windows\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
29'Cmd' is not recognized as an internal or external command,
30operable program or batch file.
31'REG' is not recognized as an internal or external command,
32operable program or batch file.
33'REG' is not recognized as an internal or external command,
34operable program or batch file.
35The x64 compilers are not currently installed.

It looks like somehow cmd and reg are not being recognised as valid commands within the batch file. How could that be happening?

The actual build I want to do is more complex than this, as I only want to configure the 64-bit compilers for some of the build matrix (the 64-bit Python environments). So the full build uses a batch file containing the SetEnv call, but I get the same error there.

If it helps, the full failing build is at https://ci.appveyor.com/project/pfmoore/blist.

Any suggestions gratefully accepted - I'm baffled.
Paul

  1. Support Staff 1 Posted by Feodor Fitsner on 22 Sep, 2014 11:50 PM

    Feodor Fitsner's Avatar

    I don't know what's the problem with a script for SDK 7.0, but the one for SDK 7.1 works:

    "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
    
  2. 2 Posted by p.f.moore on 23 Sep, 2014 08:20 AM

    p.f.moore's Avatar

    Yes, it's odd. Unfortunately, to build artifacts for Python 2.7, I need to use the v7.0 SDK. I'll install the two SDKs locally and see if I can see why they are behaving differently.

  3. 3 Posted by p.f.moore on 23 Sep, 2014 12:22 PM

    p.f.moore's Avatar

    I've just checked this on a local SDK v7.0 install, and I get the same error. Looks like it's a microsoft bug :-(

  4. Support Staff 4 Posted by Feodor Fitsner on 24 Sep, 2014 01:45 AM

    Feodor Fitsner's Avatar

    Maybe it could be fixed somehow, for example changing Cmd to cmd?..

  5. 5 Posted by p.f.moore on 24 Sep, 2014 06:32 AM

    p.f.moore's Avatar

    It seems like running the script via a batch file that includes "setlocal
    enabledelayedexpansion" fixes the issue.

  6. Support Staff 6 Posted by Feodor Fitsner on 24 Sep, 2014 06:35 AM

    Feodor Fitsner's Avatar

    Great finding, thanks! This is worth moving to KB area.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac