From: Rob Woolley <rob.woolley@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Cc: Rob Woolley <rob.woolley@windriver.com>
Subject: [PATCH 0/2] boost: Add Boost.Python NumPy
Date: Mon, 10 Aug 2026 10:35:49 -0700 [thread overview]
Message-ID: <20260810-fix-boost-v1-0-4e838b3d43b4@windriver.com> (raw)
The recipe for Boost does not support building Boost.Python NumPy.
There is a mistake in the variables supplied to test for numpy. A new
PACKAGECONFIG option is also provided to allow it to be optionally
enabled.
Below are the commit messages with additional debug information:
boost: Use python3-native executable
The Boost build system executes Python in the compile task to
import the Numpy module and print the include directory.
We must specify the python3-native executable in the user-config.jam
so that the python.jam can execute it properly.
Without this change, it specifies a non-existent python executable
and reports "No such file or directory" in log.do_compile.
```
$ grep -C4 "running" temp/log.do_compile
notice: [python-cfg] interpreter command: "/ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot/usr/bin/python3"
notice: [python-cfg] include path: "/ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot/usr/include/python3.14"
notice: [python-cfg] library path: "/ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot/usr/lib/python3.14"
notice: [python-cfg] Checking for NumPy...
notice: [python-cfg] running command '/ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot/usr/bin/python3 -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"'
sh: line 1: /ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot/usr/bin/python3: No such file or directory
notice: [python-cfg] NumPy disabled. Reason:
notice: [python-cfg] /ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot/usr/bin/python3 -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())" aborted with
notice: [python-cfg]
```
boost: Add support for Boost.Python NumPy extension
Support for NumPy was added to Boost release 1.63.
This additional numpy PACKAGECONFIG ensures that python3-numpy
is added as build-time and run-time dependencies.
With this support in place we may add a PACKAGECONFIG to enable numpy.
Shown here in conf/local.conf:
```
PACKAGECONFIG:append:pn-boost = " numpy"
```
$ grep python-cfg log.do_compile
notice: [python-cfg] Configuring python...
notice: [python-cfg] user-specified version: "3.14"
notice: [python-cfg] user-specified cmd-or-prefix: "/ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot-native/usr/bin/python3-native/python3"
notice: [python-cfg] user-specified includes: "/ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot/usr/include/python3.14"
notice: [python-cfg] user-specified libraries: "/ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot/usr/lib/python3.14"
notice: [python-cfg] Details of this Python configuration:
notice: [python-cfg] interpreter command: "/ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot-native/usr/bin/python3-native/python3"
notice: [python-cfg] include path: "/ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot/usr/include/python3.14"
notice: [python-cfg] library path: "/ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot/usr/lib/python3.14"
notice: [python-cfg] Checking for NumPy...
notice: [python-cfg] running command '/ala-lpggp31/rwoolley/boost-fix/bitbake-builds/poky-master-poky-with-sstate-distro_poky-machine_qemuarm64/build/tmp/work/cortexa57-poky-linux/boost/1.91.0/recipe-sysroot-native/usr/bin/python3-native/python3 -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"'
notice: [python-cfg] NumPy enabled
$ find image \( -name libboost_py* -o -name libboost_nu* \) | xargs ls -al
-
-rw-r--r-- 3 rwoolley users 3262 Aug 4 14:07 image/usr/lib/cmake/boost_numpy-1.91.0/libboost_numpy-variant-shared-py3.14.cmake
-rw-r--r-- 3 rwoolley users 3316 Aug 4 14:07 image/usr/lib/cmake/boost_numpy-1.91.0/libboost_numpy-variant-static-py3.14.cmake
-rw-r--r-- 3 rwoolley users 3280 Aug 4 14:07 image/usr/lib/cmake/boost_python-1.91.0/libboost_python-variant-shared-py3.14.cmake
-rw-r--r-- 3 rwoolley users 3334 Aug 4 14:07 image/usr/lib/cmake/boost_python-1.91.0/libboost_python-variant-static-py3.14.cmake
-rw-r--r-- 3 rwoolley users 1642060 Aug 4 14:05 image/usr/lib/libboost_numpy314.a
lrwxrwxrwx 1 rwoolley users 27 Aug 4 14:05 image/usr/lib/libboost_numpy314.so -> libboost_numpy314.so.1.91.0
-rwxr-xr-x 1 rwoolley users 702176 Aug 4 14:05 image/usr/lib/libboost_numpy314.so.1.91.0
-rw-r--r-- 3 rwoolley users 10658572 Aug 4 14:05 image/usr/lib/libboost_python314.a
lrwxrwxrwx 1 rwoolley users 28 Aug 4 14:05 image/usr/lib/libboost_python314.so -> libboost_python314.so.1.91.0
-rwxr-xr-x 1 rwoolley users 4727368 Aug 4 14:05 image/usr/lib/libboost_python314.so.1.91.0
The Python one-liner which imports numpy uses the python3-numpy-native module,
however the return value doesn't appear to be used. The supplied include path
pointing to the target sysroot seems to be used for compliation.
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
---
Rob Woolley (2):
boost: Use python3-native executable
boost: Add support for Boost.Python NumPy extension
meta/recipes-support/boost/boost.inc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
base-commit: 96872cac87349528fa0516fa2f6265adf0a15dd7
change-id: 20260806-fix-boost-fca31915ebc4
Best regards,
--
Rob Woolley <rob.woolley@windriver.com>
next reply other threads:[~2026-08-10 17:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 17:35 Rob Woolley [this message]
2026-08-10 17:35 ` [PATCH 1/2] boost: Use python3-native executable Rob Woolley
2026-08-10 17:46 ` Patchtest results for " patchtest
2026-08-10 18:16 ` Woolley, Rob
2026-08-10 20:24 ` [OE-core] " Richard Purdie
2026-08-11 9:56 ` [OE-core] " Alexander Kanavin
2026-08-10 17:35 ` [PATCH 2/2] boost: Add support for Boost.Python NumPy extension Rob Woolley
2026-08-11 9:49 ` [OE-core] " Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260810-fix-boost-v1-0-4e838b3d43b4@windriver.com \
--to=rob.woolley@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.