Skip to content
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

Compiling with MSVC++ cl.exe on windows #15

Open
christian34 opened this issue Oct 9, 2024 · 0 comments
Open

Compiling with MSVC++ cl.exe on windows #15

christian34 opened this issue Oct 9, 2024 · 0 comments

Comments

@christian34
Copy link
Contributor

Compiling with microsoft compiler cl.exe (eg using cython) on github actions windows runner seems a bit tricky (to be smoothed for future ?).

I found a solution using ilammy/msvc-dev-cmd@v1(see https://stackoverflow.com/questions/64557292/how-can-i-use-the-msvc-compiler-from-github-actions), together with the caveat described on actions readme :

Name conflicts with shell: bash

Using shell: bash in Actions may shadow some of the paths added by MSVC. In particular, link.exe (Microsoft C linker) is prone to be shadowed by /usr/bin/link (GNU filesystem link tool).

Unfortunately, this happens because GitHub Actions unconditionally prepend GNU paths when shell: bash is used, on top of any paths set by msvc-dev-cmd, every time at the start of each new step. Hence, there aren't many non-destructive options here.

If you experience compilation errors where link complains about unreasonable command-line arguments, “extra operand something-something” – that's probably it. Recommended workaround is to remove /usr/bin/link if that interferes with your builds. If this is not acceptable, please file an issue, then we'll figure out something better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant