Linux-Trace-Devel Archive on lore.kernel.org
 help / color / 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
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 index

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

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git