From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: linux-trace-devel@vger.kernel.org
Cc: rostedt@goodmis.org,
"Yordan Karadzhov (VMware)" <y.karadz@gmail.com>,
Ziqian SUN <sztsian@gmail.com>
Subject: [PATCH 4/4] kernel-shark: Fix dependency (symbol resolving) issue
Date: Wed, 16 Sep 2020 09:50:07 +0300 [thread overview]
Message-ID: <20200916065007.9755-4-y.karadz@gmail.com> (raw)
In-Reply-To: <20200916065007.9755-1-y.karadz@gmail.com>
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) <sztsian@gmail.com>
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
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
libkshark-configio.c
libkshark-collection.c)
-target_link_libraries(kshark ${TRACEEVENT_LIBRARY}
- ${TRACECMD_LIBRARY}
+target_link_libraries(kshark ${TRACECMD_LIBRARY}
${TRACEFS_LIBRARY}
- ${JSONC_LIBRARY}
+ ${TRACEEVENT_LIBRARY}
+ ${JSONC_LIBRARY}
${CMAKE_DL_LIBS})
set_target_properties(kshark PROPERTIES SUFFIX ".so.${KS_VERSION_STRING}")
--
2.26.2
next prev parent reply other threads:[~2020-09-16 6:50 UTC|newest]
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:
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=20200916065007.9755-4-y.karadz@gmail.com \
--to=y.karadz@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sztsian@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.