Open bnoordhuis opened 3 weeks ago
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! I will check and update you for "invoking cl.exe". You are referring this original report- https://github.com/actions/runner-images/issues/6205 correct?
Original report as in https://github.com/actions/runner-images/issues/10853#issue-2609660304
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.
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 https://github.com/quickjs-ng/quickjs/pull/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