-
Notifications
You must be signed in to change notification settings - Fork 52
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
Building with MinGW on Windows fails #900
Comments
Scikit-build-core should try to build with the compiler used to compile Python. So if you used an MSVC-compiled Python, you'll likely see the above. If you used a Python built with MinGW, it should work out of the box. Though I think the actual problem here is CMake can't find MSVC, so it's falling back on NMake as a default generator. Can you set CMAKE_GENERATOR to Ninja (for example) and try again? |
We test this, actually: scikit-build-core/.github/workflows/ci.yml Line 294 in ca529d6
Though MSVC might still be detectable, so maybe we should make sure it's not used. |
That's good to know. It can't find MSVC, because it was not installed on that machine. Can scikit-build-core detect this? For me it's no problem to install MSVC, but it took 2 hours with a colleague to find the culprit (Missing MSVC on his machine). |
Actually, sk-build is able to identify such a situation:
Maybe make it more verbose and hint on this error? |
Unfortunately that may not be desired. There are projects made in skbuild-core without python bindings like cmake or ninja. Maybe there could be a
Interesting idea, I think there could be a design for that if skbuild-core has a |
The problem I see here is, that the build process hints at the CMakeLists.txt file as the source of error, whereas the different compilers for Python and the bindings are the problem. |
Installing e.g. the pybind11 example https://github.com/pybind/scikit_build_example with only MinGW (GCC) installed on Windows fails with a cryptic error message:
Building with MSVC works fine.
I know that GCC is not recommended for building extensions on Windows. Thus, a descriptive error message should hint the user at this problem.
The text was updated successfully, but these errors were encountered: