CodeSamples: Work around removal of liburcu-signal
PATCH v3 1/1 CodeSamples: Work around removal of liburcu-signal
From: Leonardo Bras <[email protected]>
liburcu 0.15.0 deprecated urcu-signal as a library. This causes build errors in gitlab-CI [1]:
/usr/sbin/ld: cannot find -lurcu-signal: No such file or directory
collect2: error: ld returned 1 exit status
Work around them by adding command lines w/o "-lurcu-signal" as fallbacks in relevant Makefile recipes.
---
Hi,
Admittedly, this is one of the least elegant workaround for ArchLinux and soon-to-be upgraded other rolling distros, but still looks straight forward to me.
Can you live with this?
This is tested against Ubuntu 20.04 LTS (liburcu 0.11.1), Ubuntu 24.04 LTS (liburcu 0.14.0), Fedora 41 (liburcu 0.14.1), and ArchLinux (liburcu 0.15.0).
Thanks, Akira
--
CodeSamples/datastruct/Issaquah/Makefile | 6 +++-- CodeSamples/datastruct/existence/Makefile | 30 +++++++++++++++-------- CodeSamples/datastruct/hash/Makefile | 9 ++++--- CodeSamples/datastruct/skiplist/Makefile | 6 +++-- CodeSamples/defer/Makefile | 9 ++++--- 5 files changed, 40 insertions(+), 20 deletions(-)
CodeSamples/datastruct/Issaquah/Makefile +4 -2
@@ -45,10 +45,12 @@ GCC_ARGS += -fcommon # Verify by using the nm command and searching output for malloc. existence_test: existence.c existence_test.c - cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu treetorture: tree.c existence.c spinlockmult.c $(LIB)/random.c ../../api.h treetorture.h treetorturetrace.h $(LIB)/random.h existence.h tree.h - cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)
CodeSamples/datastruct/existence/Makefile +20 -10
@@ -44,39 +44,49 @@ all: $(PROGS) # So it is quite a bit easier to just use the default locations. ;-) existence_test: existence.h existence_test.c procon.h - cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu existence_3hash_test: existence.h hash_exists.h keyvalue.h existence_3hash_test.c procon.h - cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu existence_3hash_uperf: existence.h hash_exists.h keyvalue.h existence_3hash_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu existence_3skiplist_test: existence.h skiplist_exists.h keyvalue.h existence_3skiplist_test.c procon.h - cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal existence_3skiplist_uperf: existence.h hash_exists.h keyvalue.h existence_3skiplist_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu kaleidoscope_test: kaleidoscope.h kaleidoscope_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu kaleidoscope_3hash_test: kaleidoscope.h hash_exists.h keyvalue.h kaleidoscope_3hash_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu kaleidoscope_3skiplist_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_3skiplist_test.c procon.h - cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal kaleidoscope_skiphash_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_skiphash_test.c procon.h - cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal procon_test: procon.h procon_test.c - cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal || \ + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu # cc $(GCC_ARGS) -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal clean:
CodeSamples/datastruct/hash/Makefile +6 -3
@@ -44,7 +44,8 @@ hash_bkt_qsbr: hash_bkt_rcu.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -DPERFBOOK_RCU_QSBR -o hash_bkt_qsbr hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-qsbr hash_bkt_rcu: hash_bkt_rcu.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu hash_bkt_hazptr: hash_bkt_hazptr.c ../../defer/hazptr.c ../../defer/hazptr.h ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_hazptr hash_bkt_hazptr.c ../../defer/hazptr.c $(LIB)/random.c -lpthread
@@ -53,10 +54,12 @@ hash_global: hash_global.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_global hash_global.c $(LIB)/random.c -lpthread hash_resize: hash_resize.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu hash_resize_s: hash_resize_s.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu hash_unsync: hash_unsync.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_unsync hash_unsync.c $(LIB)/random.c -lpthread
CodeSamples/datastruct/skiplist/Makefile +4 -2
@@ -33,10 +33,12 @@ endif include $(top)/recipes.mk skiplist: skiplist.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu skiplist_glock: skiplist_glock.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)
CodeSamples/defer/Makefile +6 -3
@@ -80,7 +80,8 @@ hazptr: hazptr.c hazptr.h ../api.h hazptrtorture.h cc $(GCC_ARGS) -o hazptr -DTEST hazptr.c -lpthread ptxroute: ptxroute.c ../api.h - cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu rcu: rcu.c rcu.h ../api.h rcutorture.h cc $(GCC_ARGS) -o rcu -DTEST rcu.c -lpthread
@@ -131,7 +132,8 @@ route_hazptr: route_hazptr.c hazptr.c hazptr.h ../api.h ../lib/random.h ../lib/r cc $(GCC_ARGS) -o route_hazptr route_hazptr.c hazptr.c ../lib/random.c -lpthread route_rcu: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h - cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu route_rcu_qsbr: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h cc $(GCC_ARGS) -o route_rcu_qsbr -DDO_QSBR route_rcu.c ../lib/random.c -lpthread -lurcu-qsbr
@@ -149,7 +151,8 @@ seqlocktorture: seqlocktorture.c seqlock.h ../api.h cc $(GCC_ARGS) -o seqlocktorture seqlocktorture.c -lpthread singleton: singleton.c ../api.h ../lib/random.h ../lib/random.c - cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu clean: rm -f $(PROGS)
base-commit: 4c0afec5a7081227adc768fb8d3fb35aa1981d55
Signature · 1 line
2.34.1
Quoted 16 lines · Akira Yokosawa
From: Leonardo Bras <[email protected]>
liburcu 0.15.0 deprecated urcu-signal as a library. This causes build errors in gitlab-CI [1]:
/usr/sbin/ld: cannot find -lurcu-signal: No such file or directory
collect2: error: ld returned 1 exit statusWork around them by adding command lines w/o "-lurcu-signal" as fallbacks in relevant
Makefilerecipes.Signed-off-by Leonardo Bras <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[akiyks: rewrite changelog, restore compatibility with liburcu <0.15.0]Signed-off-by Akira Yokosawa <[email protected]>
Quoted 8 lines
---
Hi,Admittedly, this is one of the least elegant workaround for ArchLinux and soon-to-be upgraded other rolling distros, but still looks straight forward to me.
Can you live with this?
Thank you both for digging into this!!!
I believe that we can, and I am inclined to take this. But first, a couple of questions:
1. Can this be some sort of macro or script so that we don't have
to keep the arguments of the commands in each pair in sync?
2. Is it possible to try the new version first, so that only old
systems pay the double-compilation price?
It is quite possible that the answer to the questions is "yes", but that the result is excessively complex, so please do not put too much time into this. As I said above, I am inclined to take this.
Quoted 3 lines
This is tested against Ubuntu 20.04 LTS (liburcu 0.11.1), Ubuntu 24.04 LTS (liburcu 0.14.0), Fedora 41 (liburcu 0.14.1), and ArchLinux (liburcu 0.15.0).
Thank you very much for testing all these possibilities!
Thanx, Paul
Quoted 179 lines
Thanks, Akira
--CodeSamples/datastruct/Issaquah/Makefile | 6 +++-- CodeSamples/datastruct/existence/Makefile | 30 +++++++++++++++-------- CodeSamples/datastruct/hash/Makefile | 9 ++++--- CodeSamples/datastruct/skiplist/Makefile | 6 +++-- CodeSamples/defer/Makefile | 9 ++++--- 5 files changed, 40 insertions(+), 20 deletions(-)CodeSamples/datastruct/Issaquah/Makefile +4
-2@@ -45,10 +45,12 @@ GCC_ARGS += -fcommon # Verify by using the nm command and searching output for malloc. existence_test: existence.c existence_test.c - cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu treetorture: tree.c existence.c spinlockmult.c $(LIB)/random.c ../../api.h treetorture.h treetorturetrace.h $(LIB)/random.h existence.h tree.h - cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/datastruct/existence/Makefile +20
-10@@ -44,39 +44,49 @@ all: $(PROGS) # So it is quite a bit easier to just use the default locations. ;-) existence_test: existence.h existence_test.c procon.h - cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu existence_3hash_test: existence.h hash_exists.h keyvalue.h existence_3hash_test.c procon.h - cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu existence_3hash_uperf: existence.h hash_exists.h keyvalue.h existence_3hash_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu existence_3skiplist_test: existence.h skiplist_exists.h keyvalue.h existence_3skiplist_test.c procon.h - cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal existence_3skiplist_uperf: existence.h hash_exists.h keyvalue.h existence_3skiplist_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu kaleidoscope_test: kaleidoscope.h kaleidoscope_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu kaleidoscope_3hash_test: kaleidoscope.h hash_exists.h keyvalue.h kaleidoscope_3hash_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu kaleidoscope_3skiplist_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_3skiplist_test.c procon.h - cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal kaleidoscope_skiphash_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_skiphash_test.c procon.h - cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal procon_test: procon.h procon_test.c - cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal || \ + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu # cc $(GCC_ARGS) -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal clean:CodeSamples/datastruct/hash/Makefile +6
-3@@ -44,7 +44,8 @@ hash_bkt_qsbr: hash_bkt_rcu.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -DPERFBOOK_RCU_QSBR -o hash_bkt_qsbr hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-qsbr hash_bkt_rcu: hash_bkt_rcu.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu hash_bkt_hazptr: hash_bkt_hazptr.c ../../defer/hazptr.c ../../defer/hazptr.h ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_hazptr hash_bkt_hazptr.c ../../defer/hazptr.c $(LIB)/random.c -lpthread@@ -53,10 +54,12 @@ hash_global: hash_global.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_global hash_global.c $(LIB)/random.c -lpthread hash_resize: hash_resize.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu hash_resize_s: hash_resize_s.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu hash_unsync: hash_unsync.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_unsync hash_unsync.c $(LIB)/random.c -lpthreadCodeSamples/datastruct/skiplist/Makefile +4
-2@@ -33,10 +33,12 @@ endif include $(top)/recipes.mk skiplist: skiplist.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu skiplist_glock: skiplist_glock.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/defer/Makefile +6
-3@@ -80,7 +80,8 @@ hazptr: hazptr.c hazptr.h ../api.h hazptrtorture.h cc $(GCC_ARGS) -o hazptr -DTEST hazptr.c -lpthread ptxroute: ptxroute.c ../api.h - cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu rcu: rcu.c rcu.h ../api.h rcutorture.h cc $(GCC_ARGS) -o rcu -DTEST rcu.c -lpthread@@ -131,7 +132,8 @@ route_hazptr: route_hazptr.c hazptr.c hazptr.h ../api.h ../lib/random.h ../lib/r cc $(GCC_ARGS) -o route_hazptr route_hazptr.c hazptr.c ../lib/random.c -lpthread route_rcu: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h - cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu route_rcu_qsbr: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h cc $(GCC_ARGS) -o route_rcu_qsbr -DDO_QSBR route_rcu.c ../lib/random.c -lpthread -lurcu-qsbr@@ -149,7 +151,8 @@ seqlocktorture: seqlocktorture.c seqlock.h ../api.h cc $(GCC_ARGS) -o seqlocktorture seqlocktorture.c -lpthread singleton: singleton.c ../api.h ../lib/random.h ../lib/random.c - cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu clean: rm -f $(PROGS)base-commit:
4c0afec5a7081227adc768fb8d3fb35aa1981d55Signature · 1 line
2.34.1
Quoted 204 lines · Akira Yokosawa
From: Leonardo Bras <[email protected]>
liburcu 0.15.0 deprecated urcu-signal as a library. This causes build errors in gitlab-CI [1]:
/usr/sbin/ld: cannot find -lurcu-signal: No such file or directory
collect2: error: ld returned 1 exit statusWork around them by adding command lines w/o "-lurcu-signal" as fallbacks in relevant
Makefilerecipes.Signed-off-by Leonardo Bras <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[akiyks: rewrite changelog, restore compatibility with liburcu <0.15.0]Signed-off-by Akira Yokosawa <[email protected]>---
Hi,Admittedly, this is one of the least elegant workaround for ArchLinux and soon-to-be upgraded other rolling distros, but still looks straight forward to me.
Can you live with this?
This is tested against Ubuntu 20.04 LTS (liburcu 0.11.1), Ubuntu 24.04 LTS (liburcu 0.14.0), Fedora 41 (liburcu 0.14.1), and ArchLinux (liburcu 0.15.0).
Thanks, Akira
--CodeSamples/datastruct/Issaquah/Makefile | 6 +++-- CodeSamples/datastruct/existence/Makefile | 30 +++++++++++++++-------- CodeSamples/datastruct/hash/Makefile | 9 ++++--- CodeSamples/datastruct/skiplist/Makefile | 6 +++-- CodeSamples/defer/Makefile | 9 ++++--- 5 files changed, 40 insertions(+), 20 deletions(-)CodeSamples/datastruct/Issaquah/Makefile +4
-2@@ -45,10 +45,12 @@ GCC_ARGS += -fcommon # Verify by using the nm command and searching output for malloc. existence_test: existence.c existence_test.c - cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu treetorture: tree.c existence.c spinlockmult.c $(LIB)/random.c ../../api.h treetorture.h treetorturetrace.h $(LIB)/random.h existence.h tree.h - cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/datastruct/existence/Makefile +20
-10@@ -44,39 +44,49 @@ all: $(PROGS) # So it is quite a bit easier to just use the default locations. ;-) existence_test: existence.h existence_test.c procon.h - cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu existence_3hash_test: existence.h hash_exists.h keyvalue.h existence_3hash_test.c procon.h - cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu existence_3hash_uperf: existence.h hash_exists.h keyvalue.h existence_3hash_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu existence_3skiplist_test: existence.h skiplist_exists.h keyvalue.h existence_3skiplist_test.c procon.h - cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal existence_3skiplist_uperf: existence.h hash_exists.h keyvalue.h existence_3skiplist_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu kaleidoscope_test: kaleidoscope.h kaleidoscope_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu kaleidoscope_3hash_test: kaleidoscope.h hash_exists.h keyvalue.h kaleidoscope_3hash_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu kaleidoscope_3skiplist_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_3skiplist_test.c procon.h - cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal kaleidoscope_skiphash_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_skiphash_test.c procon.h - cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal procon_test: procon.h procon_test.c - cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal || \ + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu # cc $(GCC_ARGS) -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal clean:CodeSamples/datastruct/hash/Makefile +6
-3@@ -44,7 +44,8 @@ hash_bkt_qsbr: hash_bkt_rcu.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -DPERFBOOK_RCU_QSBR -o hash_bkt_qsbr hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-qsbr hash_bkt_rcu: hash_bkt_rcu.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu hash_bkt_hazptr: hash_bkt_hazptr.c ../../defer/hazptr.c ../../defer/hazptr.h ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_hazptr hash_bkt_hazptr.c ../../defer/hazptr.c $(LIB)/random.c -lpthread@@ -53,10 +54,12 @@ hash_global: hash_global.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_global hash_global.c $(LIB)/random.c -lpthread hash_resize: hash_resize.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu hash_resize_s: hash_resize_s.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu hash_unsync: hash_unsync.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_unsync hash_unsync.c $(LIB)/random.c -lpthreadCodeSamples/datastruct/skiplist/Makefile +4
-2@@ -33,10 +33,12 @@ endif include $(top)/recipes.mk skiplist: skiplist.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu skiplist_glock: skiplist_glock.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/defer/Makefile +6
-3@@ -80,7 +80,8 @@ hazptr: hazptr.c hazptr.h ../api.h hazptrtorture.h cc $(GCC_ARGS) -o hazptr -DTEST hazptr.c -lpthread ptxroute: ptxroute.c ../api.h - cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu rcu: rcu.c rcu.h ../api.h rcutorture.h cc $(GCC_ARGS) -o rcu -DTEST rcu.c -lpthread@@ -131,7 +132,8 @@ route_hazptr: route_hazptr.c hazptr.c hazptr.h ../api.h ../lib/random.h ../lib/r cc $(GCC_ARGS) -o route_hazptr route_hazptr.c hazptr.c ../lib/random.c -lpthread route_rcu: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h - cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu route_rcu_qsbr: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h cc $(GCC_ARGS) -o route_rcu_qsbr -DDO_QSBR route_rcu.c ../lib/random.c -lpthread -lurcu-qsbr@@ -149,7 +151,8 @@ seqlocktorture: seqlocktorture.c seqlock.h ../api.h cc $(GCC_ARGS) -o seqlocktorture seqlocktorture.c -lpthread singleton: singleton.c ../api.h ../lib/random.h ../lib/random.c - cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu clean: rm -f $(PROGS)
Quoted 1 line
base-commit:
4c0afec5a7081227adc768fb8d3fb35aa1981d55
Hi Akira,
That's a creative way of dealing with this issue, but if we want to add that complexity, I would rather use $(pkg-config --libs liburcu).
Wouldn't this fix the issue as well?
Thanks!
Quoted 209 lines · Leonardo Brás
Quoted 204 lines · Akira Yokosawa
From: Leonardo Bras <[email protected]>
liburcu 0.15.0 deprecated urcu-signal as a library. This causes build errors in gitlab-CI [1]:
/usr/sbin/ld: cannot find -lurcu-signal: No such file or directory
collect2: error: ld returned 1 exit statusWork around them by adding command lines w/o "-lurcu-signal" as fallbacks in relevant
Makefilerecipes.Signed-off-by Leonardo Bras <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[akiyks: rewrite changelog, restore compatibility with liburcu <0.15.0]Signed-off-by Akira Yokosawa <[email protected]>---
Hi,Admittedly, this is one of the least elegant workaround for ArchLinux and soon-to-be upgraded other rolling distros, but still looks straight forward to me.
Can you live with this?
This is tested against Ubuntu 20.04 LTS (liburcu 0.11.1), Ubuntu 24.04 LTS (liburcu 0.14.0), Fedora 41 (liburcu 0.14.1), and ArchLinux (liburcu 0.15.0).
Thanks, Akira
--CodeSamples/datastruct/Issaquah/Makefile | 6 +++-- CodeSamples/datastruct/existence/Makefile | 30 +++++++++++++++-------- CodeSamples/datastruct/hash/Makefile | 9 ++++--- CodeSamples/datastruct/skiplist/Makefile | 6 +++-- CodeSamples/defer/Makefile | 9 ++++--- 5 files changed, 40 insertions(+), 20 deletions(-)CodeSamples/datastruct/Issaquah/Makefile +4
-2@@ -45,10 +45,12 @@ GCC_ARGS += -fcommon # Verify by using the nm command and searching output for malloc. existence_test: existence.c existence_test.c - cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu treetorture: tree.c existence.c spinlockmult.c $(LIB)/random.c ../../api.h treetorture.h treetorturetrace.h $(LIB)/random.h existence.h tree.h - cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/datastruct/existence/Makefile +20
-10@@ -44,39 +44,49 @@ all: $(PROGS) # So it is quite a bit easier to just use the default locations. ;-) existence_test: existence.h existence_test.c procon.h - cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu existence_3hash_test: existence.h hash_exists.h keyvalue.h existence_3hash_test.c procon.h - cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu existence_3hash_uperf: existence.h hash_exists.h keyvalue.h existence_3hash_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu existence_3skiplist_test: existence.h skiplist_exists.h keyvalue.h existence_3skiplist_test.c procon.h - cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal existence_3skiplist_uperf: existence.h hash_exists.h keyvalue.h existence_3skiplist_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu kaleidoscope_test: kaleidoscope.h kaleidoscope_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu kaleidoscope_3hash_test: kaleidoscope.h hash_exists.h keyvalue.h kaleidoscope_3hash_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu kaleidoscope_3skiplist_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_3skiplist_test.c procon.h - cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal kaleidoscope_skiphash_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_skiphash_test.c procon.h - cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal procon_test: procon.h procon_test.c - cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal || \ + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu # cc $(GCC_ARGS) -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal clean:CodeSamples/datastruct/hash/Makefile +6
-3@@ -44,7 +44,8 @@ hash_bkt_qsbr: hash_bkt_rcu.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -DPERFBOOK_RCU_QSBR -o hash_bkt_qsbr hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-qsbr hash_bkt_rcu: hash_bkt_rcu.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu hash_bkt_hazptr: hash_bkt_hazptr.c ../../defer/hazptr.c ../../defer/hazptr.h ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_hazptr hash_bkt_hazptr.c ../../defer/hazptr.c $(LIB)/random.c -lpthread@@ -53,10 +54,12 @@ hash_global: hash_global.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_global hash_global.c $(LIB)/random.c -lpthread hash_resize: hash_resize.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu hash_resize_s: hash_resize_s.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu hash_unsync: hash_unsync.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_unsync hash_unsync.c $(LIB)/random.c -lpthreadCodeSamples/datastruct/skiplist/Makefile +4
-2@@ -33,10 +33,12 @@ endif include $(top)/recipes.mk skiplist: skiplist.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu skiplist_glock: skiplist_glock.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/defer/Makefile +6
-3@@ -80,7 +80,8 @@ hazptr: hazptr.c hazptr.h ../api.h hazptrtorture.h cc $(GCC_ARGS) -o hazptr -DTEST hazptr.c -lpthread ptxroute: ptxroute.c ../api.h - cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu rcu: rcu.c rcu.h ../api.h rcutorture.h cc $(GCC_ARGS) -o rcu -DTEST rcu.c -lpthread@@ -131,7 +132,8 @@ route_hazptr: route_hazptr.c hazptr.c hazptr.h ../api.h ../lib/random.h ../lib/r cc $(GCC_ARGS) -o route_hazptr route_hazptr.c hazptr.c ../lib/random.c -lpthread route_rcu: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h - cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu route_rcu_qsbr: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h cc $(GCC_ARGS) -o route_rcu_qsbr -DDO_QSBR route_rcu.c ../lib/random.c -lpthread -lurcu-qsbr@@ -149,7 +151,8 @@ seqlocktorture: seqlocktorture.c seqlock.h ../api.h cc $(GCC_ARGS) -o seqlocktorture seqlocktorture.c -lpthread singleton: singleton.c ../api.h ../lib/random.h ../lib/random.c - cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu clean: rm -f $(PROGS)Quoted 1 line
base-commit:
4c0afec5a7081227adc768fb8d3fb35aa1981d55Hi Akira,
Quoted 6 lines
That's a creative way of dealing with this issue, but if we want to add that complexity, I would rather use $(pkg-config --libs liburcu).
Wouldn't this fix the issue as well?
Thanks!
Also, according to Paul's comment on v2 patch it shouldn't be needed:
Quoted 9 lines
Quoted 3 lines
On the other hand,
sys_membarrier()was introduced in 2015 (5b25b13ab08f6), and no supported kernel (>v4.2) should still miss this syscall. Is it worth the added complexity? Is so, let's do it.If the -lurcu-signal is left off for old versions of the userspace RCU library, doesn't it simply fall back to using explicit memory barriers? Or am I yet again misremembering?
Thanx, Paul
Isn't the above correct?
Thanks!
Leo
Quoted 23 lines · Akira Yokosawa
From: Leonardo Bras <[email protected]>
liburcu 0.15.0 deprecated urcu-signal as a library. This causes build errors in gitlab-CI [1]:
/usr/sbin/ld: cannot find -lurcu-signal: No such file or directory
collect2: error: ld returned 1 exit statusWork around them by adding command lines w/o "-lurcu-signal" as fallbacks in relevant
Makefilerecipes.Signed-off-by Leonardo Bras <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[akiyks: rewrite changelog, restore compatibility with liburcu <0.15.0]Signed-off-by Akira Yokosawa <[email protected]>---
Hi,Admittedly, this is one of the least elegant workaround for ArchLinux and soon-to-be upgraded other rolling distros, but still looks straight forward to me.
Quoted 5 lines
Can you live with this?
This is tested against Ubuntu 20.04 LTS (liburcu 0.11.1), Ubuntu 24.04 LTS (liburcu 0.14.0), Fedora 41 (liburcu 0.14.1), and ArchLinux (liburcu 0.15.0).
Also, all above systems already include sys_membarrier(), as they include kernel versions above v4.2.
Quoted 177 lines
Thanks, Akira
--CodeSamples/datastruct/Issaquah/Makefile | 6 +++-- CodeSamples/datastruct/existence/Makefile | 30 +++++++++++++++-------- CodeSamples/datastruct/hash/Makefile | 9 ++++--- CodeSamples/datastruct/skiplist/Makefile | 6 +++-- CodeSamples/defer/Makefile | 9 ++++--- 5 files changed, 40 insertions(+), 20 deletions(-)CodeSamples/datastruct/Issaquah/Makefile +4
-2@@ -45,10 +45,12 @@ GCC_ARGS += -fcommon # Verify by using the nm command and searching output for malloc. existence_test: existence.c existence_test.c - cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu treetorture: tree.c existence.c spinlockmult.c $(LIB)/random.c ../../api.h treetorture.h treetorturetrace.h $(LIB)/random.h existence.h tree.h - cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/datastruct/existence/Makefile +20
-10@@ -44,39 +44,49 @@ all: $(PROGS) # So it is quite a bit easier to just use the default locations. ;-) existence_test: existence.h existence_test.c procon.h - cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu existence_3hash_test: existence.h hash_exists.h keyvalue.h existence_3hash_test.c procon.h - cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu existence_3hash_uperf: existence.h hash_exists.h keyvalue.h existence_3hash_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu existence_3skiplist_test: existence.h skiplist_exists.h keyvalue.h existence_3skiplist_test.c procon.h - cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal existence_3skiplist_uperf: existence.h hash_exists.h keyvalue.h existence_3skiplist_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu kaleidoscope_test: kaleidoscope.h kaleidoscope_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu kaleidoscope_3hash_test: kaleidoscope.h hash_exists.h keyvalue.h kaleidoscope_3hash_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu kaleidoscope_3skiplist_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_3skiplist_test.c procon.h - cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal kaleidoscope_skiphash_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_skiphash_test.c procon.h - cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal procon_test: procon.h procon_test.c - cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal || \ + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu # cc $(GCC_ARGS) -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal clean:CodeSamples/datastruct/hash/Makefile +6
-3@@ -44,7 +44,8 @@ hash_bkt_qsbr: hash_bkt_rcu.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -DPERFBOOK_RCU_QSBR -o hash_bkt_qsbr hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-qsbr hash_bkt_rcu: hash_bkt_rcu.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu hash_bkt_hazptr: hash_bkt_hazptr.c ../../defer/hazptr.c ../../defer/hazptr.h ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_hazptr hash_bkt_hazptr.c ../../defer/hazptr.c $(LIB)/random.c -lpthread@@ -53,10 +54,12 @@ hash_global: hash_global.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_global hash_global.c $(LIB)/random.c -lpthread hash_resize: hash_resize.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu hash_resize_s: hash_resize_s.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu hash_unsync: hash_unsync.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_unsync hash_unsync.c $(LIB)/random.c -lpthreadCodeSamples/datastruct/skiplist/Makefile +4
-2@@ -33,10 +33,12 @@ endif include $(top)/recipes.mk skiplist: skiplist.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu skiplist_glock: skiplist_glock.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/defer/Makefile +6
-3@@ -80,7 +80,8 @@ hazptr: hazptr.c hazptr.h ../api.h hazptrtorture.h cc $(GCC_ARGS) -o hazptr -DTEST hazptr.c -lpthread ptxroute: ptxroute.c ../api.h - cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu rcu: rcu.c rcu.h ../api.h rcutorture.h cc $(GCC_ARGS) -o rcu -DTEST rcu.c -lpthread@@ -131,7 +132,8 @@ route_hazptr: route_hazptr.c hazptr.c hazptr.h ../api.h ../lib/random.h ../lib/r cc $(GCC_ARGS) -o route_hazptr route_hazptr.c hazptr.c ../lib/random.c -lpthread route_rcu: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h - cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu route_rcu_qsbr: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h cc $(GCC_ARGS) -o route_rcu_qsbr -DDO_QSBR route_rcu.c ../lib/random.c -lpthread -lurcu-qsbr@@ -149,7 +151,8 @@ seqlocktorture: seqlocktorture.c seqlock.h ../api.h cc $(GCC_ARGS) -o seqlocktorture seqlocktorture.c -lpthread singleton: singleton.c ../api.h ../lib/random.h ../lib/random.c - cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu clean: rm -f $(PROGS)base-commit:
4c0afec5a7081227adc768fb8d3fb35aa1981d55
Quoted 28 lines · Paul E. McKenney
Quoted 16 lines · Akira Yokosawa
From: Leonardo Bras <[email protected]>
liburcu 0.15.0 deprecated urcu-signal as a library. This causes build errors in gitlab-CI [1]:
/usr/sbin/ld: cannot find -lurcu-signal: No such file or directory
collect2: error: ld returned 1 exit statusWork around them by adding command lines w/o "-lurcu-signal" as fallbacks in relevant
Makefilerecipes.Signed-off-by Leonardo Bras <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[akiyks: rewrite changelog, restore compatibility with liburcu <0.15.0]Signed-off-by Akira Yokosawa <[email protected]>Quoted 8 lines
---
Hi,Admittedly, this is one of the least elegant workaround for ArchLinux and soon-to-be upgraded other rolling distros, but still looks straight forward to me.
Can you live with this?
Thank you both for digging into this!!!
Quoted 8 lines
I believe that we can, and I am inclined to take this. But first, a couple of questions:
1. Can this be some sort of macro or script so that we don't have
to keep the arguments of the commands in each pair in sync?2. Is it possible to try the new version first, so that only old
systems pay the double-compilation price?
While (2) is cleaner and quite possible by:
a) keeping a $VAR_COMPAT_SIGNAL variable that can get "-lurcu-signal" if a test compilation fails, and
"" otherwise,
b) adding this variable instead of -lurcu-signal in every command,
I really doubt we need to add this complexity, as I don't think anyone is using a 10 years old kernel to run those tests.
Also, there is the fallback option mentioned by Paul.
Honestly, I would go with v2 to avoid adding complexity.
Thanks!
Leo
Quoted 192 lines
It is quite possible that the answer to the questions is "yes", but that the result is excessively complex, so please do not put too much time into this. As I said above, I am inclined to take this.
Quoted 3 lines
This is tested against Ubuntu 20.04 LTS (liburcu 0.11.1), Ubuntu 24.04 LTS (liburcu 0.14.0), Fedora 41 (liburcu 0.14.1), and ArchLinux (liburcu 0.15.0).
Thank you very much for testing all these possibilities!
Thanx, Paul
Quoted 179 lines
Thanks, Akira
--CodeSamples/datastruct/Issaquah/Makefile | 6 +++-- CodeSamples/datastruct/existence/Makefile | 30 +++++++++++++++-------- CodeSamples/datastruct/hash/Makefile | 9 ++++--- CodeSamples/datastruct/skiplist/Makefile | 6 +++-- CodeSamples/defer/Makefile | 9 ++++--- 5 files changed, 40 insertions(+), 20 deletions(-)CodeSamples/datastruct/Issaquah/Makefile +4
-2@@ -45,10 +45,12 @@ GCC_ARGS += -fcommon # Verify by using the nm command and searching output for malloc. existence_test: existence.c existence_test.c - cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu treetorture: tree.c existence.c spinlockmult.c $(LIB)/random.c ../../api.h treetorture.h treetorturetrace.h $(LIB)/random.h existence.h tree.h - cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/datastruct/existence/Makefile +20
-10@@ -44,39 +44,49 @@ all: $(PROGS) # So it is quite a bit easier to just use the default locations. ;-) existence_test: existence.h existence_test.c procon.h - cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu existence_3hash_test: existence.h hash_exists.h keyvalue.h existence_3hash_test.c procon.h - cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu existence_3hash_uperf: existence.h hash_exists.h keyvalue.h existence_3hash_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu existence_3skiplist_test: existence.h skiplist_exists.h keyvalue.h existence_3skiplist_test.c procon.h - cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal existence_3skiplist_uperf: existence.h hash_exists.h keyvalue.h existence_3skiplist_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu kaleidoscope_test: kaleidoscope.h kaleidoscope_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu kaleidoscope_3hash_test: kaleidoscope.h hash_exists.h keyvalue.h kaleidoscope_3hash_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu kaleidoscope_3skiplist_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_3skiplist_test.c procon.h - cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal kaleidoscope_skiphash_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_skiphash_test.c procon.h - cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal procon_test: procon.h procon_test.c - cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal || \ + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu # cc $(GCC_ARGS) -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal clean:CodeSamples/datastruct/hash/Makefile +6
-3@@ -44,7 +44,8 @@ hash_bkt_qsbr: hash_bkt_rcu.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -DPERFBOOK_RCU_QSBR -o hash_bkt_qsbr hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-qsbr hash_bkt_rcu: hash_bkt_rcu.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu hash_bkt_hazptr: hash_bkt_hazptr.c ../../defer/hazptr.c ../../defer/hazptr.h ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_hazptr hash_bkt_hazptr.c ../../defer/hazptr.c $(LIB)/random.c -lpthread@@ -53,10 +54,12 @@ hash_global: hash_global.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_global hash_global.c $(LIB)/random.c -lpthread hash_resize: hash_resize.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu hash_resize_s: hash_resize_s.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu hash_unsync: hash_unsync.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_unsync hash_unsync.c $(LIB)/random.c -lpthreadCodeSamples/datastruct/skiplist/Makefile +4
-2@@ -33,10 +33,12 @@ endif include $(top)/recipes.mk skiplist: skiplist.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu skiplist_glock: skiplist_glock.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/defer/Makefile +6
-3@@ -80,7 +80,8 @@ hazptr: hazptr.c hazptr.h ../api.h hazptrtorture.h cc $(GCC_ARGS) -o hazptr -DTEST hazptr.c -lpthread ptxroute: ptxroute.c ../api.h - cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu rcu: rcu.c rcu.h ../api.h rcutorture.h cc $(GCC_ARGS) -o rcu -DTEST rcu.c -lpthread@@ -131,7 +132,8 @@ route_hazptr: route_hazptr.c hazptr.c hazptr.h ../api.h ../lib/random.h ../lib/r cc $(GCC_ARGS) -o route_hazptr route_hazptr.c hazptr.c ../lib/random.c -lpthread route_rcu: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h - cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu route_rcu_qsbr: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h cc $(GCC_ARGS) -o route_rcu_qsbr -DDO_QSBR route_rcu.c ../lib/random.c -lpthread -lurcu-qsbr@@ -149,7 +151,8 @@ seqlocktorture: seqlocktorture.c seqlock.h ../api.h cc $(GCC_ARGS) -o seqlocktorture seqlocktorture.c -lpthread singleton: singleton.c ../api.h ../lib/random.h ../lib/random.c - cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu clean: rm -f $(PROGS)base-commit:
4c0afec5a7081227adc768fb8d3fb35aa1981d55Signature · 1 line
2.34.1
Quoted 35 lines · Leonardo Brás
Quoted 34 lines · Paul E. McKenney
Quoted 16 lines · Akira Yokosawa
From: Leonardo Bras <[email protected]>
liburcu 0.15.0 deprecated urcu-signal as a library. This causes build errors in gitlab-CI [1]:
/usr/sbin/ld: cannot find -lurcu-signal: No such file or directory
collect2: error: ld returned 1 exit statusWork around them by adding command lines w/o "-lurcu-signal" as fallbacks in relevant
Makefilerecipes.Signed-off-by Leonardo Bras <[email protected]>Co-developed-by Akira Yokosawa <[email protected]>[akiyks: rewrite changelog, restore compatibility with liburcu <0.15.0]Signed-off-by Akira Yokosawa <[email protected]>Quoted 8 lines
---
Hi,Admittedly, this is one of the least elegant workaround for ArchLinux and soon-to-be upgraded other rolling distros, but still looks straight forward to me.
Can you live with this?
Thank you both for digging into this!!!
I believe that we can, and I am inclined to take this. But first, a couple of questions:
1. Can this be some sort of macro or script so that we don't have
to keep the arguments of the commands in each pair in sync?
Quoted 7 lines
Quoted 2 lines
2. Is it possible to try the new version first, so that only old
systems pay the double-compilation price?While (2) is cleaner and quite possible by:
a) keeping a $VAR_COMPAT_SIGNAL variable that can get "-lurcu-signal" if a test compilation fails, and
"" otherwise,
or simply
VAR_COMPAT_SIGNAL=$(pkg-config --libs liburcu-signal)
(which results on an empty string if liburcu-signal is not available and "-lurcu-signal" otherwise)
Quoted 205 lines
b) adding this variable instead of -lurcu-signal in every command,
I really doubt we need to add this complexity, as I don't think anyone is using a 10 years old kernel to run those tests.
Also, there is the fallback option mentioned by Paul.
Honestly, I would go with v2 to avoid adding complexity.
Thanks!
LeoQuoted 192 lines
It is quite possible that the answer to the questions is "yes", but that the result is excessively complex, so please do not put too much time into this. As I said above, I am inclined to take this.
Quoted 3 lines
This is tested against Ubuntu 20.04 LTS (liburcu 0.11.1), Ubuntu 24.04 LTS (liburcu 0.14.0), Fedora 41 (liburcu 0.14.1), and ArchLinux (liburcu 0.15.0).
Thank you very much for testing all these possibilities!
Thanx, Paul
Quoted 179 lines
Thanks, Akira
--CodeSamples/datastruct/Issaquah/Makefile | 6 +++-- CodeSamples/datastruct/existence/Makefile | 30 +++++++++++++++-------- CodeSamples/datastruct/hash/Makefile | 9 ++++--- CodeSamples/datastruct/skiplist/Makefile | 6 +++-- CodeSamples/defer/Makefile | 9 ++++--- 5 files changed, 40 insertions(+), 20 deletions(-)CodeSamples/datastruct/Issaquah/Makefile +4
-2@@ -45,10 +45,12 @@ GCC_ARGS += -fcommon # Verify by using the nm command and searching output for malloc. existence_test: existence.c existence_test.c - cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence.c existence_test.c -lpthread -lurcu treetorture: tree.c existence.c spinlockmult.c $(LIB)/random.c ../../api.h treetorture.h treetorturetrace.h $(LIB)/random.h existence.h tree.h - cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o treetorture tree.c existence.c spinlockmult.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/datastruct/existence/Makefile +20
-10@@ -44,39 +44,49 @@ all: $(PROGS) # So it is quite a bit easier to just use the default locations. ;-) existence_test: existence.h existence_test.c procon.h - cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_test existence_test.c -lpthread -lurcu existence_3hash_test: existence.h hash_exists.h keyvalue.h existence_3hash_test.c procon.h - cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_test existence_3hash_test.c -lpthread -lurcu existence_3hash_uperf: existence.h hash_exists.h keyvalue.h existence_3hash_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3hash_uperf existence_3hash_uperf.c -ltcmalloc -lpthread -lurcu existence_3skiplist_test: existence.h skiplist_exists.h keyvalue.h existence_3skiplist_test.c procon.h - cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o existence_3skiplist_test existence_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal existence_3skiplist_uperf: existence.h hash_exists.h keyvalue.h existence_3skiplist_uperf.c procon.h # cc -O0 -Wall -ggdb -fno-inline -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal - cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o existence_3skiplist_uperf existence_3skiplist_uperf.c -ltcmalloc $(LIB)/random.c -lpthread -lurcu kaleidoscope_test: kaleidoscope.h kaleidoscope_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_test kaleidoscope_test.c -lpthread -lurcu kaleidoscope_3hash_test: kaleidoscope.h hash_exists.h keyvalue.h kaleidoscope_3hash_test.c procon.h - cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o kaleidoscope_3hash_test kaleidoscope_3hash_test.c -lpthread -lurcu kaleidoscope_3skiplist_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_3skiplist_test.c procon.h - cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_3skiplist_test kaleidoscope_3skiplist_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal kaleidoscope_skiphash_test: kaleidoscope.h skiplist_exists.h keyvalue.h kaleidoscope_skiphash_test.c procon.h - cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc -g -O0 -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu # cc $(GCC_ARGS) -o kaleidoscope_skiphash_test kaleidoscope_skiphash_test.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal procon_test: procon.h procon_test.c - cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal || \ + cc -O0 -g -o procon_test procon_test.c -lpthread -lurcu # cc $(GCC_ARGS) -o procon_test procon_test.c -lpthread -lurcu -lurcu-signal clean:CodeSamples/datastruct/hash/Makefile +6
-3@@ -44,7 +44,8 @@ hash_bkt_qsbr: hash_bkt_rcu.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -DPERFBOOK_RCU_QSBR -o hash_bkt_qsbr hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-qsbr hash_bkt_rcu: hash_bkt_rcu.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_rcu hash_bkt_rcu.c $(LIB)/random.c -lpthread -lurcu hash_bkt_hazptr: hash_bkt_hazptr.c ../../defer/hazptr.c ../../defer/hazptr.h ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_bkt_hazptr hash_bkt_hazptr.c ../../defer/hazptr.c $(LIB)/random.c -lpthread@@ -53,10 +54,12 @@ hash_global: hash_global.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_global hash_global.c $(LIB)/random.c -lpthread hash_resize: hash_resize.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize hash_resize.c $(LIB)/random.c -lpthread -lurcu hash_resize_s: hash_resize_s.c ../../api.h hashtorture.h - cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_HASH -o hash_resize_s hash_resize_s.c $(LIB)/random.c -lpthread -lurcu hash_unsync: hash_unsync.c ../../api.h hashtorture.h cc $(GCC_ARGS) -DTEST_HASH -o hash_unsync hash_unsync.c $(LIB)/random.c -lpthreadCodeSamples/datastruct/skiplist/Makefile +4
-2@@ -33,10 +33,12 @@ endif include $(top)/recipes.mk skiplist: skiplist.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist skiplist.c $(LIB)/random.c -lpthread -lurcu skiplist_glock: skiplist_glock.c ../../api.h skiplisttorture.h skiplist.h - cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -DTEST_SKIPLIST -I $(LIB) -g -o skiplist_glock skiplist_glock.c $(LIB)/random.c -lpthread -lurcu clean: rm -f $(PROGS)CodeSamples/defer/Makefile +6
-3@@ -80,7 +80,8 @@ hazptr: hazptr.c hazptr.h ../api.h hazptrtorture.h cc $(GCC_ARGS) -o hazptr -DTEST hazptr.c -lpthread ptxroute: ptxroute.c ../api.h - cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o ptxroute ptxroute.c -lpthread -lurcu rcu: rcu.c rcu.h ../api.h rcutorture.h cc $(GCC_ARGS) -o rcu -DTEST rcu.c -lpthread@@ -131,7 +132,8 @@ route_hazptr: route_hazptr.c hazptr.c hazptr.h ../api.h ../lib/random.h ../lib/r cc $(GCC_ARGS) -o route_hazptr route_hazptr.c hazptr.c ../lib/random.c -lpthread route_rcu: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h - cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu route_rcu_qsbr: route_rcu.c ../api.h ../lib/random.h ../lib/random.c routetorture.h cc $(GCC_ARGS) -o route_rcu_qsbr -DDO_QSBR route_rcu.c ../lib/random.c -lpthread -lurcu-qsbr@@ -149,7 +151,8 @@ seqlocktorture: seqlocktorture.c seqlock.h ../api.h cc $(GCC_ARGS) -o seqlocktorture seqlocktorture.c -lpthread singleton: singleton.c ../api.h ../lib/random.h ../lib/random.c - cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu -lurcu-signal || \ + cc $(GCC_ARGS) -Wall -g -o singleton singleton.c ../lib/random.c -lpthread -lurcu clean: rm -f $(PROGS)base-commit:
4c0afec5a7081227adc768fb8d3fb35aa1981d55Signature · 1 line
2.34.1
Hi,
Leonardo Brás wrote:
[...]
Quoted 15 lines
Quoted 8 lines
Hi Akira,
That's a creative way of dealing with this issue, but if we want to add that complexity, I would rather use $(pkg-config --libs liburcu).
Wouldn't this fix the issue as well?
Thanks!
Also, according to Paul's comment on v2 patch it shouldn't be needed:
Quoted 3 lines
Quoted 3 lines
On the other hand,
sys_membarrier()was introduced in 2015 (5b25b13ab08f6), and no supported kernel (>v4.2) should still miss this syscall. Is it worth the added complexity? Is so, let's do it.
Quoted 8 lines
Quoted 5 lines
If the -lurcu-signal is left off for old versions of the userspace RCU library, doesn't it simply fall back to using explicit memory barriers? Or am I yet again misremembering?
Thanx, Paul
Isn't the above correct?
I have no idea ..., but your v2 patch causes this build error with liburcu <15.0:
------------------------------------------------------------------------
cc -g -O3 -Wall -fcommon -o route_rcu route_rcu.c ../lib/random.c -lpthread -lurcu/usr/bin/ld: /tmp/ccjHTQfN.o: warning: relocation against urcu_signal_gp' in read-only section .text'/usr/bin/ld: /tmp/ccjHTQfN.o: in function `_urcu_signal_read_lock':/usr/include/x86_64-linux-gnu/urcu/static/urcu-signal.h:97: undefined reference to `urcu_signal_reader'/usr/bin/ld: /tmp/ccjHTQfN.o: in function `_urcu_signal_read_lock_update':/usr/include/x86_64-linux-gnu/urcu/static/urcu-signal.h:75: undefined reference to `urcu_signal_gp'/usr/bin/ld: /tmp/ccjHTQfN.o: in function `urcu_common_wake_up_gp':/usr/include/x86_64-linux-gnu/urcu/static/urcu-common.h:96: undefined reference to `urcu_signal_gp'/usr/bin/ld: /usr/include/x86_64-linux-gnu/urcu/static/urcu-common.h:96: undefined reference to urcu_signal_gp' /usr/bin/ld: /usr/include/x86_64-linux-gnu/urcu/static/urcu-common.h:97: undefined reference to urcu_signal_gp' /usr/bin/ld: /tmp/ccjHTQfN.o: in function `futex':/usr/include/x86_64-linux-gnu/urcu/futex.h:72: undefined reference to `urcu_signal_gp'/usr/bin/ld: /tmp/ccjHTQfN.o:/usr/include/x86_64-linux-gnu/urcu/static/urcu-common.h:97: more undefined references to urcu_signal_gp' follow /usr/bin/ld: /tmp/ccjHTQfN.o: in function perftest_reader':git/perfbook/CodeSamples/defer/routetorture.h:103: undefined reference to `urcu_signal_register_thread'/usr/bin/ld: git/perfbook/CodeSamples/defer/routetorture.h:126: undefined reference to urcu_signal_synchronize_rcu' /usr/bin/ld: git/perfbook/CodeSamples/defer/routetorture.h:128: undefined reference to urcu_signal_synchronize_rcu' /usr/bin/ld: git/perfbook/CodeSamples/defer/routetorture.h:130: undefined reference to urcu_signal_unregister_thread' /usr/bin/ld: /tmp/ccjHTQfN.o: in function route_del':git/perfbook/CodeSamples/defer/route_rcu.c:124: undefined reference to `urcu_signal_call_rcu'/usr/bin/ld: /tmp/ccjHTQfN.o: in function `stresstest_updater':git/perfbook/CodeSamples/defer/routetorture.h:216: undefined reference to `urcu_signal_register_thread'/usr/bin/ld: git/perfbook/CodeSamples/defer/routetorture.h:260: undefined reference to urcu_signal_synchronize_rcu' /usr/bin/ld: git/perfbook/CodeSamples/defer/routetorture.h:262: undefined reference to urcu_signal_synchronize_rcu' /usr/bin/ld: git/perfbook/CodeSamples/defer/routetorture.h:264: undefined reference to urcu_signal_unregister_thread' /usr/bin/ld: /tmp/ccjHTQfN.o: in function route_clear':git/perfbook/CodeSamples/defer/route_rcu.c:149: undefined reference to `urcu_signal_synchronize_rcu'/usr/bin/ld: /tmp/ccjHTQfN.o: in function `smoketest':git/perfbook/CodeSamples/defer/routetorture.h:47: undefined reference to `urcu_signal_register_thread'/usr/bin/ld: git/perfbook/CodeSamples/defer/routetorture.h:62: undefined reference to `urcu_signal_unregister_thread' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:134: route_rcu] Error 1
make[1]: Leaving directory 'git/perfbook/CodeSamples/defer'
----------------------------------------------------------------
This is under Ubuntu 22.04 LTS.
This looks to me as an unacceptable build regression.
The use of $(pkg-config --libs liburcu) didn't occur to me.
I'll give it a try.
Thanks, Akira
Quoted 3 lines · Akira Yokosawa
The use of $(pkg-config --libs liburcu) didn't occur to me.
I'll give it a try.
On Ubuntu 22.04 LTS, "pkg-config --libs liburcu" returns:
-lurcu-common -lurcu
I don't know much about pkg-config, but is it possible to make the command return -lurcu-signal as well for liburcu <15.0 ?
Thanks, Akira
Quoted 68 lines · Akira Yokosawa
Hi,
Leonardo Brás wrote:
[...]Quoted 15 lines
Quoted 8 lines
Hi Akira,
That's a creative way of dealing with this issue, but if we want to add that complexity, I would rather use $(pkg-config --libs liburcu).
Wouldn't this fix the issue as well?
Thanks!
Also, according to Paul's comment on v2 patch it shouldn't be needed:
Quoted 3 lines
Quoted 3 lines
On the other hand,
sys_membarrier()was introduced in 2015 (5b25b13ab08f6), and no supported kernel (>v4.2) should still miss this syscall. Is it worth the added complexity? Is so, let's do it.Quoted 8 lines
Quoted 5 lines
If the -lurcu-signal is left off for old versions of the userspace RCU library, doesn't it simply fall back to using explicit memory barriers? Or am I yet again misremembering?
Thanx, Paul
Isn't the above correct?
I have no idea ..., but your v2 patch causes this build error with liburcu <15.0:
------------------------------------------------------------------------
cc -g -O3 -Wall -fcommon -oroute_rcuroute_rcu.c../lib/random.c-lpthread -lurcu/usr/bin/ld:/tmp/ccjHTQfN.o: warning: relocation againsturcu_signal_gp' in read-only section.text'/usr/bin/ld:/tmp/ccjHTQfN.o: in function `_urcu_signal_read_lock':/usr/include/x86_64-linux-gnu/urcu/static/urcu-signal.h:97: undefined reference to `urcu_signal_reader'/usr/bin/ld:/tmp/ccjHTQfN.o: in function `_urcu_signal_read_lock_update':/usr/include/x86_64-linux-gnu/urcu/static/urcu-signal.h:75: undefined reference to `urcu_signal_gp'/usr/bin/ld:/tmp/ccjHTQfN.o: in function `urcu_common_wake_up_gp':/usr/include/x86_64-linux-gnu/urcu/static/urcu-common.h:96: undefined reference to `urcu_signal_gp'/usr/bin/ld:/usr/include/x86_64-linux-gnu/urcu/static/urcu-common.h:96: undefined reference tourcu_signal_gp' /usr/bin/ld: /usr/include/x86_64-linux-gnu/urcu/static/urcu-common.h:97: undefined reference tourcu_signal_gp'/usr/bin/ld:/tmp/ccjHTQfN.o: in function `futex':/usr/include/x86_64-linux-gnu/urcu/futex.h:72: undefined reference to `urcu_signal_gp'/usr/bin/ld: /tmp/ccjHTQfN.o:/usr/include/x86_64-linux-gnu/urcu/static/urcu-common.h:97: more undefined references tourcu_signal_gp' follow /usr/bin/ld: /tmp/ccjHTQfN.o: in functionperftest_reader':git/perfbook/CodeSamples/defer/routetorture.h:103: undefined reference to `urcu_signal_register_thread'/usr/bin/ld:git/perfbook/CodeSamples/defer/routetorture.h:126: undefined reference tourcu_signal_synchronize_rcu' /usr/bin/ld: git/perfbook/CodeSamples/defer/routetorture.h:128: undefined reference tourcu_signal_synchronize_rcu'/usr/bin/ld:git/perfbook/CodeSamples/defer/routetorture.h:130: undefined reference tourcu_signal_unregister_thread' /usr/bin/ld: /tmp/ccjHTQfN.o: in functionroute_del':git/perfbook/CodeSamples/defer/route_rcu.c:124: undefined reference to `urcu_signal_call_rcu'/usr/bin/ld:/tmp/ccjHTQfN.o: in function `stresstest_updater':git/perfbook/CodeSamples/defer/routetorture.h:216: undefined reference to `urcu_signal_register_thread'/usr/bin/ld:git/perfbook/CodeSamples/defer/routetorture.h:260: undefined reference tourcu_signal_synchronize_rcu' /usr/bin/ld: git/perfbook/CodeSamples/defer/routetorture.h:262: undefined reference tourcu_signal_synchronize_rcu'/usr/bin/ld:git/perfbook/CodeSamples/defer/routetorture.h:264: undefined reference tourcu_signal_unregister_thread' /usr/bin/ld: /tmp/ccjHTQfN.o: in functionroute_clear':git/perfbook/CodeSamples/defer/route_rcu.c:149: undefined reference to `urcu_signal_synchronize_rcu'/usr/bin/ld:/tmp/ccjHTQfN.o: in function `smoketest':git/perfbook/CodeSamples/defer/routetorture.h:47: undefined reference to `urcu_signal_register_thread'/usr/bin/ld:git/perfbook/CodeSamples/defer/routetorture.h:62: undefined reference to `urcu_signal_unregister_thread'/usr/bin/ld: warning: creatingDT_TEXTRELin a PIE
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:134:route_rcu] Error 1
make[1]: Leaving directory 'git/perfbook/CodeSamples/defer'
----------------------------------------------------------------
Quoted 3 lines
This is under Ubuntu 22.04 LTS.
This looks to me as an unacceptable build regression.
Oh, thanks for helping me understand. I thought previously that this would only hit kernels without sys_membarrier() support, but now I get this triggers a build error, which makes sense.
Out of curiosity, I did a new version that should take care of this. I will send it as a v4, so please give it a test.
Quoted 7 lines
The use of $(pkg-config --libs liburcu) didn't occur to me.
I'll give it a try.
Thanks, Akira