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
CMakeNotFoundError with pyodide: cmake -E capabilities failed #716
Comments
I was able to debug inside scikit-build-core, by using [build-system]
requires = ["pybind11", "packaging", "pathspec"]
build-backend = "scikit_build_core.build"
backend-path = ["_backends/scikit-build-core/src/"] As a matter of fact def get_cmake_program(cmake_path: Path) -> Program:
"""
Get the Program (with version) for CMake given a path. The version will be
None if it cannot be determined.
"""
# get version and capabilities with subprocess (my instrumentation)
import subprocess
version_result = subprocess.run([cmake_path, "--version"], capture_output=True)
capabilities_result = subprocess.run([cmake_path, "-E", "capabilities"], capture_output=True)
raise Exception(f"""
get_cmake_program
{cmake_path=}
{version_result.stdout=}
{version_result.returncode=})
{capabilities_result.stdout=}
{capabilities_result.returncode=}
{capabilities_result.stderr=}
)
""")
# original code below
try:
result = Run().capture(cmake_path, "-E", "capabilities")
except (subprocess.CalledProcessError, PermissionError):
return Program(cmake_path, None)
try:
version = Version(json.loads(result.stdout)["version"]["string"])
except (json.decoder.JSONDecodeError, KeyError, InvalidVersion):
logger.warning("Could not determine CMake version, got {!r}", result.stdout)
return Program(cmake_path, None)
logger.info("CMake version: {}", version)
return Program(cmake_path, version) And I get the following exception as an output:
So as a conclusion, I can see that the command |
Probably #715? |
oh yes, after a deep dive in the internal of the code, I now see that it it the same. |
I'll be fixing shortly. Really pyodide's fault, but I can fix here faster. |
(0.8.x works until then with Pyodide) |
Fix in pyodide is #717, FYI. |
Fix released as 0.9.1! |
Thanks a lot !!! |
Hello,
I am brand new to pyodide, but I'm trying to compile a project (imgui_bundle) that uses scikit-build-core.
I'm trying to build it from inside the pyodide build tree, and inside the Docker container, by running this command:
And I get this error:
Here is an extract from my pyproject.toml:
And the meta.yaml file I am using:
I did find where the exception is raised:
scikit-build-core/src/scikit_build_core/cmake.py
Lines 53 to 63 in f844088
It seems that it might perhaps be possible to pass the cmake location via the env variable
CMAKE_EXECUTABLE
, but this does not work.I'm afraid I might be missing something obvious. However, I can not find a way to debug the internals of scikit_build_core, Since it is installed in a temporary isolated environment. Help would be appreciated.
Many thanks!
The text was updated successfully, but these errors were encountered: