scikit-build-core
scikit-build-core copied to clipboard
Experiencing timeout finding CMake - should it be made configurable?
My build is running into this error locally.
https://github.com/scikit-build/scikit-build-core/blob/6084109ab23bca7779aa01931ce5e15fbc88fc83/src/scikit_build_core/program_search.py#L124
This appears to be due to the cmake -E capabilities command taking too long (> 5 seconds, it appears).
I'm not sure why this command takes so long on my machine, but I wonder if it would be helpful if the timeout could be made configurable.
For what it's worth, I'm running on a Mac M1, and CMake is installed to the local SSD. However, it is a fresh install of CMake, installed by conda-build, and it is also an x86 cmake binary so it is running under Rosetta. This may partially explain why it takes so long.
I believe we had this issue before especially with pip and/or conda. There are a few configurations you can try:
- Install all
build-system.requiresdependencies locally and try withpip install --no-build-issolation - See if this occurs with
build/uvas well - Try installing from
cmakefrom a source other than conda, either from PyPI directly, or download the official installer for mac https://cmake.org/download/
Thanks @LecrisUT !
I am invoking scikit-build-core as part of the build of a conda package. In this process, CMake is required to be installed by conda itself (and is a fresh install that is built into an environment which is solely used for building the package). So while I can try some alternate CMake installations for the purposes of debugging, I cannot use them in production.
That is odd. Is it failing on all conda builders like that? You might want to make sure the cmake conda package does not contain the python wrappers, that was one of the issues.
Otherwise conda should be using --no-build-issolation so it's hard to tell where the issue comes from.
The command is slow to respond, it's not downloading anything. On some systems it can be really, really slow. The problem is that this command can hang indefinitely, so we need some timeout, and if it's really long it's a bad user experience vs. just quitting and trying something else.
Do you know roughy how long it takes to respond? I'd be open to adjusting the timeout. We already have a longer time for Windows. Maybe we could even detect rosetta and give it more time in that case, to do the binary translation. I'd prefer trying to find timeouts that work for everyone rather than making it configurable if possible.
Current timeouts are 20 seconds for CI, 10 seconds for Windows, and 5 seconds for other platforms.
Thanks @henryiii ! Yes, on my machine it appears to take some time between 5 and 20 seconds, as it does succeed after setting CI=1. For me, that is a sufficient workaround for right now (so long as setting CI=1 doesn't have any other side effects).