linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libtracecmd: Add -lpthread to build libtracecmd
@ 2021-04-09  0:50 Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2021-04-09  0:50 UTC (permalink / raw)
  To: linux-trace-devel@vger.kernel.org

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-09  0:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-09  0:50 [PATCH] libtracecmd: Add -lpthread to build libtracecmd Steven Rostedt

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).