Linux-Trace-Devel Archive on
 help / color / Atom feed
From: "Yordan Karadzhov (VMware)" <>
	"Yordan Karadzhov (VMware)" <>
Subject: [PATCH v2 3/3] kernel-shark: Fix symbol resolving during linking
Date: Wed, 30 Sep 2020 18:07:41 +0300
Message-ID: <> (raw)
In-Reply-To: <>

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) <>
 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
-target_link_libraries(kshark ${TRACEEVENT_LIBRARY}
-                             ${TRACECMD_LIBRARY}
+target_link_libraries(kshark ${TRACECMD_LIBRARY}
+                             ${TRACEEVENT_LIBRARY}
@@ -67,11 +67,8 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
     target_link_libraries(kshark-gui kshark-plot
-                                     Qt5::Network
-                                     ${TRACEEVENT_LIBRARY}
-                                     ${TRACECMD_LIBRARY}
-                                     ${TRACEFS_LIBRARY}
-                                     ${CMAKE_DL_LIBS})
+                                     Qt5::Network)
     set_target_properties(kshark-gui PROPERTIES  SUFFIX ".so.${KS_VERSION_STRING}")

      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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Trace-Devel Archive on

Archives are clonable:
	git clone --mirror 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/ \
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone