Skip to contentSkip to conversation

Compile kernel-shark with -fPIC option

PATCH Steven Rostedt 2 participants 3 messages Apr 25, 2019 – May 8, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi Alan,

Thanks for the patch. FYI, it's best to also Cc [email protected] when sending patches.

Quoted 23 lines · On Thu, 25 Apr 2019 09:27:49 -0700 Alan Mikhak <[email protected]>…

From: Alan Mikhak <[email protected]>

Resolve linker relocation error when linking libkshark.so.0.9.8 with cmake on armv7l, aarch64, and some x86_64 platforms.

Ubuntu 16.04 (xenial) on x86_64:
relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC

Debian 9.8 (stretch) on x86_64:
relocation R_X86_64_TPOFF32 against `seq' can not be used when making a shared object; recompile with -fPIC

---
 kernel-shark/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel-shark/CMakeLists.txt +0 -0
index 1aee858..ac17642 100644

kernel-shark/CMakeLists.txt endif (Qt5Widgets_FOUND) · line 36

Quoted 7 lines
kernel-shark/CMakeLists.txt +2 -2
@@ -32,8 +32,8 @@ endif (Qt5Widgets_FOUND)
 set(LIBRARY_OUTPUT_PATH    "${KS_DIR}/lib")
 set(EXECUTABLE_OUTPUT_PATH "${KS_DIR}/bin")
 
-set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wall -g -pthread")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -pthread")
+set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wall -g -pthread -fPIC")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -pthread -fPIC")

Yordan,

Can you take a look at this patch and add a Reviewed-by tag if you are good with it?

-- Steve

Quoted 3 lines
kernel-shark/CMakeLists.txt +0 -0
 if(NOT _INSTALL_PREFIX)
 	set(_INSTALL_PREFIX "/usr/local")
#2 lore raw
Quoted 41 lines · On Thu, 25 Apr 2019 12:34:36 -0400 Steven Rostedt <[email protected]> wrote:

Hi Alan,

Thanks for the patch. FYI, it's best to also Cc [email protected] when sending patches.

Quoted 23 lines · On Thu, 25 Apr 2019 09:27:49 -0700 Alan Mikhak <[email protected]>…

From: Alan Mikhak <[email protected]>

Resolve linker relocation error when linking libkshark.so.0.9.8 with cmake on armv7l, aarch64, and some x86_64 platforms.

Ubuntu 16.04 (xenial) on x86_64:
relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC

Debian 9.8 (stretch) on x86_64:
relocation R_X86_64_TPOFF32 against `seq' can not be used when making a shared object; recompile with -fPIC

---
 kernel-shark/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel-shark/CMakeLists.txt +0 -0
index 1aee858..ac17642 100644

kernel-shark/CMakeLists.txt endif (Qt5Widgets_FOUND) · line 36

Quoted 7 lines
kernel-shark/CMakeLists.txt +2 -2
@@ -32,8 +32,8 @@ endif (Qt5Widgets_FOUND)
 set(LIBRARY_OUTPUT_PATH    "${KS_DIR}/lib")
 set(EXECUTABLE_OUTPUT_PATH "${KS_DIR}/bin")
 
-set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wall -g -pthread")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -pthread")
+set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wall -g -pthread -fPIC")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -pthread -fPIC")  

Yordan,

Quoted 2 lines

Can you take a look at this patch and add a Reviewed-by tag if you are good with it?

This slipped through the cracks. Yordan, are you good with this?

-- Steve

Quoted 4 lines
Quoted 4 lines
kernel-shark/CMakeLists.txt +0 -0
 if(NOT _INSTALL_PREFIX)
 	set(_INSTALL_PREFIX "/usr/local")  
Reviewed-by
#3 lore raw
Quoted 44 lines · Steven Rostedt
Quoted 41 lines · On Thu, 25 Apr 2019 12:34:36 -0400 Steven Rostedt <[email protected]> wrote:

Hi Alan,

Thanks for the patch. FYI, it's best to also Cc [email protected] when sending patches.

Quoted 23 lines · On Thu, 25 Apr 2019 09:27:49 -0700 Alan Mikhak <[email protected]>…

From: Alan Mikhak <[email protected]>

Resolve linker relocation error when linking libkshark.so.0.9.8 with cmake on armv7l, aarch64, and some x86_64 platforms.

Ubuntu 16.04 (xenial) on x86_64:
relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC

Debian 9.8 (stretch) on x86_64:
relocation R_X86_64_TPOFF32 against `seq' can not be used when making a shared object; recompile with -fPIC

---
  kernel-shark/CMakeLists.txt | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
kernel-shark/CMakeLists.txt +0 -0
index 1aee858..ac17642 100644

kernel-shark/CMakeLists.txt endif (Qt5Widgets_FOUND) · line 36

Quoted 7 lines
kernel-shark/CMakeLists.txt +2 -2
@@ -32,8 +32,8 @@ endif (Qt5Widgets_FOUND)
  set(LIBRARY_OUTPUT_PATH    "${KS_DIR}/lib")
  set(EXECUTABLE_OUTPUT_PATH "${KS_DIR}/bin")
 
-set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wall -g -pthread")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -pthread")
+set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wall -g -pthread -fPIC")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -pthread -fPIC")

Yordan,

Quoted 5 lines
Quoted 2 lines

Can you take a look at this patch and add a Reviewed-by tag if you are good with it?

This slipped through the cracks. Yordan, are you good with this?

I am sorry for the slow reaction!

Cheers,
Yordan

Quoted 7 lines

-- Steve

Quoted 4 lines
Quoted 4 lines
kernel-shark/CMakeLists.txt +0 -0
  if(NOT _INSTALL_PREFIX)
  	set(_INSTALL_PREFIX "/usr/local")