Giter VIP home page Giter VIP logo

Comments (3)

TheDS avatar TheDS commented on August 11, 2024 2

So I've been able to reproduce this recently and I don't think it's an AMBuild bug per se. Notice that it's dying when it calls doResource which is where rc.exe is being invoked. If you start the VS2015 x86 Native Tools Command Prompt and try to run rc, you will probably find that it doesn't exist in the current path. This is the file which is not being found. This seems to be a problem when you have VS 2017 or 2019 installed along with the 2015 build tools.

Having searched the internet about rc.exe being missing, I've found that it seems to be a fairly common problem with no satisfying solution. I've tried repairing my install as well as uninstalling and reinstalling to no avail.

The problem lies in the path to the Windows SDK. By default (on my Windows 10 machine), it assumes the SDK tools are in C:\Program Files (x86)\Windows Kits\10\bin\x86 which has no executable in it. The batch script that the VS2015 Command Prompt shortcut invokes is located at C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat. The first argument is the platform (x86 or x64). Then there's a second argument for the Windows SDK version. On my machine I have SDKs installed for 8.1 and other builds of 10 such as 10.0.17763.0. These SDK locations do have rc.exe in them. The various builds of the 10 SDK can be seen in C:\Program Files (x86)\Windows Kits\10\bin.

Possible solutions I've found so far:

  1. If you specify 8.1 as the second argument to the batch script, then rc can be run and AMBuild works nicely again. For some reason, using one of the 10.x.x versions does not.
  2. Copy or make symbolic links for rc.exe and rcdll.dll from one of the SDK locations into C:\Program Files (x86)\Windows Kits\10\bin\x86
  3. Add one of the other SDK version paths to your PATH environment variable. For example:
    set PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86;%PATH%

Could you confirm that the above is true for you as well?

All that said, I think it would be good to have a clearer error message from AMBuild when something like this happens. An error could say that rc couldn't be found. That's not immediately obvious from the error you get now unless you know what to look for.

from ambuild.

Headline avatar Headline commented on August 11, 2024

here's a full build output from a clean python 3 installation

https://pastebin.com/tq510G0s

from ambuild.

dvander avatar dvander commented on August 11, 2024

While working on AMBuild's MSVC detection, I ran into this problem. Indeed the VS2015 build tools don't detect newer SDKs properly. The new detection logic will early abort if "rc.exe" is not found in path, so I think we can close this.

Since (1) MSVC 2015 is pretty old, and (2) it'll really only get used on our build machines, where we have to manually configure the environment anyway I didn't attempt to fix this further in our detection logic. But in theory we could, by enumerating the SDKs, and making sure one of them is in PATH.

from ambuild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.