Skip to contentSkip to conversation

lttng-ust-common: link with liburcu explicitly

PATCH In review Alexander Kanavin via lttng-dev 1 participant 3 messages Dec 2, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lttng-ust-common: link with liburcu explicitly

Otherwise linking errors are seen on x86-32.

---
 src/lib/lttng-ust-common/Makefile.am | 1 +
 1 file changed, 1 insertion(+)
src/lib/lttng-ust-common/Makefile.am +1 -0
index caeea2be..0130628c 100644
@@ -15,6 +15,7 @@ liblttng_ust_common_la_SOURCES = \
 
 liblttng_ust_common_la_LIBADD = \
 	$(top_builddir)/src/common/libcommon.la \
+	$(URCU_LIBS) \
 	$(DL_LIBS)
 
 liblttng_ust_common_la_LDFLAGS = -no-undefined -version-info $(LTTNG_UST_LIBRARY_VERSION)
Signature · 6 lines
2.20.1

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
#1 lore raw

Hi Alexander,

Thanks for sending this patch. Could you provide more details regarding the linking errors?

lttng-ust must not depends on liburcu at runtime since commit 10544ee8af31afb239e3dfa71cb2fe09d3de3771

commit 10544ee8af31afb239e3dfa71cb2fe09d3de3771

Author: Mathieu Desnoyers <[email protected]>
Date:   Wed Nov 11 17:28:06 2020 -0500

Remove runtime dependency on liburcu shared objects

Remove the runtime dependency on:

- liblurcu-bp.so
- liblurcu-cds.so
- compat futex code.

By integrating those into the lttng-ust project.

For rculfhash, only the minimum pieces needed by lttng-ust are integrated (no auto-resize, no accounting).

lttng-ust still requires liburcu at build time for header dependencies.

Change-Id Idffb205b27b1bb0f972523c3ce3bdaf25bfe1710

Cheers

----- Original Message -----

Quoted 24 lines

From: "Alexander Kanavin" <[email protected]>
To: "lttng-dev" <[email protected]>, "Francis Deslauriers" <[email protected]>, "jonathan rajotte-julien" <[email protected]>
Cc: "Alexander Kanavin" <[email protected]>
Sent: Thursday, December 2, 2021 3:04:12 PM
Subject: [PATCH] lttng-ust-common: link with liburcu explicitly

Otherwise linking errors are seen on x86-32.
---
src/lib/lttng-ust-common/Makefile.am | 1 +

1 file changed, 1 insertion(+)
src/lib/lttng-ust-common/Makefile.am +1 -0
index caeea2be..0130628c 100644
@@ -15,6 +15,7 @@ liblttng_ust_common_la_SOURCES = \
 
 liblttng_ust_common_la_LIBADD = \
 	$(top_builddir)/src/common/libcommon.la \
+	$(URCU_LIBS) \
 	$(DL_LIBS)
 
Quoted 4 lines

liblttng_ust_common_la_LDFLAGS = -no-undefined -version-info $(LTTNG_UST_LIBRARY_VERSION)
--
2.20.1

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

#2 lore raw

Re: [lttng-dev] ?==?utf-8?q? [PATCH]?==?utf-8?q? lttng-ust-common: link with liburcu explicitly

Thanks for quick response!

I'm seeing this with lttng-ust 2.13.0:

| make[3]: Entering directory '/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/build/tests/unit/libringbuffer'
| ../../../i686-poky-linux-libtool  --tag=CC   --mode=link i686-poky-linux-gcc  -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot -fno-strict-aliasing -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations -Wnull-dereference -Wundef -Wshadow -Wjump-misses-init -Wsuggest-attribute=format -Wnested-externs -Wwrite-strings -Wformat=2 -Wstrict-aliasing -Wmissing-noreturn -Winit-self -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wno-sign-compare -Wno-missing-field-initializers -Wno-null-dereference -Wold-style-definition -Wstrict-prototypes  -pthread -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0=/usr/src/debug/lttng-ust/2_2.13.0-r0                      -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0=/usr/src/debug/lttng-ust/2_2.13.0-r0                      -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot-native=   -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0=/usr/src/debug/lttng-ust/2_2.13.0-r0                      -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0=/usr/src/debug/lttng-ust/2_2.13.0-r0                      -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot-native=  -Wl,-z,relro,-z,now -o test_shm shm.o ../../../src/common/libringbuffer.la ../../../src/lib/lttng-ust-common/liblttng-ust-common.la ../../../src/common/libcommon.la ../../../tests/utils/libtap.a
| i686-poky-linux-libtool: link: i686-poky-linux-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot -fno-strict-aliasing -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations -Wnull-dereference -Wundef -Wshadow -Wjump-misses-init -Wsuggest-attribute=format -Wnested-externs -Wwrite-strings -Wformat=2 -Wstrict-aliasing -Wmissing-noreturn -Winit-self -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wno-sign-compare -Wno-missing-field-initializers -Wno-null-dereference -Wold-style-definition -Wstrict-prototypes -pthread -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0=/usr/src/debug/lttng-ust/2_2.13.0-r0 -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0=/usr/src/debug/lttng-ust/2_2.13.0-r0 -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot-native= -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0=/usr/src/debug/lttng-ust/2_2.13.0-r0 -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0=/usr/src/debug/lttng-ust/2_2.13.0-r0 -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot-native= -Wl,-z -Wl,relro -Wl,-z -Wl,now -o .libs/test_shm shm.o  ../../../src/common/.libs/libringbuffer.a -lrt ../../../src/lib/lttng-ust-common/.libs/liblttng-ust-common.so -ldl ../../../src/common/.libs/libcommon.a ../../../tests/utils/libtap.a -pthread
| /home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot-native/usr/bin/i686-poky-linux/../../libexec/i686-poky-linux/gcc/i686-poky-linux/11.2.0/ld: ../../../src/lib/lttng-ust-common/.libs/liblttng-ust-common.so: undefined reference to `_compat_uatomic_set'
| /home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot-native/usr/bin/i686-poky-linux/../../libexec/i686-poky-linux/gcc/i686-poky-linux/11.2.0/ld: ../../../src/lib/lttng-ust-common/.libs/liblttng-ust-common.so: undefined reference to `_compat_uatomic_xchg'
| /home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot-native/usr/bin/i686-poky-linux/../../libexec/i686-poky-linux/gcc/i686-poky-linux/11.2.0/ld: ../../../src/lib/lttng-ust-common/.libs/liblttng-ust-common.so: undefined reference to `__rcu_cas_init'
| /home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot-native/usr/bin/i686-poky-linux/../../libexec/i686-poky-linux/gcc/i686-poky-linux/11.2.0/ld: ../../../src/lib/lttng-ust-common/.libs/liblttng-ust-common.so: undefined reference to `__rcu_cas_avail'
| /home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/recipe-sysroot-native/usr/bin/i686-poky-linux/../../libexec/i686-poky-linux/gcc/i686-poky-linux/11.2.0/ld: ../../../src/lib/lttng-ust-common/.libs/liblttng-ust-common.so: undefined reference to `_compat_uatomic_cmpxchg'
| collect2: error: ld returned 1 exit status
| make[3]: *** [Makefile:404: test_shm] Error 1
| make[3]: Leaving directory '/home/alex/development/poky/build-32/tmp/work/core2-32-poky-linux/lttng-ust/2_2.13.0-r0/build/tests/unit/libringbuffer'

Cheers,
Alex

Quoted 60 lines · Jonathan Rajotte-Julien

Hi Alexander,

Thanks for sending this patch. Could you provide more details regarding the linking errors?

lttng-ust must not depends on liburcu at runtime since commit 10544ee8af31afb239e3dfa71cb2fe09d3de3771

commit 10544ee8af31afb239e3dfa71cb2fe09d3de3771

Author: Mathieu Desnoyers <[email protected]>
Date:   Wed Nov 11 17:28:06 2020 -0500

Remove runtime dependency on liburcu shared objects

Remove the runtime dependency on:

- liblurcu-bp.so
- liblurcu-cds.so
- compat futex code.

By integrating those into the lttng-ust project.

For rculfhash, only the minimum pieces needed by lttng-ust are integrated (no auto-resize, no accounting).

lttng-ust still requires liburcu at build time for header dependencies.

Change-Id Idffb205b27b1bb0f972523c3ce3bdaf25bfe1710

Cheers

----- Original Message -----

Quoted 28 lines

From: "Alexander Kanavin" <[email protected]>
To: "lttng-dev" <[email protected]>, "Francis Deslauriers" <[email protected]>, "jonathan rajotte-julien" <[email protected]>
Cc: "Alexander Kanavin" <[email protected]>
Sent: Thursday, December 2, 2021 3:04:12 PM
Subject: [PATCH] lttng-ust-common: link with liburcu explicitly

Otherwise linking errors are seen on x86-32.
---
src/lib/lttng-ust-common/Makefile.am | 1 +

1 file changed, 1 insertion(+)
src/lib/lttng-ust-common/Makefile.am +1 -0
index caeea2be..0130628c 100644
@@ -15,6 +15,7 @@ liblttng_ust_common_la_SOURCES = \
 
 liblttng_ust_common_la_LIBADD = \
 	$(top_builddir)/src/common/libcommon.la \
+	$(URCU_LIBS) \
 	$(DL_LIBS)
 

liblttng_ust_common_la_LDFLAGS = -no-undefined -version-info $(LTTNG_UST_LIBRARY_VERSION)
--
2.20.1

Signature · 15 lines
Alexander Kanavin
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 39; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev