[Buildroot] [git commit branch/2023.02.x] package/gnuradio: fix build with python-pybind > 2.10.0

Peter Korsgaard peter at korsgaard.com
Mon Jul 17 12:03:11 UTC 2023


commit: https://git.buildroot.net/buildroot/commit/?id=cd4e89f76d25749cd654cb115e5112ba0878a19d
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2023.02.x

Since commit 0e82c360942907f5a2f379e64e0d211aaff80774 (and since release
2.10.1), a new variable called PYBIND11_PYTHONLIBS_OVERWRITE was introduced
and set to ON by default.

According to comment before this option:
"Overwrite cached values read from Python library (classic search). Turn off if
cross-compiling and manually setting these values."

In buildroot's context this option must be disabled to keep variables
provided by buildroot and lib/app.

Fixes:
- http://autobuild.buildroot.net/results/7423df5db5237d94bb49e32698828d4fe470e39b/

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou at trabucayre.com>
Signed-off-by: Arnout Vandecappelle <arnout at mind.be>
(cherry picked from commit 11aa7ac8fa3a21dc2476dd09539ea3cf3e48f03d)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/gnuradio/gnuradio.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk
index d9218b533d..1453b78493 100644
--- a/package/gnuradio/gnuradio.mk
+++ b/package/gnuradio/gnuradio.mk
@@ -116,6 +116,9 @@ ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y)
 GNURADIO_DEPENDENCIES += python3 python-pybind \
 	host-python-numpy host-python-packaging
 GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON
+# mandatory to avoid pybind11 to overwrite variables provided
+# by gnuradio and buildroot
+GNURADIO_CONF_OPTS += -DPYBIND11_PYTHONLIBS_OVERWRITE=OFF
 # mandatory to install python modules in site-packages and to use
 # correct path for python libraries
 GNURADIO_CONF_OPTS += -DGR_PYTHON_RELATIVE=ON \



More information about the buildroot mailing list