summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-05-01 06:59:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-05-05 17:22:11 +0100
commit589fd4db179cefff097afef66abd5eb6a93754d7 (patch)
tree7da43c19b1dacfb707e91e061b6e9bfe61fcd6a7
parent24efa3786c612a6c63ae31e18f74965187bce21f (diff)
downloadpoky-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.patch161
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch3
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch3
-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 @@
1From 5d10459b6b5182fcbc98240d9dace026c87a5037 Mon Sep 17 00:00:00 2001
2From: Kienan Stewart <kstewart@efficios.com>
3Date: Mon, 5 Aug 2024 15:41:34 -0400
4Subject: [PATCH] Fix: Build examples when rpath is stripped from in-build-tree
5 libs
6
7Observed issue
8==============
9
10Certain tool chains[1, 2] emit warnings or errors when building the
11example applications.
12
13```
14make[3]: Entering directory
15'/home/xxx/src/efficios/lttng/master/src/lttng-ust/doc/examples/easy-ust'
16CC sample.o
17CC tp.o
18CCLD 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'
46collect2: error: ld returned 1 exit status
47```
48
49=== Reproducer ===
50
51The easiest way to consistently reproduce this type of build failure
52is to perform the following steps:
53
54```
55./configure
56make -j$(nproc)
57find . -iname '*.so' -exec chrpath -d {} \;
58make -C doc/examples clean
59make -j$(nproc)
60```
61
62As the examples are not built with libtool, finding the libraries to
63link against depends on the shared objects having an rpath.
64
65E.g.
66
67```
68$ chrpath src/lib/lttng-ust/.libs/liblttng-ust.so.1.0.0
69src/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
72The current examples build with `-Wl,-rpath` for `liblttng-ust`, but
73not the dependencies of `liblttng-ust` (which would normally be found
74via it's own rpath). If the `rpath` is stripped from
75`liblttng-ust.so`, or if the tool chain ignores `rpath` explicitly,
76then the build with fail.
77
78In the case of a yocto build environment as in GitHub#61[1], the
79following commands reproduced the warnings and the errors seen in the
80above test case.
81
82```
83git clone git://git.yoctoproject.org/poky && cd poky/
84. oe-init-build-env
85echo "PACKAGECONFIG:pn-lttng-ust = 'examples'" >>conf/local.conf
86bitbake lttng-ust
87```
88
89=== Solution ===
90
91Explicitly add library search paths and set linker rpath-link are set
92for both the standard and cmake examples. Similar changes were
93proposed for each of those parts respectively in GitHub#61[1] and GitHub#63[2].
94
95=== Known issues ===
96
97While the `rpath-link` for the second order library dependencies will
98allow the builds to complete, the examples will not work at
99runtime even when using `rpath`. From `man ld.so`, the rpaths in an
100executable or shared object are only considered for direct
101dependencies. Therefore, without setting `LD_LIBRARY_PATH` or
102installing 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
109References
110==========
111
112[1]: https://github.com/lttng/lttng-ust/pull/61
113[2]: https://github.com/lttng/lttng-ust/pull/63
114
115Change-Id: I273ccddd0d0b7a1b57b9e09ddf48d8b5b41e6f8e
116Signed-off-by: Kienan Stewart <kstewart@efficios.com>
117Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
118
119Upstream-Status: Backport [https://github.com/lttng/lttng-ust/commit/5d10459b6b5182fcbc98240d9dace026c87a5037]
120Signed-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
126diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
127index 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--
1602.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 @@
1From 27402453f25fbdb5a9fb1a1b88d1c4d9852187d2 Mon Sep 17 00:00:00 2001 1From 1b6bbf14de8fdfe60e446c93969e29bc2cf5f2dc Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de> 2From: Alexander Kanavin <alex@linutronix.de>
3Date: Sun, 5 Sep 2021 10:44:19 +0200 3Date: Sun, 5 Sep 2021 10:44:19 +0200
4Subject: [PATCH] lttng-ust-common: link with liburcu explicitly 4Subject: [PATCH] lttng-ust-common: link with liburcu explicitly
@@ -7,7 +7,6 @@ Otherwise linking errors are seen on x86-32.
7 7
8Upstream-Status: Submitted [by email to lttng-dev, Francis, Jonathan] 8Upstream-Status: Submitted [by email to lttng-dev, Francis, Jonathan]
9Signed-off-by: Alexander Kanavin <alex@linutronix.de> 9Signed-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 @@
1From f65efd963e52de51d35e2e03fb773f33dd64f565 Mon Sep 17 00:00:00 2001 1From 30660997d220602202d8dc7264e49095a1581947 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org> 2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Tue, 20 Feb 2024 12:19:06 +0000 3Date: Tue, 20 Feb 2024 12:19:06 +0000
4Subject: [PATCH] python-lttngust/Makefile.am: Add --install-lib to setup.py 4Subject: [PATCH] python-lttngust/Makefile.am: Add --install-lib to setup.py
@@ -9,7 +9,6 @@ building.
9Upstream-Status: Submitted [https://github.com/lttng/lttng-ust/pull/59] 9Upstream-Status: Submitted [https://github.com/lttng/lttng-ust/pull/59]
10 10
11Signed-off-by: Robert Yang <liezhi.yang@windriver.com> 11Signed-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"
31SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \ 31SRC_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
37SRC_URI[sha256sum] = "d4ef98dab9a37ad4f524ccafdfd50af4f266039b528dd5afabce78e49024d937" 36SRC_URI[sha256sum] = "2ad6d69a54a1d924c18a4aa7a233db104e3cc332bcdd240e196bf7adbed3f712"
38 37
39CVE_PRODUCT = "ust" 38CVE_PRODUCT = "ust"
40 39