-
Notifications
You must be signed in to change notification settings - Fork 55
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
Problems finding Python on manylinux #472
Comments
Try Edit: Oh I looked at your PR and you have it. Why do you include the |
The call trace from above is not from a As for the Even with all the above, the scikit-build-core warnings from the issue description are still present. |
I was concerned how
Indeed you should configure the external packages. One note, it's supposed to be As for the warning itself:
This would probably be resolved in pybind/pybind11#4786 |
Hmm, I took a closer look and it is weird because you are supposed to be hitting this branch: |
Thanks for the clarification.
Mostly historic reasons and how our projects evolved. We have one core package that provides pybind11 as a submodule. This core package is then added as a submodule to many top-level projects that all build their own python bindings based on pybind (using that submodule). I'll probably have to rework that system at some point, but it is what we are working with right now.
Yeah. But just to be clear; I was concerned about these warnings:
I just created a scratch PR in our core repository to debug this further; see cda-tum/mqt-core#404. The call stack (https://github.com/cda-tum/mqt-core/actions/runs/5924226258/job/16061359774?pr=404#step:3:261) in the newly added test workflow actually shows that that branch is hit if Call Stack (most recent call first):
/opt/_internal/pipx/venvs/cmake/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/opt/_internal/pipx/venvs/cmake/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/FindPython/Support.cmake:3824 (find_package_handle_standard_args)
/opt/_internal/pipx/venvs/cmake/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/FindPython.cmake:574 (include)
extern/pybind11/tools/pybind11NewTools.cmake:35 (find_package)
extern/pybind11/tools/pybind11Common.cmake:183 (include)
extern/pybind11/CMakeLists.txt:210 (include) It's this |
Please run |
While that does fix the issue (see https://github.com/cda-tum/mqt-core/actions/runs/5924838270/job/16063131999?pr=404#step:3:255), this still seems like an issue in pybind to me. It should not be required to bypass the "modern" Python finder in pybind. Note that adding Edit: Just for reference, I opened pybind/pybind11#4802 |
Yes, it is partially a |
Totally agreed and thanks for the recommendations! That only leaves the core warnings surfaced in this PR unresolved *** scikit-build-core 0.4.8 using CMake 3.27.1 (wheel)
*** Configuring CMake...
2023-08-21 06:43:26,999 - scikit_build_core - WARNING - libdir/ldlibrary: /opt/_internal/cpython-3.8.17/lib/libpython3.8.a is not a real file!
2023-08-21 06:43:27,000 - scikit_build_core - WARNING - Can't find a Python library, got libdir=/opt/_internal/cpython-3.8.17/lib, ldlibrary=libpython3.8.a, multiarch=aarch64-linux-gnu, masd=None Those are independent of the above pybind11 issues. |
Those I'm afraid I'm not familiar with. It's on the container side of |
The warning about the libraries can be ignored. Manylinux doesn't contain the Python libraries, since you aren't supposed to link to them and it saves space to delete them. The problem is you are making them wrong call for FindPython. If you request the "Development" component, you get both find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
find_package(pybind11 CONFIG REQUIRED) Or you can use set(PYBIND11_FINDPYTHON ON)
find_package(pybind11 CONFIG REQUIRED) I'm planning on improving the library not found warning a bit. |
Actually the docs do include the correct way to refer to this in a callout with a warning about manylinux, and the reason the "wrong" version is shown is due to trying to support 3.15+ instead of 3.18+. IMO we should probably swap that. |
Thanks for the reply. I figured that the warning about the libraries isn't to important. |
Fixing that in pybind/pybind11#4805, thanks! I think most users either just use the default FindPythonInterp (bad), or call FindPython first (I hope). |
Scikit-build-core seems to have problems finding Python on manylinux containers since recently.
A simple example demonstrating the problem:
git clone https://github.com/pybind/scikit_build_example cd scikit_build_example pipx run cibuildwheel --platform linux
results in many warnings of the sort
These errors seem to have appeared when CMake 3.27 was released, although I am not 100% certain that's the issue here. Most likely something related to the newer FindPython becoming the default.
I am currently in the process of migrating some of the tools we develop from setuptools to scikit-build-core (see, e.g., cda-tum/mqt-qcec#301) and cibuildwheel on linux keeps failing on me. From the logs (https://github.com/cda-tum/mqt-qcec/actions/runs/5922551488/job/16056693817?pr=301#step:4:257), I can extract the following
which kind of points to pybind11 not being able to correctly detect Python. So maybe that's a separate issue.
Any help is appreciated!
The text was updated successfully, but these errors were encountered: