Skip to content
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

Failure to find python Interpreter and Development.Module running under yocto/oe #952

Open
sv662 opened this issue Nov 27, 2024 · 2 comments

Comments

@sv662
Copy link

sv662 commented Nov 27, 2024

I am attempting to use scikit-build-core 0.10.7 to build python3-pyzmq bindings at 26.2.0 in a yocto environment.
There was no existing recipe within meta-openembedded yet, so I have attempted to create my own.
It is starting to build, but there appears to be a failure in the execution of cmake where it cannot locate python.

CMake Error at /src/platform/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/recipe-sysroot-native/usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Python (missing: Interpreter Development.Module)

The environment for this recipe appears to be being setup correctly by bitbake. The local recipe native sysroot does have python3 in it and the PYTHON environment variables are being set to point at those locations, so I'm wondering what it is trying to look for that it is not finding. Python is this context is version 3.12.

The PYTHON env variable is set:
export PYTHON="/src/platform/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/recipe-sysroot-native/usr/bin/python3-native/python3"

... and that location does indeed have the python3 executable:
$ ls -l ./work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/recipe-sysroot-native/usr/bin/python3-native/python3*
lrwxrwxrwx 1 10 Nov 26 16:24 ./work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/recipe-sysroot-native/usr/bin/python3-native/python3 -> python3.12
-rwxr-xr-x 7 14360 Nov 20 15:59 ./work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/recipe-sysroot-native/usr/bin/python3-native/python3.12

I'm attaching the run.do_compile and log.do_compile files from the build so you can see the environment and calls into the build for context.

Any assistance you could give would be gratefully received.

Does scikit-build-core fully pass the environment through to cmake or is there some additional setup that needs to be done?
Would the following command line args to python when running the build within pyzmq have any adverse effect on scikit-build-core?
-m build --no-isolation --wheel --outdir

log.do_compile.txt
run.do_compile.txt

@henryiii
Copy link
Collaborator

I'll try to look at this soon, probably after Monday.

@LecrisUT
Copy link
Collaborator

The thing I'm worried about with openembeded is getting the cross-compilation right and there are no contamination of packages. With FindPython you have the additional complication that you need to make sure the python of the bitbake executor is not used because afaiu you want to pick up the python.h and library of the runtime system.

I tried to look into it, but the hardest part is setting up the initial docker environment with openembeded, and a test environment. Could you help share a dockerfile with a minimal setup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants