libtracecmd: Add -lpthread to build libtracecmd
PATCH 1/1 libtracecmd: Add -lpthread to build libtracecmd
From: "Steven Rostedt (VMware)" <[email protected]>
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.
--- lib/trace-cmd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/trace-cmd/Makefile +1 -1
@@ -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) $@
Signature · 1 line
2.29.2