From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YNBGKbQ/MGC/eAAAWB0awg (envelope-from ) for ; Fri, 19 Feb 2021 17:46:12 -0500 Received: by simark.ca (Postfix, from userid 112) id 955111EF78; Fri, 19 Feb 2021 17:46:12 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,T_KAM_HTML_FONT_INVALID, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 45E2E1EE39 for ; Fri, 19 Feb 2021 17:46:11 -0500 (EST) Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4Dj6BB4rThz2xc; Fri, 19 Feb 2021 17:46:10 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1613774770; bh=NhPFPFJ/QeGgGuGb6LgChZg1dPh1ZJHCGNLKsygqctU=; h=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=AzVcmB/UqbJq+r5EWKj8FptOasXgglVE+AHe7Qra4ycZdn9cvuRV9YxACN/9zvIeJ tdi9LppgakvbTGRg6pW80FzHfWwqL6JMRtdjhtMX4idaiUWLXvGJqkoG2CLAT12Vy7 GFOFfSD3VJK2XSKuItfiA2CxzhFgQq2UcCpY2hPivGxoAbhUUfc2pwPso+7zVFxLz0 ZbJWThG7Dfd8h2gDQbBbrZF9nhfZ0wLlB9KC9+5HoKH2ZubTGNjDLMJfNjH3b/bgBB oqee78LjfHOc4pH352gZ0Ew0t+iQgK+HypQ4PbbQbh3hzj8TDu8WHCBjBjUiWeS6U3 IDmSxWPNXDh8g== Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lists.lttng.org (Postfix) with ESMTPS id 4Dj6B92bmRz2xb for ; Fri, 19 Feb 2021 17:46:09 -0500 (EST) Received: by mail-pg1-x529.google.com with SMTP id b21so6000344pgk.7 for ; Fri, 19 Feb 2021 14:46:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=52ALP2r924gZbSIb37FOGwZ91Qhaq6ngiQqSuIvBKrQ=; b=R78fYHxETxYsXPGpZTcNWOQfShD32RRgFYJjaNlWbEfzgH1OQBpCn4ztWnLq1f5oBm SxRKDJHiaPTd41Us1XjE/1EEjElbK/rFtsADRD+ZmvpzC5jX9CRVRH7AO/w62Q1soQfx 4n/6yce8tlQIjB0GXQNsT/BFTXsf5MNW7Oc+3hwGWeANkK3Txkt8PsZpiAPy1Z+s/h+l o8v1Fw1iNldIkZlqKkOuMc1TEdLDj5fK6raydYkPttspBH/SRzkKz4WBapW4oXAF5Fdy xdf3d6mljCrvCK1AuGxa/Vbtk87hF27BcsC3ITqPCiLsz1IRAqmkUVWXmvWEeNSEIE3W ukCw== X-Gm-Message-State: AOAM532SdMmZgffgtAxNX6yGLtHis4j882CGocpgYqgcDxPbMOfSfbyo Z5YsL+jvkYqzzMRNgq4KyokpXSWfE2dy5W/Qtps= X-Google-Smtp-Source: ABdhPJyO9HflF6rsYCC9Wd22hefdH28aHnIev+MgwcSpcnMQMpjf65WWU7ltF3LpzLLwctjvYGdqRBrmvlEIvnnxeBk= X-Received: by 2002:a65:47cc:: with SMTP id f12mr9445139pgs.305.1613774768042; Fri, 19 Feb 2021 14:46:08 -0800 (PST) MIME-Version: 1.0 References: <846525289.26662.1613658859303.JavaMail.zimbra@efficios.com> <1530611207.28274.1613762411148.JavaMail.zimbra@efficios.com> In-Reply-To: <1530611207.28274.1613762411148.JavaMail.zimbra@efficios.com> Date: Fri, 19 Feb 2021 22:45:43 +0000 Message-ID: To: Mathieu Desnoyers Subject: Re: [lttng-dev] userspace-rcu 0.12.2: build fails X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?Tomasz_K=C5=82oczko_via_lttng-dev?= Reply-To: =?UTF-8?Q?Tomasz_K=C5=82oczko?= Cc: lttng-dev Content-Type: multipart/mixed; boundary="===============6425487541814789592==" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" --===============6425487541814789592== Content-Type: multipart/alternative; boundary="000000000000cbf57c05bbb8371a" --000000000000cbf57c05bbb8371a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 19 Feb 2021 at 19:20, Mathieu Desnoyers < mathieu.desnoyers@efficios.com> wrote: [..] > Good to know. This does not provide any clarification on your build > environment > though (see my request above). Therefore we cannot attempt to reproduce o= n > our side yet. > I'm building on top of my own distribution which is quite close to fedora rawhide (with tons of fixes) however before starting actual build I'm regenerating all ac/am/lt files using "autoreconf -fiv" because I'm patching configiure.ac and some Makefile.am files. I need that because 1.2.2 has underlinkig issues. Here is the patch which fixes underlinking: ``` --- a/src/Makefile.am~ 2021-02-17 19:52:04.000000000 +0000 +++ b/src/Makefile.am 2021-02-18 01:19:04.366349148 +0000 @@ -34,7 +34,7 @@ liburcu_la_SOURCES =3D urcu.c urcu-pointer.c $(COMPAT) liburcu_la_CFLAGS =3D -DRCU_MEMBARRIER $(AM_CFLAGS) -liburcu_la_LIBADD =3D liburcu-common.la +liburcu_la_LIBADD =3D liburcu-common.la $(PTHREAD_LIBS) liburcu_memb_la_SOURCES =3D urcu.c urcu-pointer.c $(COMPAT) liburcu_memb_la_CFLAGS =3D -DRCU_MEMBARRIER $(AM_CFLAGS) @@ -42,22 +42,22 @@ liburcu_qsbr_la_SOURCES =3D urcu-qsbr.c urcu-pointer.c $(COMPAT) liburcu_qsbr_la_CFLAGS =3D -DRCU_QSBR $(AM_CFLAGS) -liburcu_qsbr_la_LIBADD =3D liburcu-common.la +liburcu_qsbr_la_LIBADD =3D liburcu-common.la $(PTHREAD_LIBS) liburcu_mb_la_SOURCES =3D urcu.c urcu-pointer.c $(COMPAT) liburcu_mb_la_CFLAGS =3D -DRCU_MB $(AM_CFLAGS) -liburcu_mb_la_LIBADD =3D liburcu-common.la +liburcu_mb_la_LIBADD =3D liburcu-common.la $(PTHREAD_LIBS) liburcu_signal_la_SOURCES =3D urcu.c urcu-pointer.c $(COMPAT) liburcu_signal_la_CFLAGS =3D -DRCU_SIGNAL $(AM_CFLAGS) -liburcu_signal_la_LIBADD =3D liburcu-common.la +liburcu_signal_la_LIBADD =3D liburcu-common.la $(PTHREAD_LIBS) liburcu_bp_la_SOURCES =3D urcu-bp.c urcu-pointer.c $(COMPAT) -liburcu_bp_la_LIBADD =3D liburcu-common.la +liburcu_bp_la_LIBADD =3D liburcu-common.la $(PTHREAD_LIBS) liburcu_cds_la_SOURCES =3D rculfqueue.c rculfstack.c lfstack.c \ workqueue.c workqueue.h $(RCULFHASH) $(COMPAT) -liburcu_cds_la_LIBADD =3D liburcu-common.la +liburcu_cds_la_LIBADD =3D liburcu-common.la $(PTHREAD_LIBS) pkgconfigdir =3D $(libdir)/pkgconfig pkgconfig_DATA =3D liburcu-cds.pc liburcu.pc liburcu-bp.pc liburcu-qsbr.pc= \ ``` Without that patch build fails on: ``` make[5]: Entering directory '/home/tkloczko/rpmbuild/BUILD/userspace-rcu-0.12.2/doc/examples/hlist' + /usr/bin/gcc -g -O2 -Wall -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTIO= NS -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=3Dauto -flto-partition=3Dnone -L../../../src/.libs/ -Wl,-rpath /home/tkloczko/rpmbuild/BUILD/userspace-rcu-0.12.2/doc/examples/../../src/.= libs/ -Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=3D/usr/lib/rpm/redhat/redhat-hardened-ld -flto=3Dauto -flto-partition=3Dnone -fuse-linker-plugin -o cds_hlist_add_head_rcu cds_hlist_add_head_rcu.o -lurcu /usr/bin/ld: ../../../src/.libs//liburcu.so: undefined reference to `pthread_join' /usr/bin/ld: ../../../src/.libs//liburcu.so: undefined reference to `pthread_create' collect2: error: ld returned 1 exit status ``` I must apologise. I made small mistake in my other patch which removes from configiure.ac amd all Makefile.am files hadcoding all -W and -g flags (I want to control such things completely from outside the build framework over CFLAGS and other env variables). After fixing that patch looks like 1.2.2 builds correctly however that underlinking issue is real. One more time sorry .. kind of my fault :/ kloczek --=20 Tomasz K=C5=82oczko | LinkedIn: http://lnkd.in/FXPWxH --000000000000cbf57c05bbb8371a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, 19 Feb 2021 at 19:20, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>= wrote:
[..]
Good to know. This does not provide a= ny clarification on your build environment
though (see my request above). Therefore we cannot attempt to reproduce on = our side yet.

I'm building on top of my own = distribution which is quite close to fedora rawhide (with tons of fixes) ho= wever before starting actual build I'm regenerating all ac/am/lt files = using "autoreconf -fiv" because I'm patching configiure.ac and some Makefile.am files.
I need that= because 1.2.2 has underlinkig issues.
Here is the patch which=C2=A0fixes = underlinking:
```
--- a/src/Makefile.am~ =C2=A02021-02-17 19:52:04.000000= 000 +0000
+++ b/src/Makefile.am =C2=A0 2021-02-18 01:19:04.366349148 +00= 00
@@ -34,7 +34,7 @@

=C2=A0liburcu_la_SOURCES =3D urcu.c urcu-poi= nter.c $(COMPAT)
=C2=A0liburcu_la_CFLAGS =3D -DRCU_MEMBARRIER $(AM_CFLAG= S)
-liburcu_la_LIBADD =3D liburcu-c= ommon.la
+liburcu_la_LIBADD =3D liburcu-common.la $(PTHREAD_LIBS)

=C2=A0liburcu_memb_la_SOURCES= =3D urcu.c urcu-pointer.c $(COMPAT)
=C2=A0liburcu_memb_la_CFLAGS =3D -D= RCU_MEMBARRIER $(AM_CFLAGS)
@@ -42,22 +42,22 @@

=C2=A0liburcu_qsb= r_la_SOURCES =3D urcu-qsbr.c urcu-pointer.c $(COMPAT)
=C2=A0liburcu_qsbr= _la_CFLAGS =3D -DRCU_QSBR $(AM_CFLAGS)
-liburcu_qsbr_la_LIBADD =3D liburcu-common.la
+liburcu_qsbr_la_L= IBADD =3D liburcu-common.la $(PTHR= EAD_LIBS)

=C2=A0liburcu_mb_la_SOURCES =3D urcu.c urcu-pointer.c $(CO= MPAT)
=C2=A0liburcu_mb_la_CFLAGS =3D -DRCU_MB $(AM_CFLAGS)
-liburcu_m= b_la_LIBADD =3D liburcu-common.la<= br>+liburcu_mb_la_LIBADD =3D liburcu-c= ommon.la $(PTHREAD_LIBS)

=C2=A0liburcu_signal_la_SOURCES =3D urc= u.c urcu-pointer.c $(COMPAT)
=C2=A0liburcu_signal_la_CFLAGS =3D -DRCU_SI= GNAL $(AM_CFLAGS)
-liburcu_signal_la_LIBADD =3D liburcu-common.la
+liburcu_signal_la_LIBADD =3D liburcu-common.la $(PTHREAD_LIBS)

= =C2=A0liburcu_bp_la_SOURCES =3D urcu-bp.c urcu-pointer.c $(COMPAT)
-libu= rcu_bp_la_LIBADD =3D liburcu-common.la=
+liburcu_bp_la_LIBADD =3D libu= rcu-common.la $(PTHREAD_LIBS)

=C2=A0liburcu_cds_la_SOURCES =3D r= culfqueue.c rculfstack.c lfstack.c \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 workque= ue.c workqueue.h $(RCULFHASH) $(COMPAT)
-liburcu_cds_la_LIBADD =3D liburcu-common.la
+liburcu_cds_la_LI= BADD =3D liburcu-common.la $(PTHRE= AD_LIBS)

=C2=A0pkgconfigdir =3D $(libdir)/pkgconfig
=C2=A0pkgconf= ig_DATA =3D liburcu-cds.pc liburcu.pc liburcu-bp.pc liburcu-qsbr.pc \
= ```
Without that patch build fails on:
```
make[5]: Entering directory &= #39;/home/tkloczko/rpmbuild/BUILD/userspace-rcu-0.12.2/doc/examples/hlist&#= 39;
+ /usr/bin/gcc -g -O2 -Wall -O2 -g -grecord-gcc-switches -pipe -Wall= -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTI= ONS -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-stro= ng -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric -f= asynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-= sections -ffunction-sections -flto=3Dauto -flto-partition=3Dnone -L../../..= /src/.libs/ -Wl,-rpath /home/tkloczko/rpmbuild/BUILD/userspace-rcu-0.12.2/d= oc/examples/../../src/.libs/ -Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections= -Wl,-z,now -specs=3D/usr/lib/rpm/redhat/redhat-hardened-ld -flto=3Dauto -f= lto-partition=3Dnone -fuse-linker-plugin -o cds_hlist_add_head_rcu cds_hlis= t_add_head_rcu.o -lurcu
/usr/bin/ld: ../../../src/.libs//liburcu.so: und= efined reference to `pthread_join'
/usr/bin/ld: ../../../src/.libs//= liburcu.so: undefined reference to `pthread_create'
collect2: error:= ld returned 1 exit status
```

I must apologise. I made small m= istake in my other patch which removes from configiure.ac amd all Makefile.am files hadcoding=C2=A0all -W<foo&= gt; and -g flags (I want to control=C2=A0such things completely=C2=A0from o= utside the build framework over CFLAGS and other=C2=A0env variables).
=

=
After fixing that patch looks like 1.2.2 builds correctly however that un= derlinking issue is real.

One more time sorry .. kind of my fault :/=

kloczek
--=C2=A0
Tomasz K=C5=82oczko | LinkedIn:=C2=A0http://lnkd.in/= FXPWxH
--000000000000cbf57c05bbb8371a-- --===============6425487541814789592== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev --===============6425487541814789592==--