Linux-Trace-Devel Archive on
 help / color / Atom feed
From: "Yordan Karadzhov (VMware)" <>
	"Yordan Karadzhov (VMware)" <>,
	Ziqian SUN <>
Subject: [PATCH 4/4] kernel-shark: Fix dependency (symbol resolving) issue
Date: Wed, 16 Sep 2020 09:50:07 +0300
Message-ID: <> (raw)
In-Reply-To: <>

When linking KernelShark libraries we must take into account the
intrinsic dependency hierarchy of the trace-cmd libraries.
"libtraceevent" is the most basic one. "libtracefs" depends on
"libtraceevent" and "libtracecmd" depends on both "libtraceevent"
and "libtracefs". In order to guarantee a correct symbol resolution
during linking, those libraries must be listed in a reverse order
(the most basic comes last).

Reported-by: Ziqian SUN (Zamir) <>
Signed-off-by: Yordan Karadzhov (VMware) <>
 kernel-shark/src/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
index 9666b18..0627783 100644
--- a/kernel-shark/src/CMakeLists.txt
+++ b/kernel-shark/src/CMakeLists.txt
@@ -7,10 +7,10 @@ add_library(kshark SHARED libkshark.c
-target_link_libraries(kshark ${TRACEEVENT_LIBRARY}
-                             ${TRACECMD_LIBRARY}
+target_link_libraries(kshark ${TRACECMD_LIBRARY}
-                             ${JSONC_LIBRARY}
+                             ${TRACEEVENT_LIBRARY}
+			     ${JSONC_LIBRARY}
 set_target_properties(kshark  PROPERTIES SUFFIX	".so.${KS_VERSION_STRING}")

  parent reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16  6:50 [PATCH 1/4] kernel-shark :Fix all build warnings for gcc 10.2.1 Yordan Karadzhov (VMware)
2020-09-16  6:50 ` [PATCH 2/4] kernel-shark: Have correct screen geometry on high-resolution screens Yordan Karadzhov (VMware)
2020-09-16  6:50 ` [PATCH 3/4] kernel-shark: Check if Qt has been found when building the examples Yordan Karadzhov (VMware)
2020-09-16  6:50 ` Yordan Karadzhov (VMware) [this message]
2020-09-29 21:05 ` [PATCH 1/4] kernel-shark :Fix all build warnings for gcc 10.2.1 Steven Rostedt
2020-09-30 13:55   ` Yordan Karadzhov (VMware)
2020-09-30 14:03     ` 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:

* 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