diff mbox series

[bug#43245] gnu: xournalpp: Fix path to addr2line binary

Message ID 20200906153146.GA1315@noor.fritz.box
State Accepted
Headers show
Series [bug#43245] gnu: xournalpp: Fix path to addr2line binary | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

Lars-Dominik Braun Sept. 6, 2020, 3:31 p.m. UTC
Hi,

I noticed xournalpp’s crash reporter depends on binutils’ addr2line
binary. When running `guix environment --pure --ad-hoc xournalpp --
xournalpp` you can see lines like `sh: addr2line: command not found`.
The attached patch replaces the path by the build-time binutil’s
version.

Cheers,
Lars

Comments

Mathieu Othacehe Sept. 7, 2020, 5:49 a.m. UTC | #1
Hello,

> I noticed xournalpps crash reporter depends on binutils addr2line
> binary. When running `guix environment --pure --ad-hoc xournalpp --
> xournalpp` you can see lines like `sh: addr2line: command not found`.
> The attached patch replaces the path by the build-time binutils
> version.

Pushed, thanks!

Mathieu
diff mbox series

Patch

From ab65a639b2af2eb67ab325d2bdf0fab07157d9d3 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
Date: Sun, 6 Sep 2020 17:27:54 +0200
Subject: [PATCH] gnu: xournalpp: Fix path to addr2line binary

* gnu/packages/pdf.scm [arguments]: Add phase substituting path of
addr2line utility.
---
 gnu/packages/pdf.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 7649bff695..4c11111323 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -848,6 +848,14 @@  using a stylus.")
              (for-each (lambda (po) (chmod po #o666))
                        (find-files "." "\\.po$"))
              #t))
+         ;; Fix path to addr2line utility, which the crash reporter uses.
+         (add-after 'unpack 'fix-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "src/util/Stacktrace.cpp"
+               ;; Match only the commandline.
+               (("\"addr2line ")
+                (string-append "\"" (which "addr2line") " ")))
+             #t))
          (add-after 'install 'glib-or-gtk-wrap
            (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
     (native-inputs
-- 
2.26.2