-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
msvc command line tools are not on %PATH% #10853
Comments
I believe this is "by design". I think you're expected to run vcvarsall.bat and pass arguments like amd64_arm64, x64, -vcvars_ver=14.41, etc. to control which of the many possible installed cl.exe versions are used. |
Hi @bnoordhuis - Thank you for bringing this issue to our attention. We will look into this issue and will update you on this issue after investigating. |
As another data point: we finally got it working but only after pulling in https://github.com/egor-tensin/vs-shell |
Hi @bnoordhuis - Thanks for your input! So, just to confirm, is it working fine for you and your issue got resolved? |
I wouldn't call it resolved; we found a workaround. You could summarize my original report as "invoking cl.exe is too darn hard" and that didn't change. |
Hi @bnoordhuis- Thanks for your reply! |
Original report as in #10853 (comment) |
Thanks @bnoordhuis your reply. I will check and update for "invoking cl.exe". |
Hi @bnoordhuis - As per your issue description, i can summarise that invoking cl.exe is overly complicated and not easy though. Despite finding a workaround using vs-shell, the core challenge of setting up a straightforward, reliable environment for msvc tools remains unresolved." However, as per my observation, in order to resolve the issue of msvc command line tools not being on %PATH%, you can try to use the following possibilities:-
These possible ways might be able to invoke cl.exe without relying on hard-coded paths. |
Hi @bnoordhuis - Since we haven't heard back, we'll assume your issue is resolved and will close this issue for now. Feel free to reach out to us for any other queries. Thanks. |
Description
Sorta similar to #6205 but I can offer a few more observations:
Trying to invoke cl.exe (and presumably ld.exe etc.) directly right now is... I didn't manage to get it working in Add C++ compile test quickjs-ng/quickjs#615 and I believe I qualify as at least moderately competent. It's definitely harder than it should be. The "ordained" way (according to search engines: use hard-coded paths to the current msvc point release) is extremely brittle.
clang-cl.exe, the cl.exe-compatible frontend for clang, is on the path. I'm not complaining but that seems inconsistent.
Maybe there's an easy and robust way to accomplish running cl.exe. In that case I would be grateful for improved documentation.
Blame where blame is due: I expected vcvarsall.bat to update %PATH% but it doesn't.
Platforms affected
Runner images affected
Image version and build link
n/a
Is it regression?
Has always been broken AFAICT
Expected behavior
n/a
Actual behavior
n/a
Repro steps
n/a
The text was updated successfully, but these errors were encountered: