Comments (3)
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:
- 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. - Copy or make symbolic links for
rc.exe
andrcdll.dll
from one of the SDK locations intoC:\Program Files (x86)\Windows Kits\10\bin\x86
- 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.
here's a full build output from a clean python 3 installation
from ambuild.
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)
- Standarize problem output HOT 2
- Windows can't generate configs for ambuild. HOT 2
- How to change to vs ? i wanna debug project HOT 1
- [clang/macOS/2.2 API] does not output build errors from individual source files HOT 1
- Visual Studio project generation broken after Dep removal HOT 1
- Can't compile with MSVC in normal command prompt HOT 2
- [Question] Could i upgrade AMBuild to use other compiler, e.g. Sourcepawn? HOT 1
- Add copy-all-files-in-directory version of builder.AddCopy
- Compiler has no attribute preprocessArgs
- pip future deprecation: inplace built HOT 2
- Add support for msvc17 "2022" gen
- Add full rebuild option HOT 1
- error when installing on Windows 11 HOT 5
- how to enable exceptions? HOT 1
- test-c.exe and test-cxx.exe detected as trojans HOT 1
- PicklingError under python 3.9.13
- Custom tools are ignored in project generators
- Console color doesn't reset properly on windows cmd/terminal if protoc is used HOT 1
- AMBuild is currently broken HOT 12
- AMBuild Windows Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ambuild.