scikit-build-core
scikit-build-core copied to clipboard
Building with MinGW on Windows fails
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 wheel for scikit_build_example (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
2024-09-14 09:09:38,528 - scikit_build_core - INFO - RUN: C:\Program Files\CMake\bin\cmake.EXE -E capabilities
2024-09-14 09:09:38,544 - scikit_build_core - INFO - CMake version: 3.29.2
*** scikit-build-core 0.10.6 using CMake 3.29.2 (wheel)
2024-09-14 09:09:38,557 - scikit_build_core - INFO - Build directory: C:\Users\Thore\AppData\Local\Temp\tmpcpenilot\build
*** Configuring CMake...
2024-09-14 09:09:38,634 - scikit_build_core - WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=None
2024-09-14 09:09:38,643 - scikit_build_core - INFO - RUN: C:\Program Files\CMake\bin\cmake.EXE -S. -BC:\Users\Thore\AppData\Local\Temp\tmpcpenilot\build -CC:\Users\Thore\AppData\Local\Temp\tmpcpenilot\build\CMakeInit.txt -DCMAKE_INSTALL_PREFIX=C:\Users\Thore\AppData\Local\Temp\tmpcpenilot\wheel\platlib
loading initial cache file C:\Users\Thore\AppData\Local\Temp\tmpcpenilot\build\CMakeInit.txt
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:7 (project):
Running
'nmake' '-?'
failed with:
no such file or directory
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
*** CMake configuration failed
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for scikit_build_example
Failed to build scikit_build_example
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (scikit_build_example)
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.