Skip to contentSkip to conversation

Issue with scikit-build-core finding python interpreter

meta-python [email protected] 1 participant 1 message Nov 27, 2024

lore
Share & tools
lore
#0 lore raw

Hi,
I'm attempting to write a recipe set against the scarthgap release to build the latest version of pyzmq. This now uses the scikit-build-core instead of scikit-build. I'm attempting to use the following versions:
yocto: scarthgap
pyzmq: 26.2.0
scikit-build-core: 0.10.7

During do_compile() scikit-build-core appears to be executing cmake but cmake is unable to locate the python interpreter producing this error:

Quoted 7 lines

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)

As far as I can tell the python environment is being populated into the recipe's native sysroot and the PYTHON environment variable is set up correctly. So I'm wondering if I am doing something wrong in the recipes or if there is an issue in scikit-build-core. These are the only recipes I am having an issue with. Without these the overall image build goes through fine and I have a useable system with plenty of the python modules installed and working, including the previous versions of pyzmq and scikit-build, from which the following recipes were based.

I'm in-lining the recipes as I have them today. Note that there maybe some unnecessary debugging extras in these right now.

Thanks in advance for any help you could give me!

recipes-devtools/python/python3-pyzmq_26.2.0.bb

Quoted 31 lines

SUMMARY = "Python bindings for 0MQ"
HOMEPAGE = "None"
AUTHOR = "Brian E. Granger, Min Ragan-Kelley <PyZMQ Contributors
<[email protected]>>"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM =
"file://LICENSE.md;md5=1787206f198344195a671b60326c59dc"
SRC_URI = "https://files.pythonhosted.org/packages/fd/05/bed626b9f7bb2322cdbbf7b4bd8f54b1b617b0d2ab2d3547d6e39428a48e/pyzmq-26.2.0.tar.gz"

SRC_URI[md5sum] = "5beb3ba3df4ee3651dd06661623dabb9" SRC_URI[sha256sum] = "070672c258581c8e4f640b5159297580a9974b026043bd4ab0470be9ed324f1f" S = "${WORKDIR}/pyzmq-26.2.0"
inherit cmake pypi pkgconfig python_setuptools_build_meta DEPENDS = "python3-packaging-native python3-cython-native python3-setuptools-scm-native python3-scikit-build-core-native zeromq" RDEPENDS:${PN} += "\
python3-json \
python3-multiprocessing \
python3-tornado \
"
EXTRA_OECMAKE += "\
--debug-find \

(quoted diff) +0 -2
-DCMAKE_MODULE_PATH=${STAGING_LIBDIR}/cmake \
-DCMAKE_PREFIX_PATH=${STAGING_LIBDIR} \

"
do_compile:prepend() {
export

Quoted 9 lines

export CMAKE_EXECUTABLE="${STAGING_BINDIR_NATIVE}/cmake" echo [global] > ${S}/setup.cfg
echo zmq_prefix = ${STAGING_DIR_HOST} >> ${S}/setup.cfg echo have_sys_un_h = True >> ${S}/setup.cfg echo skip_check_zmq = True >> ${S}/setup.cfg echo libzmq_extension = False >> ${S}/setup.cfg echo no_libzmq_extension = True >> ${S}/setup.cfg }

recipes-devtools/python/python3-scikit-build-core_0.10.7.bb

Quoted 31 lines

SUMMARY = "Build backend for Python that uses CMake to build extension modules"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b4e748e5f102e31c9390dcd6fa66f09"

DEPENDS = "python3-hatch-vcs-native
python3-hatch-fancy-pypi-readme-native"

SRC_URI[sha256sum] = "04cbb59fe795202a7eeede1849112ee9dcbf3469feebd9b8b36aa541336ac4f8"

inherit pypi python_hatchling

OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH"

PYPI_PACKAGE = "scikit_build_core"

S = "${WORKDIR}/scikit_build_core-${PV}"

RDEPENDS:${PN} = " \
python3-dev \
python3-distro \
python3-packaging \
python3-setuptools \
python3-typing-extensions \
python3-wheel \
python3-modules \
cmake \
"

Quoted 4 lines

BBCLASSEXTEND = "native nativesdk"

This is the log for python-pyzmq's do_compile()

Quoted 62 lines

* Getting build dependencies for wheel...
WARNING: Use build.targets instead of cmake.targets for scikit-build-core

Quoted 1 line

= 0.10

* Building wheel...
WARNING: Use build.targets instead of cmake.targets for scikit-build-core

Quoted 1 line

= 0.10

*** scikit-build-core 0.10.7 using CMake 3.28.3 (wheel)
*** Configuring CMake...
loading initial cache file /tmp/tmpwaaodqce/build/CMakeInit.txt
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler:
/src/platform/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/recipe-sysroot-native/usr/bin/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi-gcc
- skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler:
/src/platform/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/recipe-sysroot-native/usr/bin/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi-g++
- skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
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)
Call Stack (most recent call first):
/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:600 (_FPHSA_FAILURE_MESSAGE) /src/platform/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/recipe-sysroot-native/usr/share/cmake-3.28/Modules/FindPython.cmake:616 (find_package_handle_standard_args)
CMakeLists.txt:6 (find_package)

-- Configuring incomplete, errors occurred!

*** CMake configuration failed

ERROR Backend subprocess exited when trying to invoke build_wheel
WARNING:
/src/platform/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/temp/run.do_compile.6987:164 exit 1 from 'nativepython3 -m build --no-isolation --wheel --outdir /src/platform/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/dist /src/platform/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/pyzmq-26.2.0'

WARNING: Backtrace (BB generated script):
#1: python_pep517_do_compile, /src/platform/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/temp/run.do_compile.6987, line 164
#2: do_compile, /src/platform/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/temp/run.do_compile.6987, line 159
#3: main, /src/platform/build/tmp/work/cortexa9t2hf-neon-xilinx-linux-gnueabi/python3-pyzmq/26.2.0/temp/run.do_compile.6987, line 175