diff mbox series

[v3,2/4] babeltrace2: Enable python plugins

Message ID 20250724092814.4183226-2-mingli.yu@eng.windriver.com
State New
Headers show
Series [v3,1/4] lttng-ust: Upgrade 2.13.9 -> 2.14.0 | expand

Commit Message

mingli.yu@eng.windriver.com July 24, 2025, 9:28 a.m. UTC
From: Mingli Yu <mingli.yu@windriver.com>

* The lttng-tools test fails as below as it needs bt2 module.
ERROR: ust/high-throughput/test_high_throughput_snapshot.py
===========================================================

Traceback (most recent call last):
  File "/usr/lib/lttng-tools/ptest/tests/regression/./ust/high-throughput/test_high_throughput_snapshot.py", line 26, in <module>
    import bt2
ModuleNotFoundError: No module named 'bt2'

Enable python plugins for babeltrace2 to provide the above support.

* Add swig-native to DEPENDS to fix the below configure error.
 | configure: error: SWIG 2.0.0 or newer is required to build the python bindings

* There are some ptest failed cases after enable python plugins and
track the failed ptest as https://bugs.lttng.org/issues/1430.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Mathieu Dubois-Briand July 24, 2025, 11:29 a.m. UTC | #1
On Thu Jul 24, 2025 at 11:28 AM CEST, Mingli via lists.openembedded.org Yu wrote:
> From: Mingli Yu <mingli.yu@windriver.com>
>
> * The lttng-tools test fails as below as it needs bt2 module.
> ERROR: ust/high-throughput/test_high_throughput_snapshot.py
> ===========================================================
>
> Traceback (most recent call last):
>   File "/usr/lib/lttng-tools/ptest/tests/regression/./ust/high-throughput/test_high_throughput_snapshot.py", line 26, in <module>
>     import bt2
> ModuleNotFoundError: No module named 'bt2'
>
> Enable python plugins for babeltrace2 to provide the above support.
>
> * Add swig-native to DEPENDS to fix the below configure error.
>  | configure: error: SWIG 2.0.0 or newer is required to build the python bindings
>
> * There are some ptest failed cases after enable python plugins and
> track the failed ptest as https://bugs.lttng.org/issues/1430.
>
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> ---

Hi Mingli,

I know you are working on the issue, just to confirm we still get the
same ptest failures:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/1968
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/1952

Best regards,
Mathieu
Mathieu Dubois-Briand July 24, 2025, 11:31 a.m. UTC | #2
On Thu Jul 24, 2025 at 11:28 AM CEST, Mingli via lists.openembedded.org Yu wrote:
> From: Mingli Yu <mingli.yu@windriver.com>
>
> * The lttng-tools test fails as below as it needs bt2 module.
> ERROR: ust/high-throughput/test_high_throughput_snapshot.py
> ===========================================================
>
> Traceback (most recent call last):
>   File "/usr/lib/lttng-tools/ptest/tests/regression/./ust/high-throughput/test_high_throughput_snapshot.py", line 26, in <module>
>     import bt2
> ModuleNotFoundError: No module named 'bt2'
>
> Enable python plugins for babeltrace2 to provide the above support.
>
> * Add swig-native to DEPENDS to fix the below configure error.
>  | configure: error: SWIG 2.0.0 or newer is required to build the python bindings
>
> * There are some ptest failed cases after enable python plugins and
> track the failed ptest as https://bugs.lttng.org/issues/1430.
>
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> ---

Sorry, forgot some errors: we also have packaging issues at build time:

ERROR: babeltrace2-2.1.1-r0 do_package: QA Issue: babeltrace2: Files/directories were installed but not shipped in any package:
  /usr/lib/python3.13/site-packages/bt2-2.1.1-py3.13.egg-info
  /usr/lib/python3.13/site-packages/bt2/stream.py
  /usr/lib/python3.13/site-packages/bt2/field_location.py
  /usr/lib/python3.13/site-packages/bt2/graph.py
  /usr/lib/python3.13/site-packages/bt2/py_plugin.py
  /usr/lib/python3.13/site-packages/bt2/clock_class.py
  /usr/lib/python3.13/site-packages/bt2/event.py
  /usr/lib/python3.13/site-packages/bt2/message.py
  /usr/lib/python3.13/site-packages/bt2/local_typing.py
  ...

https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/2088
https://autobuilder.yoctoproject.org/valkyrie/#/builders/92/builds/2089
diff mbox series

Patch

diff --git a/meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb b/meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb
index 8bab7f677a..88f589eafb 100644
--- a/meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb
+++ b/meta/recipes-kernel/lttng/babeltrace2_2.1.1.bb
@@ -5,7 +5,7 @@  BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
 LICENSE = "MIT & GPL-2.0-only & LGPL-2.1-only & BSD-2-Clause & BSD-4-Clause & GPL-3.0-or-later & CC-BY-SA-4.0 & PSF-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=f6b015e4f388d6e78adb1b1f9a887d06"
 
-DEPENDS = "glib-2.0 util-linux popt bison-native flex-native virtual/libiconv"
+DEPENDS = "glib-2.0 util-linux popt bison-native flex-native virtual/libiconv swig-native"
 
 SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-2.1;protocol=https;tag=v${PV} \
            file://run-ptest \
@@ -19,13 +19,13 @@  UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$"
 
 inherit autotools pkgconfig ptest python3targetconfig
 
-EXTRA_OECONF = "--disable-debug-info --disable-Werror"
+EXTRA_OECONF = "--disable-debug-info --disable-Werror --enable-python-plugins --enable-python-bindings"
 
 PACKAGECONFIG ??= "manpages"
 PACKAGECONFIG[manpages] = ", --disable-man-pages, asciidoc-native xmlto-native"
 
 FILES:${PN}-staticdev += "${libdir}/babeltrace2/plugins/*.a"
-FILES:${PN} += "${libdir}/babeltrace2/plugins/*.so"
+FILES:${PN} += "${libdir}/babeltrace2/plugins/*.so ${PYTHON_SITEPACKAGES_DIR}/*"
 
 ASNEEDED = ""
 LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld ptest', '-fuse-ld=bfd ', '', d)}"