linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org,
	"Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Subject: [PATCH v2 3/3] kernel-shark: Fix symbol resolving during linking
Date: Wed, 30 Sep 2020 18:07:41 +0300	[thread overview]
Message-ID: <20200930150741.224779-3-y.karadz@gmail.com> (raw)
In-Reply-To: <20200930150741.224779-1-y.karadz@gmail.com>

libtraceevent is the basic library. libtracefs depends on libtraceevent
and libtracecmd depends on both libtracefs and libtraceevent. Having
this in mind, we need to properly order those 3 libraries when linking
the basic library of the KernelShark API (libkshark).

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 src/CMakeLists.txt | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9666b18..457c100 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,9 +7,9 @@ add_library(kshark SHARED libkshark.c
                           libkshark-configio.c
                           libkshark-collection.c)
 
-target_link_libraries(kshark ${TRACEEVENT_LIBRARY}
-                             ${TRACECMD_LIBRARY}
+target_link_libraries(kshark ${TRACECMD_LIBRARY}
                              ${TRACEFS_LIBRARY}
+                             ${TRACEEVENT_LIBRARY}
                              ${JSONC_LIBRARY}
                              ${CMAKE_DL_LIBS})
 
@@ -67,11 +67,8 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
 
     target_link_libraries(kshark-gui kshark-plot
                                      Qt5::Widgets
-                                     Qt5::Network
-                                     ${TRACEEVENT_LIBRARY}
-                                     ${TRACECMD_LIBRARY}
-                                     ${TRACEFS_LIBRARY}
-                                     ${CMAKE_DL_LIBS})
+                                     Qt5::Network)
+
 
     set_target_properties(kshark-gui PROPERTIES  SUFFIX ".so.${KS_VERSION_STRING}")
 
-- 
2.25.1


      parent reply	other threads:[~2020-09-30 15:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 15:07 [PATCH v2 1/3] kernel-shark: Fix all warnings showing when bulding with gcc 10.2.1 Yordan Karadzhov (VMware)
2020-09-30 15:07 ` [PATCH v2 2/3] kernel-shark: Check if Qt has been found when building the examples Yordan Karadzhov (VMware)
2020-09-30 15:07 ` Yordan Karadzhov (VMware) [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=20200930150741.224779-3-y.karadz@gmail.com \
    --to=y.karadz@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.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).