* [PATCH 1/5] kernel-shark: Silence a warning from 'cmake_clean.sh'
@ 2021-11-10 14:37 Yordan Karadzhov (VMware)
2021-11-10 14:37 ` [PATCH 2/5] kernel-shark: Fix a warning from 'KsUtils.cpp' Yordan Karadzhov (VMware)
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Yordan Karadzhov (VMware) @ 2021-11-10 14:37 UTC (permalink / raw)
To: linux-trace-devel; +Cc: Yordan Karadzhov (VMware)
The file 'CTestTestfile.cmake' may not exist if the CI tests were
never executed.
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
build/cmake_clean.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/cmake_clean.sh b/build/cmake_clean.sh
index d645c32..8defa67 100755
--- a/build/cmake_clean.sh
+++ b/build/cmake_clean.sh
@@ -2,7 +2,7 @@ make clean
rm CMakeCache.txt
rm cmake_install.cmake
rm Makefile
-rm CTestTestfile.cmake
+rm -f CTestTestfile.cmake
rm -f DartConfiguration.tcl
rm -rf CMakeFiles/
rm -rf src/
--
2.33.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/5] kernel-shark: Fix a warning from 'KsUtils.cpp'
2021-11-10 14:37 [PATCH 1/5] kernel-shark: Silence a warning from 'cmake_clean.sh' Yordan Karadzhov (VMware)
@ 2021-11-10 14:37 ` Yordan Karadzhov (VMware)
2021-11-10 14:37 ` [PATCH 3/5] kernel-shark: Update the README file Yordan Karadzhov (VMware)
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Yordan Karadzhov (VMware) @ 2021-11-10 14:37 UTC (permalink / raw)
To: linux-trace-devel; +Cc: Yordan Karadzhov (VMware)
gcc 11.2.1 prints the following warning:
KsUtils.cpp:573:41: warning: loop variable 'task' creates a copy from
type 'const QString' [-Wrange-loop-construct]
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
src/KsUtils.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/KsUtils.cpp b/src/KsUtils.cpp
index 364c25d..a22c445 100644
--- a/src/KsUtils.cpp
+++ b/src/KsUtils.cpp
@@ -570,7 +570,7 @@ QMap<int, QVector<int>> parseTaskList(QString v_str)
if (name.isEmpty())
continue;
- for (auto const task: taskList) {
+ for (auto const &task: taskList) {
if(name == task)
ret[sd].append(pid);
}
--
2.33.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/5] kernel-shark: Update the README file
2021-11-10 14:37 [PATCH 1/5] kernel-shark: Silence a warning from 'cmake_clean.sh' Yordan Karadzhov (VMware)
2021-11-10 14:37 ` [PATCH 2/5] kernel-shark: Fix a warning from 'KsUtils.cpp' Yordan Karadzhov (VMware)
@ 2021-11-10 14:37 ` Yordan Karadzhov (VMware)
2021-11-10 14:37 ` [PATCH 4/5] kernel-shark: Add 'Requires' to libkshark.pc Yordan Karadzhov (VMware)
2021-11-10 14:37 ` [PATCH 5/5] kernel-shark: Always run 'ldconfig' after installing libkshark Yordan Karadzhov (VMware)
3 siblings, 0 replies; 6+ messages in thread
From: Yordan Karadzhov (VMware) @ 2021-11-10 14:37 UTC (permalink / raw)
To: linux-trace-devel; +Cc: Yordan Karadzhov (VMware)
Making sure that the install instructions are adequate for building
with the latest versions of the third-party libraries.
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
README | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/README b/README
index 652891c..24d6001 100644
--- a/README
+++ b/README
@@ -13,7 +13,8 @@ KernelShark has the following external dependencies:
1. In order to install the packages on Ubuntu do the following:
sudo apt-get install build-essential git cmake libjson-c-dev -y
sudo apt-get install freeglut3-dev libxmu-dev libxi-dev -y
- sudo apt-get install fonts-freefont-ttf
+ sudo apt-get install flex bison -y
+ sudo apt-get install fonts-freefont-ttf -y
sudo apt-get install qtbase5-dev -y
1.1 If you want to be able to generate Doxygen documentation:
@@ -21,12 +22,14 @@ KernelShark has the following external dependencies:
2. In order to install the packages on Fedora, as root do the following:
- dnf install gcc gcc-c++ git cmake json-c-devel -y
- dnf install freeglut-devel redhat-rpm-config -y
- dnf install qt5-qtbase-devel -y
+ sudo dnf install gcc gcc-c++ git cmake json-c-devel -y
+ sudo dnf install freeglut-devel redhat-rpm-config -y
+ sudo dnf install flex bison -y
+ sudo dnf install gnu-free-sans-fonts -y
+ sudo dnf install qt5-qtbase-devel -y
2.1 If you want to be able to generate Doxygen documentation:
- dnf install graphviz doxygen -y
+ sudo dnf install graphviz doxygen -y
3. In order to install the final dependencies do the following:
@@ -43,6 +46,8 @@ KernelShark has the following external dependencies:
git clone https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
cd trace-cmd
make
+ make libs
+ sudo make install
sudo make install_libs
Building:
--
2.33.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 4/5] kernel-shark: Add 'Requires' to libkshark.pc
2021-11-10 14:37 [PATCH 1/5] kernel-shark: Silence a warning from 'cmake_clean.sh' Yordan Karadzhov (VMware)
2021-11-10 14:37 ` [PATCH 2/5] kernel-shark: Fix a warning from 'KsUtils.cpp' Yordan Karadzhov (VMware)
2021-11-10 14:37 ` [PATCH 3/5] kernel-shark: Update the README file Yordan Karadzhov (VMware)
@ 2021-11-10 14:37 ` Yordan Karadzhov (VMware)
2021-11-10 16:29 ` Steven Rostedt
2021-11-10 14:37 ` [PATCH 5/5] kernel-shark: Always run 'ldconfig' after installing libkshark Yordan Karadzhov (VMware)
3 siblings, 1 reply; 6+ messages in thread
From: Yordan Karadzhov (VMware) @ 2021-11-10 14:37 UTC (permalink / raw)
To: linux-trace-devel; +Cc: Yordan Karadzhov (VMware)
Adding only the requirements for building 'libkshark'. The requirements
for building the GUI are not supposed to be listed here.
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
CMakeLists.txt | 2 ++
build/libkshark.pc.cmake | 2 ++
2 files changed, 4 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb7b2a1..3723654 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,6 +42,8 @@ if (NOT _POLKIT_INSTALL_PREFIX)
endif ()
+set(LIBTRACECMD_MIN_VERSION 1.0)
+
set(CMAKE_MODULE_PATH "${KS_DIR}/build")
find_package(TraceEvent REQUIRED)
find_package(TraceFS REQUIRED)
diff --git a/build/libkshark.pc.cmake b/build/libkshark.pc.cmake
index ad4ce34..0591cf9 100644
--- a/build/libkshark.pc.cmake
+++ b/build/libkshark.pc.cmake
@@ -6,5 +6,7 @@ Name: libkshark
URL: https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/
Description: Library for accessing ftrace file system
Version: @KS_VERSION_STRING@
+Requires: tracecmd >= @LIBTRACECMD_MIN_VERSION@
+Requires: json-c
Cflags: -I${includedir}
Libs: -L${libdir} -lkshark
--
2.33.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 4/5] kernel-shark: Add 'Requires' to libkshark.pc
2021-11-10 14:37 ` [PATCH 4/5] kernel-shark: Add 'Requires' to libkshark.pc Yordan Karadzhov (VMware)
@ 2021-11-10 16:29 ` Steven Rostedt
0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2021-11-10 16:29 UTC (permalink / raw)
To: Yordan Karadzhov (VMware); +Cc: linux-trace-devel
On Wed, 10 Nov 2021 16:37:46 +0200
"Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote:
> --- a/build/libkshark.pc.cmake
> +++ b/build/libkshark.pc.cmake
> @@ -6,5 +6,7 @@ Name: libkshark
> URL: https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/
> Description: Library for accessing ftrace file system
> Version: @KS_VERSION_STRING@
> +Requires: tracecmd >= @LIBTRACECMD_MIN_VERSION@
Note, when I added this, I get:
# pkg-config --libs libkshark
Package tracecmd was not found in the pkg-config search path.
Perhaps you should add the directory containing `tracecmd.pc'
to the PKG_CONFIG_PATH environment variable
Package 'tracecmd', required by 'libkshark', not found
But if I switch it to libtracecmd, I get:
# pkg-config --libs libkshark
-lkshark -ltracecmd -ltracefs -ltraceevent
-- Steve
> +Requires: json-c
> Cflags: -I${includedir}
> Libs: -L${libdir} -lkshark
> --
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 5/5] kernel-shark: Always run 'ldconfig' after installing libkshark
2021-11-10 14:37 [PATCH 1/5] kernel-shark: Silence a warning from 'cmake_clean.sh' Yordan Karadzhov (VMware)
` (2 preceding siblings ...)
2021-11-10 14:37 ` [PATCH 4/5] kernel-shark: Add 'Requires' to libkshark.pc Yordan Karadzhov (VMware)
@ 2021-11-10 14:37 ` Yordan Karadzhov (VMware)
3 siblings, 0 replies; 6+ messages in thread
From: Yordan Karadzhov (VMware) @ 2021-11-10 14:37 UTC (permalink / raw)
To: linux-trace-devel; +Cc: Yordan Karadzhov (VMware)
This way we make sure that the run-time bindings of the linker are
properly configured and have the necessary cache to find the library.
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
src/CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f3c4e0a..babb9c1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -46,6 +46,11 @@ install(FILES "${KS_DIR}/libkshark.pc"
DESTINATION ${PKG_CONGIG_DIR}
COMPONENT libkshark-devel)
+install(CODE "message(\"-- Executing: ldconfig ${_LIBDIR}\")
+ execute_process(COMMAND bash \"-c\" \"ldconfig ${_INSTALL_PREFIX}\"
+ ECHO_ERROR_VARIABLE)"
+ COMPONENT libkshark-devel)
+
if (OPENGL_FOUND)
message(STATUS "libkshark-plot")
--
2.33.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-11-10 16:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-10 14:37 [PATCH 1/5] kernel-shark: Silence a warning from 'cmake_clean.sh' Yordan Karadzhov (VMware)
2021-11-10 14:37 ` [PATCH 2/5] kernel-shark: Fix a warning from 'KsUtils.cpp' Yordan Karadzhov (VMware)
2021-11-10 14:37 ` [PATCH 3/5] kernel-shark: Update the README file Yordan Karadzhov (VMware)
2021-11-10 14:37 ` [PATCH 4/5] kernel-shark: Add 'Requires' to libkshark.pc Yordan Karadzhov (VMware)
2021-11-10 16:29 ` Steven Rostedt
2021-11-10 14:37 ` [PATCH 5/5] kernel-shark: Always run 'ldconfig' after installing libkshark Yordan Karadzhov (VMware)
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).