Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: "Tomasz Kłoczko via lttng-dev" <lttng-dev@lists.lttng.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: lttng-dev <lttng-dev@lists.lttng.org>
Subject: Re: [lttng-dev] userspace-rcu 0.12.2: build fails
Date: Fri, 19 Feb 2021 22:45:43 +0000	[thread overview]
Message-ID: <CABB28CxNRFk2tDkNUjCFaeOxDUyp=m-FOtvekTzmvG7LguxeRQ@mail.gmail.com> (raw)
In-Reply-To: <1530611207.28274.1613762411148.JavaMail.zimbra@efficios.com>


[-- Attachment #1.1: Type: text/plain, Size: 3923 bytes --]

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 on
> 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 = urcu.c urcu-pointer.c $(COMPAT)
 liburcu_la_CFLAGS = -DRCU_MEMBARRIER $(AM_CFLAGS)
-liburcu_la_LIBADD = liburcu-common.la
+liburcu_la_LIBADD = liburcu-common.la $(PTHREAD_LIBS)

 liburcu_memb_la_SOURCES = urcu.c urcu-pointer.c $(COMPAT)
 liburcu_memb_la_CFLAGS = -DRCU_MEMBARRIER $(AM_CFLAGS)
@@ -42,22 +42,22 @@

 liburcu_qsbr_la_SOURCES = urcu-qsbr.c urcu-pointer.c $(COMPAT)
 liburcu_qsbr_la_CFLAGS = -DRCU_QSBR $(AM_CFLAGS)
-liburcu_qsbr_la_LIBADD = liburcu-common.la
+liburcu_qsbr_la_LIBADD = liburcu-common.la $(PTHREAD_LIBS)

 liburcu_mb_la_SOURCES = urcu.c urcu-pointer.c $(COMPAT)
 liburcu_mb_la_CFLAGS = -DRCU_MB $(AM_CFLAGS)
-liburcu_mb_la_LIBADD = liburcu-common.la
+liburcu_mb_la_LIBADD = liburcu-common.la $(PTHREAD_LIBS)

 liburcu_signal_la_SOURCES = urcu.c urcu-pointer.c $(COMPAT)
 liburcu_signal_la_CFLAGS = -DRCU_SIGNAL $(AM_CFLAGS)
-liburcu_signal_la_LIBADD = liburcu-common.la
+liburcu_signal_la_LIBADD = liburcu-common.la $(PTHREAD_LIBS)

 liburcu_bp_la_SOURCES = urcu-bp.c urcu-pointer.c $(COMPAT)
-liburcu_bp_la_LIBADD = liburcu-common.la
+liburcu_bp_la_LIBADD = liburcu-common.la $(PTHREAD_LIBS)

 liburcu_cds_la_SOURCES = rculfqueue.c rculfstack.c lfstack.c \
        workqueue.c workqueue.h $(RCULFHASH) $(COMPAT)
-liburcu_cds_la_LIBADD = liburcu-common.la
+liburcu_cds_la_LIBADD = liburcu-common.la $(PTHREAD_LIBS)

 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = 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=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
-fdata-sections -ffunction-sections -flto=auto -flto-partition=none
-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=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto
-flto-partition=none -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<foo> 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
-- 
Tomasz Kłoczko | LinkedIn: http://lnkd.in/FXPWxH

[-- Attachment #1.2: Type: text/html, Size: 6807 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

      reply	other threads:[~2021-02-19 22:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18  1:36 Tomasz Kłoczko via lttng-dev
     [not found] ` <CABB28Cxfnmj7FyRTRJdgOJJ6UdSmf8Nd7ZeDt2CF_7FQMQhsVA@mail.gmail.com>
2021-02-18 14:34   ` Mathieu Desnoyers via lttng-dev
2021-02-19 18:39     ` Tomasz Kłoczko via lttng-dev
2021-02-19 19:20       ` Mathieu Desnoyers via lttng-dev
2021-02-19 22:45         ` Tomasz Kłoczko via lttng-dev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABB28CxNRFk2tDkNUjCFaeOxDUyp=m-FOtvekTzmvG7LguxeRQ@mail.gmail.com' \
    --to=lttng-dev@lists.lttng.org \
    --cc=kloczko.tomasz@gmail.com \
    --cc=mathieu.desnoyers@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox