summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-22 09:31:20 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-22 10:09:04 -0400
commit19af6d94340ce3b5655dab30eaa295661dbe4e89 (patch)
tree0d01c71271c61a02412b81e8b3c1bb714ca61876 /gnu
parentd22cf3a3f23c084bcf59191febd7d58a6f652bf7 (diff)
downloadguix-19af6d94340ce3b5655dab30eaa295661dbe4e89.tar.gz
gnu: wireshark: Re-instate the validate-runpath phase.
* gnu/packages/networking.scm (wireshark) [arguments]: Use gexps.
Add the CMAKE_MODULE_LINKER_FLAGS CMake variable to the configure flags.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/networking.scm46
1 files changed, 20 insertions, 26 deletions
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 0c55f14077..26451c91a9 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -26,7 +26,7 @@
 ;;; Copyright © 2018, 2020-2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2018, 2020, 2021, 2022 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
-;;; Copyright © 2019, 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019, 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2019 Vasile Dumitrascu <va511e@yahoo.com>
 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
@@ -1768,31 +1768,25 @@ of the same name.")
         (base32 "0jz76ra86gy7r4wwb174lggnl5y29nn68l7ydw1kj1phcijrz854"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda* (#:key parallel-tests? tests? #:allow-other-keys)
-             (when tests?
-               (invoke "ctest" "-VV"
-                       "-j" (if parallel-tests?
-                                (number->string (parallel-job-count))
-                                "1")
-                       ;; Skip the suite_extcaps.case_extcaps.test_sdjournal
-                       ;; test as it requires sdjournal (from systemd) and
-                       ;; fails.
-                       "-E" "suite_extcaps")))))
-       ;; Build process chokes during `validate-runpath' phase.
-       ;;
-       ;; Errors are like the following:
-       ;; "/gnu/store/...wireshark-3.0.0/lib/wireshark/plugins/3.0/epan/ethercat.so:
-       ;; error: depends on 'libwireshark.so.12', which cannot be found in
-       ;; RUNPATH".  That is, "/gnu/store/...wireshark-3.0.0./lib" doesn't
-       ;; belong to RUNPATH.
-       ;;
-       ;; That’s not a problem in practice because "ethercat.so" is a plugin,
-       ;; so it’s dlopen’d by a process that already provides "libwireshark".
-       ;; For now, we disable this phase.
-       #:validate-runpath? #f))
+     (list
+      ;; This causes the plugins to register runpaths for the wireshark
+      ;; libraries, which would otherwise cause the validate-runpath phase to
+      ;; fail.
+      #:configure-flags #~(list (string-append "-DCMAKE_MODULE_LINKER_FLAGS="
+                                               "-Wl,-rpath=" #$output "/lib"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key parallel-tests? tests? #:allow-other-keys)
+              (when tests?
+                (invoke "ctest" "-VV"
+                        "-j" (if parallel-tests?
+                                 (number->string (parallel-job-count))
+                                 "1")
+                        ;; Skip the suite_extcaps.case_extcaps.test_sdjournal
+                        ;; test as it requires sdjournal (from systemd) and
+                        ;; fails.
+                        "-E" "suite_extcaps")))))))
     (inputs
      (list c-ares
            glib