diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-01 06:59:02 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-05 17:22:11 +0100 |
| commit | 589fd4db179cefff097afef66abd5eb6a93754d7 (patch) | |
| tree | 7da43c19b1dacfb707e91e061b6e9bfe61fcd6a7 | |
| parent | 24efa3786c612a6c63ae31e18f74965187bce21f (diff) | |
| download | poky-589fd4db179cefff097afef66abd5eb6a93754d7.tar.gz | |
lttng-ust: upgrade 2.13.8 -> 2.13.9
(From OE-Core rev: 23de06c4e28929d540058071384aefa41d48b69a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-kernel/lttng/lttng-ust/0001-Fix-Build-examples-when-rpath-is-stripped-from-in-bu.patch | 161 | ||||
| -rw-r--r-- | meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch | 3 | ||||
| -rw-r--r-- | meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch | 3 | ||||
| -rw-r--r-- | meta/recipes-kernel/lttng/lttng-ust_2.13.9.bb (renamed from meta/recipes-kernel/lttng/lttng-ust_2.13.8.bb) | 3 |
4 files changed, 3 insertions, 167 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-ust/0001-Fix-Build-examples-when-rpath-is-stripped-from-in-bu.patch b/meta/recipes-kernel/lttng/lttng-ust/0001-Fix-Build-examples-when-rpath-is-stripped-from-in-bu.patch deleted file mode 100644 index 6da675fa31..0000000000 --- a/meta/recipes-kernel/lttng/lttng-ust/0001-Fix-Build-examples-when-rpath-is-stripped-from-in-bu.patch +++ /dev/null | |||
| @@ -1,161 +0,0 @@ | |||
| 1 | From 5d10459b6b5182fcbc98240d9dace026c87a5037 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Kienan Stewart <kstewart@efficios.com> | ||
| 3 | Date: Mon, 5 Aug 2024 15:41:34 -0400 | ||
| 4 | Subject: [PATCH] Fix: Build examples when rpath is stripped from in-build-tree | ||
| 5 | libs | ||
| 6 | |||
| 7 | Observed issue | ||
| 8 | ============== | ||
| 9 | |||
| 10 | Certain tool chains[1, 2] emit warnings or errors when building the | ||
| 11 | example applications. | ||
| 12 | |||
| 13 | ``` | ||
| 14 | make[3]: Entering directory | ||
| 15 | '/home/xxx/src/efficios/lttng/master/src/lttng-ust/doc/examples/easy-ust' | ||
| 16 | CC sample.o | ||
| 17 | CC tp.o | ||
| 18 | CCLD sample | ||
| 19 | |||
| 20 | /usr/bin/ld: warning: liblttng-ust-common.so.1, needed by ../../../src/lib/lttng-ust/.libs/liblttng-ust.so, not found (try using -rpath or -rpath-link) | ||
| 21 | /usr/bin/ld: warning: liblttng-ust-tracepoint.so.1, needed by ../../../src/lib/lttng-ust/.libs/liblttng-ust.so, not found (try using -rpath or -rpath-link) | ||
| 22 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_add_fd_to_tracker' | ||
| 23 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_urcu_after_fork_child' | ||
| 24 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_common_ctor' | ||
| 25 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_tp_init' | ||
| 26 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_tp_probe_register_queue_release' | ||
| 27 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_cancelstate_disable_pop' | ||
| 28 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_urcu_synchronize_rcu' | ||
| 29 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_urcu_register_thread' | ||
| 30 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_tp_probe_prune_release_queue' | ||
| 31 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_cancelstate_disable_push' | ||
| 32 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_urcu_before_fork' | ||
| 33 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_lock_fd_tracker' | ||
| 34 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_trace_clock' | ||
| 35 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_urcu_has_sys_membarrier' | ||
| 36 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_unlock_fd_tracker' | ||
| 37 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_tp_exit' | ||
| 38 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_get_cpu_sym' | ||
| 39 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_common_alloc_tls' | ||
| 40 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_urcu_after_fork_parent' | ||
| 41 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_delete_fd_from_tracker' | ||
| 42 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_urcu_register' | ||
| 43 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_urcu_reader' | ||
| 44 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_urcu_gp' | ||
| 45 | /usr/bin/ld: ../../../src/lib/lttng-ust/.libs/liblttng-ust.so: undefined reference to `lttng_ust_tp_probe_unregister_queue_release' | ||
| 46 | collect2: error: ld returned 1 exit status | ||
| 47 | ``` | ||
| 48 | |||
| 49 | === Reproducer === | ||
| 50 | |||
| 51 | The easiest way to consistently reproduce this type of build failure | ||
| 52 | is to perform the following steps: | ||
| 53 | |||
| 54 | ``` | ||
| 55 | ./configure | ||
| 56 | make -j$(nproc) | ||
| 57 | find . -iname '*.so' -exec chrpath -d {} \; | ||
| 58 | make -C doc/examples clean | ||
| 59 | make -j$(nproc) | ||
| 60 | ``` | ||
| 61 | |||
| 62 | As the examples are not built with libtool, finding the libraries to | ||
| 63 | link against depends on the shared objects having an rpath. | ||
| 64 | |||
| 65 | E.g. | ||
| 66 | |||
| 67 | ``` | ||
| 68 | $ chrpath src/lib/lttng-ust/.libs/liblttng-ust.so.1.0.0 | ||
| 69 | src/lib/lttng-ust/.libs/liblttng-ust.so.1.0.0: RUNPATH=/home/xxx/src/efficios/lttng/master/src/lttng-ust/src/lib/lttng-ust-common/.libs:/home/xxx/src/efficios/lttng/master/src/lttng-ust/src/lib/lttng-ust-tracepoint/.libs:/home/xxx/src/efficios/lttng/master/usr/lib | ||
| 70 | ``` | ||
| 71 | |||
| 72 | The current examples build with `-Wl,-rpath` for `liblttng-ust`, but | ||
| 73 | not the dependencies of `liblttng-ust` (which would normally be found | ||
| 74 | via it's own rpath). If the `rpath` is stripped from | ||
| 75 | `liblttng-ust.so`, or if the tool chain ignores `rpath` explicitly, | ||
| 76 | then the build with fail. | ||
| 77 | |||
| 78 | In the case of a yocto build environment as in GitHub#61[1], the | ||
| 79 | following commands reproduced the warnings and the errors seen in the | ||
| 80 | above test case. | ||
| 81 | |||
| 82 | ``` | ||
| 83 | git clone git://git.yoctoproject.org/poky && cd poky/ | ||
| 84 | . oe-init-build-env | ||
| 85 | echo "PACKAGECONFIG:pn-lttng-ust = 'examples'" >>conf/local.conf | ||
| 86 | bitbake lttng-ust | ||
| 87 | ``` | ||
| 88 | |||
| 89 | === Solution === | ||
| 90 | |||
| 91 | Explicitly add library search paths and set linker rpath-link are set | ||
| 92 | for both the standard and cmake examples. Similar changes were | ||
| 93 | proposed for each of those parts respectively in GitHub#61[1] and GitHub#63[2]. | ||
| 94 | |||
| 95 | === Known issues === | ||
| 96 | |||
| 97 | While the `rpath-link` for the second order library dependencies will | ||
| 98 | allow the builds to complete, the examples will not work at | ||
| 99 | runtime even when using `rpath`. From `man ld.so`, the rpaths in an | ||
| 100 | executable or shared object are only considered for direct | ||
| 101 | dependencies. Therefore, without setting `LD_LIBRARY_PATH` or | ||
| 102 | installing the libraries test applications will fail as follows: | ||
| 103 | |||
| 104 | ``` | ||
| 105 | $ ./doc/examples/easy-ust/sample | ||
| 106 | ./doc/examples/easy-ust/sample: error while loading shared libraries: liblttng-ust-common.so.1: cannot open shared object file: No such file or directory | ||
| 107 | ``` | ||
| 108 | |||
| 109 | References | ||
| 110 | ========== | ||
| 111 | |||
| 112 | [1]: https://github.com/lttng/lttng-ust/pull/61 | ||
| 113 | [2]: https://github.com/lttng/lttng-ust/pull/63 | ||
| 114 | |||
| 115 | Change-Id: I273ccddd0d0b7a1b57b9e09ddf48d8b5b41e6f8e | ||
| 116 | Signed-off-by: Kienan Stewart <kstewart@efficios.com> | ||
| 117 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
| 118 | |||
| 119 | Upstream-Status: Backport [https://github.com/lttng/lttng-ust/commit/5d10459b6b5182fcbc98240d9dace026c87a5037] | ||
| 120 | Signed-off-by: Bin Lan <bin.lan.cn@windriver.com> | ||
| 121 | |||
| 122 | --- | ||
| 123 | doc/examples/Makefile.am | 13 ++++++++++--- | ||
| 124 | 1 file changed, 10 insertions(+), 3 deletions(-) | ||
| 125 | |||
| 126 | diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am | ||
| 127 | index aebf63bd..79766ec0 100644 | ||
| 128 | --- a/doc/examples/Makefile.am | ||
| 129 | +++ b/doc/examples/Makefile.am | ||
| 130 | @@ -169,7 +169,10 @@ all-local: | ||
| 131 | CFLAGS='$(CFLAGS)' \ | ||
| 132 | AM_CFLAGS='$(AM_CFLAGS)' \ | ||
| 133 | LDFLAGS="$(LDFLAGS)" \ | ||
| 134 | - AM_LDFLAGS='$(AM_LDFLAGS) -L../../../src/lib/lttng-ust/.libs -Wl,-rpath="$(PWD)/../../src/lib/lttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../src/lib/lttng-ust/.libs/"' \ | ||
| 135 | + AM_LDFLAGS='$(AM_LDFLAGS) -L../../../src/lib/lttng-ust/.libs -L../../../src/lib/lttng-ust-common/.libs -L../../../src/lib/lttng-ust-tracepoint/.libs \ | ||
| 136 | + -Wl,-rpath="$(abs_top_builddir)/src/lib/lttng-ust/.libs/" \ | ||
| 137 | + -Wl,-rpath-link="$(abs_top_builddir)/src/lib/lttng-ust-common/.libs/" \ | ||
| 138 | + -Wl,-rpath-link="$(abs_top_builddir)/src/lib/lttng-ust-tracepoint/.libs/"' \ | ||
| 139 | LTTNG_GEN_TP_PATH="$$rel_src_subdir$(top_srcdir)/tools/" \ | ||
| 140 | AM_V_P="$(AM_V_P)" \ | ||
| 141 | AM_V_at="$(AM_V_at)" \ | ||
| 142 | @@ -222,10 +225,14 @@ all-local: | ||
| 143 | CXX="$(CXX)" \ | ||
| 144 | $(CMAKE) \ | ||
| 145 | -DCMAKE_INCLUDE_PATH="$(abs_top_srcdir)/include;$(abs_top_builddir)/include" \ | ||
| 146 | - -DCMAKE_LIBRARY_PATH="$(abs_top_builddir)/src/lib/lttng-ust/.libs" \ | ||
| 147 | + -DCMAKE_LIBRARY_PATH="$(abs_top_builddir)/src/lib/lttng-ust/.libs;$(abs_top_builddir)/src/lib/lttng-ust-common/.libs;$(abs_top_builddir)/src/lib/lttng-ust-tracepoint/.libs" \ | ||
| 148 | -DCMAKE_C_FLAGS="$(AM_CFLAGS) $(CPPFLAGS) $(CFLAGS)" \ | ||
| 149 | -DCMAKE_CXX_FLAGS="$(AM_CXXFLAGS) $(CXXFLAGS) $(CPPFLAGS)" \ | ||
| 150 | - -DCMAKE_EXE_LINKER_FLAGS="$(AM_LDFLAGS) $(LDFLAGS)" \ | ||
| 151 | + -DCMAKE_EXE_LINKER_FLAGS="$(AM_LDFLAGS) $(LDFLAGS) \ | ||
| 152 | + -L../../../src/lib/lttng-ust/.libs -L../../../src/lib/lttng-ust-common/.libs -L../../../src/lib/lttng-ust-tracepoint/.libs \ | ||
| 153 | + -Wl,-rpath=$(abs_top_builddir)/src/lib/lttng-ust/.libs/ \ | ||
| 154 | + -Wl,-rpath-link=$(abs_top_builddir)/src/lib/lttng-ust-common/.libs/ \ | ||
| 155 | + -Wl,-rpath-link=$(abs_top_builddir)/src/lib/lttng-ust-tracepoint/.libs/" \ | ||
| 156 | .. && \ | ||
| 157 | $(MAKE) \ | ||
| 158 | ) || exit 1; \ | ||
| 159 | -- | ||
| 160 | 2.43.0 | ||
| 161 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch b/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch index e85dbdb439..ceb240680b 100644 --- a/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch +++ b/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 27402453f25fbdb5a9fb1a1b88d1c4d9852187d2 Mon Sep 17 00:00:00 2001 | 1 | From 1b6bbf14de8fdfe60e446c93969e29bc2cf5f2dc Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex@linutronix.de> | 2 | From: Alexander Kanavin <alex@linutronix.de> |
| 3 | Date: Sun, 5 Sep 2021 10:44:19 +0200 | 3 | Date: Sun, 5 Sep 2021 10:44:19 +0200 |
| 4 | Subject: [PATCH] lttng-ust-common: link with liburcu explicitly | 4 | Subject: [PATCH] lttng-ust-common: link with liburcu explicitly |
| @@ -7,7 +7,6 @@ Otherwise linking errors are seen on x86-32. | |||
| 7 | 7 | ||
| 8 | Upstream-Status: Submitted [by email to lttng-dev, Francis, Jonathan] | 8 | Upstream-Status: Submitted [by email to lttng-dev, Francis, Jonathan] |
| 9 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | 9 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> |
| 10 | |||
| 11 | --- | 10 | --- |
| 12 | src/lib/lttng-ust-common/Makefile.am | 1 + | 11 | src/lib/lttng-ust-common/Makefile.am | 1 + |
| 13 | 1 file changed, 1 insertion(+) | 12 | 1 file changed, 1 insertion(+) |
diff --git a/meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch b/meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch index 7c49583e0d..7bbe5c216e 100644 --- a/meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch +++ b/meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From f65efd963e52de51d35e2e03fb773f33dd64f565 Mon Sep 17 00:00:00 2001 | 1 | From 30660997d220602202d8dc7264e49095a1581947 Mon Sep 17 00:00:00 2001 |
| 2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | 2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 3 | Date: Tue, 20 Feb 2024 12:19:06 +0000 | 3 | Date: Tue, 20 Feb 2024 12:19:06 +0000 |
| 4 | Subject: [PATCH] python-lttngust/Makefile.am: Add --install-lib to setup.py | 4 | Subject: [PATCH] python-lttngust/Makefile.am: Add --install-lib to setup.py |
| @@ -9,7 +9,6 @@ building. | |||
| 9 | Upstream-Status: Submitted [https://github.com/lttng/lttng-ust/pull/59] | 9 | Upstream-Status: Submitted [https://github.com/lttng/lttng-ust/pull/59] |
| 10 | 10 | ||
| 11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | 11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
| 12 | |||
| 13 | --- | 12 | --- |
| 14 | src/python-lttngust/Makefile.am | 2 +- | 13 | src/python-lttngust/Makefile.am | 2 +- |
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.13.8.bb b/meta/recipes-kernel/lttng/lttng-ust_2.13.9.bb index bf2524bdc0..dd7657e0cc 100644 --- a/meta/recipes-kernel/lttng/lttng-ust_2.13.8.bb +++ b/meta/recipes-kernel/lttng/lttng-ust_2.13.9.bb | |||
| @@ -31,10 +31,9 @@ PE = "2" | |||
| 31 | SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \ | 31 | SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \ |
| 32 | file://0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch \ | 32 | file://0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch \ |
| 33 | file://0001-lttng-ust-common-link-with-liburcu-explicitly.patch \ | 33 | file://0001-lttng-ust-common-link-with-liburcu-explicitly.patch \ |
| 34 | file://0001-Fix-Build-examples-when-rpath-is-stripped-from-in-bu.patch \ | ||
| 35 | " | 34 | " |
| 36 | 35 | ||
| 37 | SRC_URI[sha256sum] = "d4ef98dab9a37ad4f524ccafdfd50af4f266039b528dd5afabce78e49024d937" | 36 | SRC_URI[sha256sum] = "2ad6d69a54a1d924c18a4aa7a233db104e3cc332bcdd240e196bf7adbed3f712" |
| 38 | 37 | ||
| 39 | CVE_PRODUCT = "ust" | 38 | CVE_PRODUCT = "ust" |
| 40 | 39 | ||
