ITADN

Cannot install `cmake` from SDist in a GHA `cibuildwheel` environment with `platform=ios`

#619ClosedXuehaiPan 创建于 2025-07-14
X
XuehaiPancommented
As per the PR title, in the build environment, the build backend tries to install the build requirement `cmake` via its SDist, which fails. Additional Context: - metaopt/optree#232 - GHA Log: https://github.com/metaopt/optree/actions/runs/16258109121/job/45897990674?pr=232#step:11:404 <details> <summary>Error Log</summary> ```log + python -m build /Users/runner/work/optree/optree --wheel --outdir=/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-m9ujacq9/cp313-ios_arm64_iphonesimulator/built_wheel * Creating isolated environment: venv+pip... * Installing packages in isolated environment: - pybind11 >= 2.12 - setuptools >= 77.0 * Getting build dependencies for wheel... * Installing packages in isolated environment: - cmake >= 3.18 > /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw- run-m9ujacq9/cp313-ios_arm64_iphonesimulator/build/venv/bin/python -m pip --python /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-fmcyonie/bin/python install --use-pep517 --no-warn-script-location --no-compile -r /var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-reqs-_takowj7.txt < Collecting cmake>=3.18 (from -r /var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-reqs- _takowj7.txt (line 1)) < Downloading cmake-4.0.3.tar.gz (34 kB) < Installing build dependencies: started < Installing build dependencies: finished with status 'done' < Getting requirements to build wheel: started < Getting requirements to build wheel: finished with status 'done' < Preparing metadata (pyproject.toml): started < Preparing metadata (pyproject.toml): finished with status 'done' < Building wheels for collected packages: cmake < Building wheel for cmake (pyproject.toml): started < Building wheel for cmake (pyproject.toml): finished with status 'error' < Failed to build cmake < error: subprocess-exited-with-error < × Building wheel for cmake (pyproject.toml) did not run successfully. < │ exit code: 1 < ╰─> [34 lines of output] < --------------------------------------------- < CMake 4.0.3, Copyright 2000-2025 Kitware, Inc. and Contributors < --------------------------------------------- < Error when bootstrapping CMake: < Cannot find appropriate C compiler on this system. < Please specify one using environment variable CC. < See cmake_bootstrap.log for compilers attempted. < < --------------------------------------------- < Log of errors: /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/tmpe8716z vr/cmake-4.0.3/Bootstrap.cmk/cmake_bootstrap.log < --------------------------------------------- < Traceback (most recent call last): < File "/Users/runner/Library/Application Support/virtualenv/wheel/3.13/image/1/SymlinkPipInstall/pip-25.1.1-py3-none- any/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> < main() < ~~~~^^ < File "/Users/runner/Library/Application Support/virtualenv/wheel/3.13/image/1/SymlinkPipInstall/pip-25.1.1-py3-none- any/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main < json_out["return_val"] = hook(**hook_input["kwargs"]) < ~~~~^^^^^^^^^^^^^^^^^^^^^^^^ < File "/Users/runner/Library/Application Support/virtualenv/wheel/3.13/image/1/SymlinkPipInstall/pip-25.1.1-py3-none- any/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel < return _build_backend().build_wheel( < ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ < wheel_directory, config_settings, metadata_directory < ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ < ) < ^ < File "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/pip- install-tksr_e2h/cmake_f186ee5ed8304e319fe11fc1e5082b93/_build_backend/backend.py", line 156, in build_wheel < cmake_path = _bootstrap_build(temp_path, config_settings) < File "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/pip- install-tksr_e2h/cmake_f186ee5ed8304e319fe11fc1e5082b93/_build_backend/backend.py", line 127, in _bootstrap_build < subprocess.run([bootstrap_path, *bootstrap_args], env=env, check=True) < ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ < File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 577, in run < raise CalledProcessError(retcode, process.args, < output=stdout, stderr=stderr) < subprocess.CalledProcessError: Command '[PosixPath('/var/folders/ y6/nj790rtn62lfktb1sh__79hc0000gn/T/tmpe8716zvr/cmake-4.0.3/bootstrap'), '-- prefix=/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/tmpe8716zvr/cmake-install', '--no-qt- gui', '--no-debugger', '--parallel={parallel}', '--', '-DBUILD_TESTING=OFF', '-DBUILD_CursesDialog:BOOL=OFF']' returned non-zero exit status 6. < [end of output] < note: This error originates from a subprocess, and is likely not a problem with pip. < ERROR: Failed building wheel for cmake < ERROR: Failed to build installable wheels for some pyproject.toml based projects (cmake) < Traceback (most recent call last): File "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-m9ujacq9/cp313-ios_arm64_iphonesimulator/build/venv/lib/python3.13/site-packages/build/__main__.py", line 178, in _handle_build_error yield File "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-m9ujacq9/cp313-ios_arm64_iphonesimulator/build/venv/lib/python3.13/site-packages/build/__main__.py", line 429, in main built = build_call( args.srcdir, ...<5 lines>... args.installer, ) File "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-m9ujacq9/cp313-ios_arm64_iphonesimulator/build/venv/lib/python3.13/site-packages/build/__main__.py", line 238, in build_package out = _build(isolation, srcdir, outdir, distribution, config_settings, skip_dependency_check, installer) File "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-m9ujacq9/cp313-ios_arm64_iphonesimulator/build/venv/lib/python3.13/site-packages/build/__main__.py", line 170, in _build return _build_in_isolated_env(srcdir, outdir, distribution, config_settings, installer) File "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-m9ujacq9/cp313-ios_arm64_iphonesimulator/build/venv/lib/python3.13/site-packages/build/__main__.py", line 137, in _build_in_isolated_env env.install(builder.get_requires_for_build(distribution, config_settings or {})) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-m9ujacq9/cp313-ios_arm64_iphonesimulator/build/venv/lib/python3.13/site-packages/build/env.py", line 136, in install self._env_backend.install_requirements(requirements) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ File "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-m9ujacq9/cp313-ios_arm64_iphonesimulator/build/venv/lib/python3.13/site-packages/build/env.py", line 265, in install_requirements run_subprocess(cmd) ~~~~~~~~~~~~~~^^^^^ File "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-m9ujacq9/cp313-ios_arm64_iphonesimulator/build/venv/lib/python3.13/site-packages/build/_ctx.py", line 71, in run_subprocess subprocess.run(cmd, capture_output=True, check=True, env=env) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-m9ujacq9/cp313-ios_arm64_iphonesimulator/build/venv/bin/python', '-m', 'pip', '--python', '/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-fmcyonie/bin/python', 'install', '--use-pep517', '--no-warn-script-location', '--no-compile', '-r', '/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-reqs-_takowj7.txt']' returned non-zero exit status 1. ERROR Command '['/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/cibw-run-m9ujacq9/cp313-ios_arm64_iphonesimulator/build/venv/bin/python', '-m', 'pip', '--python', '/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-fmcyonie/bin/python', 'install', '--use-pep517', '--no-warn-script-location', '--no-compile', '-r', '/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-reqs-_takowj7.txt']' returned non-zero exit status 1. ``` </details>
关闭于 2025-07-14 2 条评论