From: Steven Rostedt <rostedt@goodmis.org>
To: "linux-trace-devel@vger.kernel.org" <linux-trace-devel@vger.kernel.org>
Subject: [PATCH] libtracecmd: Add -lpthread to build libtracecmd
Date: Thu, 8 Apr 2021 20:50:37 -0400 [thread overview]
Message-ID: <20210408205037.4f871cda@oasis.local.home> (raw)
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
On Debian, the following error occurred on installing the library.
/usr/bin/ld: /usr/local/lib64/libtracecmd.so: undefined reference to `pthread_barrier_init'
/usr/bin/ld: /usr/local/lib64/libtracecmd.so: undefined reference to `pthread_barrier_wait'
/usr/bin/ld: /usr/local/lib64/libtracecmd.so: undefined reference to `pthread_join'
/usr/bin/ld: /usr/local/lib64/libtracecmd.so: undefined reference to `pthread_getaffinity_np'
/usr/bin/ld: /usr/local/lib64/libtracecmd.so: undefined reference to `pthread_create'
/usr/bin/ld: /usr/local/lib64/libtracecmd.so: undefined reference to `pthread_barrier_destroy'
/usr/bin/ld: /usr/local/lib64/libtracecmd.so: undefined reference to `pthread_setaffinity_np'
collect2: error: ld returned 1 exit status
Include -lpthread to libtracecmd to allow it to use the pthread functions.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
lib/trace-cmd/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/trace-cmd/Makefile b/lib/trace-cmd/Makefile
index afd74e1d..9bba5a21 100644
--- a/lib/trace-cmd/Makefile
+++ b/lib/trace-cmd/Makefile
@@ -44,7 +44,7 @@ $(DEPS): | $(bdir)
$(LIBTRACECMD_STATIC): $(OBJS)
$(Q)$(call do_build_static_lib)
-LIBS = $(LIBTRACEEVENT_LDLAGS) $(LIBTRACEFS_LDLAGS)
+LIBS = $(LIBTRACEEVENT_LDLAGS) $(LIBTRACEFS_LDLAGS) -lpthread
$(LIBTRACECMD_SHARED_VERSION): $(LIBTRACECMD_SHARED)
@ln -sf $(<F) $@
--
2.29.2
reply other threads:[~2021-04-09 0:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210408205037.4f871cda@oasis.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).