linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Subject: [PATCH v2 4/5] trace-cmd: Have libtracecmd.so include libtraceevent
Date: Wed, 22 Jan 2020 12:22:51 -0500	[thread overview]
Message-ID: <20200122172410.631593595@goodmis.org> (raw)
In-Reply-To: 20200122172247.539894616@goodmis.org

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

Was getting errors with loading libtracecmd.so with undefined symbols
from libtraceevent. Add it to the build process to include what it uses
as well.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Makefile               | 2 +-
 lib/trace-cmd/Makefile | 2 ++
 scripts/utils.mk       | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index c22aa7847b51..9c74268eddd5 100644
--- a/Makefile
+++ b/Makefile
@@ -301,7 +301,7 @@ $(LIBTRACEEVENT_STATIC): force $(obj)/lib/traceevent/plugins/trace_python_dir \
 $(LIBTRACECMD_STATIC): force
 	$(Q)$(MAKE) -C $(src)/lib/trace-cmd $@
 
-$(LIBTRACECMD_SHARED): force
+$(LIBTRACECMD_SHARED): force $(LIBTRACEEVENT_SHARED)
 	$(Q)$(MAKE) -C $(src)/lib/trace-cmd $@
 
 libtraceevent.so: $(LIBTRACEEVENT_SHARED)
diff --git a/lib/trace-cmd/Makefile b/lib/trace-cmd/Makefile
index 6f3e6b1bf935..29c36ca195d0 100644
--- a/lib/trace-cmd/Makefile
+++ b/lib/trace-cmd/Makefile
@@ -35,6 +35,8 @@ $(DEPS): | $(bdir)
 $(bdir)/libtracecmd.a: $(OBJS)
 	$(Q)$(call do_build_static_lib)
 
+LIBS = -L$(obj)/lib/traceevent -ltraceevent
+
 $(bdir)/libtracecmd.so: $(OBJS)
 	$(Q)$(call do_compile_shared_library)
 
diff --git a/scripts/utils.mk b/scripts/utils.mk
index 8434aea7c24f..ccd4840f9364 100644
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -61,7 +61,7 @@ do_build_static_lib =				\
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
-	$(CC) --shared $^ -Wl,-soname,$(@F) -o $@)
+	$(CC) --shared $^ $(LIBS) -Wl,-soname,$(@F) -o $@)
 
 do_compile_plugin_obj =				\
 	($(print_plugin_obj_compile)		\
-- 
2.24.1



  parent reply	other threads:[~2020-01-22 17:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22 17:22 [PATCH v2 0/5] trace-cmd: A few udpates Steven Rostedt
2020-01-22 17:22 ` [PATCH v2 1/5] trace-cmd: Create TRACECMD_MAGIC macro for magic number of trace-cmd data file Steven Rostedt
2020-01-22 17:22 ` [PATCH v2 2/5] trace-cmd: Place "trace.dat" into the macro DEFAULT_INPUT_FILE Steven Rostedt
2020-01-22 17:22 ` [PATCH v2 3/5] trace-cmd: Add installation of ld.conf.d file for library paths Steven Rostedt
2020-01-22 17:22 ` Steven Rostedt [this message]
2020-01-22 17:22 ` [PATCH v2 5/5] trace-cmd: Remove unused trace_util function declarations Steven Rostedt

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=20200122172410.631593595@goodmis.org \
    --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).