Package: rr / 4.4.0-2

move-librrpreload.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Description: Move the preload library to /usr/lib/rr/
Author: Stephen Kitt <skitt@debian.org>

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@
 set(BUILD_SHARED_LIBS ON)
 
 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
+set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/rr)
 
 set(WILL_RUN_TESTS ON CACHE BOOL "Run tests")
 
@@ -357,8 +357,8 @@
 
 install(TARGETS rr ${RR_BIN} rrpreload rr_exec_stub
   RUNTIME DESTINATION bin
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib)
+  LIBRARY DESTINATION lib/rr
+  ARCHIVE DESTINATION lib/rr)
 
 # Build 32-bit librrpreload on 64-bit builds.
 # We copy the source files into '32' subdirectories in the output
@@ -406,8 +406,8 @@
 
   install(TARGETS rrpreload_32 rr_exec_stub_32
     RUNTIME DESTINATION bin
-    LIBRARY DESTINATION lib
-    ARCHIVE DESTINATION lib)
+    LIBRARY DESTINATION lib/rr
+    ARCHIVE DESTINATION lib/rr)
 endif()
 
 ##--------------------------------------------------
--- a/src/RecordSession.cc
+++ b/src/RecordSession.cc
@@ -1570,7 +1570,7 @@
 }
 
 static string find_syscall_buffer_library() {
-  string lib_path = exe_directory() + "../lib/";
+  string lib_path = exe_directory() + "../lib/rr/";
   string file_name = lib_path + SYSCALLBUF_LIB_FILENAME;
   if (access(file_name.c_str(), F_OK) != 0) {
     // File does not exist. Assume install put it in LD_LIBRARY_PATH.