Title: [283213] trunk/Tools/buildstream
Revision
283213
Author
[email protected]
Date
2021-09-29 04:12:44 -0700 (Wed, 29 Sep 2021)

Log Message

[Flatpak SDK] rr unable to locate librrpage.so
https://bugs.webkit.org/show_bug.cgi?id=230942

Patch by Philippe Normand <[email protected]> on 2021-09-29
Reviewed by Sergio Villar Senin.

Look for resources in cmake's install lib dir.

* elements/sdk/rr.bst:
* patches/rr/0001-cmake-Look-for-resources-in-cmake-s-install-lib-dir.patch: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/Tools/buildstream/ChangeLog (283212 => 283213)


--- trunk/Tools/buildstream/ChangeLog	2021-09-29 06:32:29 UTC (rev 283212)
+++ trunk/Tools/buildstream/ChangeLog	2021-09-29 11:12:44 UTC (rev 283213)
@@ -1,3 +1,15 @@
+2021-09-29  Philippe Normand  <[email protected]>
+
+        [Flatpak SDK] rr unable to locate librrpage.so
+        https://bugs.webkit.org/show_bug.cgi?id=230942
+
+        Reviewed by Sergio Villar Senin.
+
+        Look for resources in cmake's install lib dir.
+
+        * elements/sdk/rr.bst:
+        * patches/rr/0001-cmake-Look-for-resources-in-cmake-s-install-lib-dir.patch: Added.
+
 2021-09-28  Philippe Normand  <[email protected]>
 
         [Flatpak SDK] Update libsoup3 and friends

Modified: trunk/Tools/buildstream/elements/sdk/rr.bst (283212 => 283213)


--- trunk/Tools/buildstream/elements/sdk/rr.bst	2021-09-29 06:32:29 UTC (rev 283212)
+++ trunk/Tools/buildstream/elements/sdk/rr.bst	2021-09-29 11:12:44 UTC (rev 283213)
@@ -15,3 +15,5 @@
   url: github_com:rr-debugger/rr
   track: master
   ref: 5.5.0-5-gc168a271dd5f3685834a74e5d96f60cc89a9f6c0
+- kind: patch
+  path: patches/rr/0001-cmake-Look-for-resources-in-cmake-s-install-lib-dir.patch

Added: trunk/Tools/buildstream/patches/rr/0001-cmake-Look-for-resources-in-cmake-s-install-lib-dir.patch (0 => 283213)


--- trunk/Tools/buildstream/patches/rr/0001-cmake-Look-for-resources-in-cmake-s-install-lib-dir.patch	                        (rev 0)
+++ trunk/Tools/buildstream/patches/rr/0001-cmake-Look-for-resources-in-cmake-s-install-lib-dir.patch	2021-09-29 11:12:44 UTC (rev 283213)
@@ -0,0 +1,82 @@
+From 26ba5099f19ba2e00f84aff797be7740fead4aee Mon Sep 17 00:00:00 2001
+From: Philippe Normand <[email protected]>
+Date: Wed, 29 Sep 2021 10:22:00 +0100
+Subject: [PATCH] cmake: Look for resources in cmake's install lib dir
+
+---
+ CMakeLists.txt  |  4 ++++
+ src/config.h.in |  6 ++++++
+ src/util.cc     | 11 +++--------
+ 3 files changed, 13 insertions(+), 8 deletions(-)
+ create mode 100644 src/config.h.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e28d95aa..d38b3df2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,6 +49,10 @@ configure_file(
+   ${CMAKE_SOURCE_DIR}/src/git_revision.h.in
+   ${CMAKE_BINARY_DIR}/git_revision.h
+ )
++configure_file(
++  ${CMAKE_SOURCE_DIR}/src/config.h.in
++  ${CMAKE_BINARY_DIR}/config.h
++)
+ 
+ set(FLAGS_COMMON "-D__USE_LARGEFILE64 -pthread")
+ set(supports32bit true)
+diff --git a/src/config.h.in b/src/config.h.in
+new file mode 100644
+index 00000000..059aeb43
+--- /dev/null
++++ b/src/config.h.in
+@@ -0,0 +1,6 @@
++#ifndef RR_CONFIG_H_
++#define RR_CONFIG_H_
++
++#define RESOURCES_LIB_DIR "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/"
++
++#endif
+diff --git a/src/util.cc b/src/util.cc
+index c57ae7b6..b2ac7bac 100644
+--- a/src/util.cc
++++ b/src/util.cc
+@@ -45,6 +45,7 @@
+ #include "kernel_metadata.h"
+ #include "log.h"
+ #include "seccomp-bpf.h"
++#include "config.h"
+ 
+ void good_random(uint8_t* out, size_t out_len);
+ 
+@@ -1261,8 +1262,7 @@ static string read_exe_dir() {
+ string resource_path() {
+   string resource_path = Flags::get().resource_path;
+   if (resource_path.empty()) {
+-    static string exe_path = read_exe_dir() + "../";
+-    return exe_path;
++    return RESOURCES_LIB_DIR;
+   }
+   return resource_path;
+ }
+@@ -1294,16 +1294,11 @@ bool running_under_rr(bool cache) {
+ 
+ string find_helper_library(const char *basepath)
+ {
+-  string lib_path = resource_path() + "lib64/rr/";
++  string lib_path = resource_path() + "rr/";
+   string file_name = lib_path + basepath;
+   if (access(file_name.c_str(), F_OK) == 0) {
+     return lib_path;
+   }
+-  lib_path = resource_path() + "lib/rr/";
+-  file_name = lib_path + basepath;
+-  if (access(file_name.c_str(), F_OK) == 0) {
+-    return lib_path;
+-  }
+   // File does not exist. Assume install put it in LD_LIBRARY_PATH.
+   lib_path = "";
+   return lib_path;
+-- 
+2.31.1
+
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to