Skip to contentSkip to conversation

kernel-shark: Fix compile error: ‘string’ in namespace ‘std’ does not name a type

PATCH In review Tzvetomir Stoyanov (VMware) 2 participants 2 messages Feb 5, 2021 – Feb 8, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-shark: Fix compile error: ‘string’ in namespace ‘std’ does not name a type

From: Tzvetomir (VMware) Stoyanov <[email protected]>

There is a compilation error when compiling KernelShark on Fedora 33 with c++ (GCC) 10.2.1:

src/KsPlotTools.hpp:349:37: error: ‘string’ in namespace ‘std’ does not name a type

"string" should be included in that header file, as it is a direct dependency.

---
 src/KsPlotTools.hpp | 1 +
 1 file changed, 1 insertion(+)
src/KsPlotTools.hpp +1 -0
index 1725926..68bd6f7 100644
@@ -15,6 +15,7 @@
 // C++
 #include <forward_list>
 #include <unordered_map>
+#include <string>
 
 // KernelShark
 #include "libkshark.h"
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 21 lines · Tzvetomir Stoyanov (VMware)

From: Tzvetomir (VMware) Stoyanov <[email protected]>

There is a compilation error when compiling KernelShark on Fedora 33 with c++ (GCC) 10.2.1:

src/KsPlotTools.hpp:349:37: error: ‘string’ in namespace ‘std’ does not name a type

"string" should be included in that header file, as it is a direct dependency.

---
  src/KsPlotTools.hpp | 1 +
  1 file changed, 1 insertion(+)
src/KsPlotTools.hpp +0 -0
index 1725926..68bd6f7 100644

src/KsPlotTools.hpp line 21

Quoted 7 lines
src/KsPlotTools.hpp +1 -0
@@ -15,6 +15,7 @@
  // C++
  #include <forward_list>
  #include <unordered_map>
+#include <string>
 
  // KernelShark
  #include "libkshark.h"

Thanks Ceco!