diff mbox series

[bug#40556] gnu: dovecot: Add libunwind input.

Message ID 87eesuhsl2.fsf@gmx.com
State Accepted
Headers show
Series [bug#40556] gnu: dovecot: Add libunwind input. | 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

Pierre Langlois April 11, 2020, 4:53 p.m. UTC
Tobias Geerinckx-Rice writes:

> Pierre,
>
> Pierre Langlois 写道:
>> I wonder what's wrong with backtrace_symbols() in guix, I'm not sure
>> how
>> to investigate that. For now though, what do you think of using
>> libunwind?
>
> OK, but it should only be included on platforms that require it:

Oh sure thing!

>
>  ;; Untested…
>  (inputs
>   `(…
>     ,@(match (%current-system)
>         ((or "aarch64-linux" "armhf-linux" …)
>          `(("libunwind" ,libunwind)))
>         (_ `()))
>     …))
>
> Could you test that?

OK, the following patch works for me (tested building for armhf and
aarch64 on a rockpro64). I've also added a "FIXME" comment to mention
the issue so we can remove/keep it when we have a good understanding of
what's going on.
Thanks,
Pierre

Comments

Julien Lepiller April 11, 2020, 5:56 p.m. UTC | #1
Le 11 avril 2020 12:53:29 GMT-04:00, Pierre Langlois <pierre.langlois@gmx.com> a écrit :
>
>Tobias Geerinckx-Rice writes:
>
>> Pierre,
>>
>> Pierre Langlois 写道:
>>> I wonder what's wrong with backtrace_symbols() in guix, I'm not sure
>>> how
>>> to investigate that. For now though, what do you think of using
>>> libunwind?
>>
>> OK, but it should only be included on platforms that require it:
>
>Oh sure thing!
>
>>
>>  ;; Untested…
>>  (inputs
>>   `(…
>>     ,@(match (%current-system)
>>         ((or "aarch64-linux" "armhf-linux" …)
>>          `(("libunwind" ,libunwind)))
>>         (_ `()))
>>     …))
>>
>> Could you test that?
>
>OK, the following patch works for me (tested building for armhf and
>aarch64 on a rockpro64). I've also added a "FIXME" comment to mention
>the issue so we can remove/keep it when we have a good understanding of
>what's going on.

Great, thanks for working on it, I had totally forgotten about it, because I fixed it in my systems by not running tests. There's also a bug report I sent to bug-guix I think. Adding libunwind should work. I remember testing it once, but it was just too long and I forgot about it ^^"
Ludovic Courtès April 16, 2020, 4:24 p.m. UTC | #2
Hi,

Pierre Langlois <pierre.langlois@gmx.com> skribis:

> +       ;; FIXME: The 'test-backtrace' tests fail on arm when using glibc's
> +       ;; backtrace_symbol() function so fallback to using libunwind.
> +       ,@(match (or (%current-target-system) (%current-system))
> +           ((or "aarch64-linux" "armhf-linux")
> +            `(("libunwind" ,libunwind)))
> +           (_ '()))

This isn’t quite correct because ‘%current-target-system’ returns a
triplet, like “arm-linux-gnueabihf”.

Use ‘target-arm?’ instead.

TIA!

Ludo’.
diff mbox series

Patch

From ea4c7a2dec7c81951cf0d27cbb669ef39b07de95 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Sat, 11 Apr 2020 16:34:01 +0100
Subject: [PATCH] gnu: dovecot: Add libunwind input for arm.

* gnu/packages/mail.scm (dovecot)[inputs]: Add libunwind if the system is
either aarch64-linux or armhf-linux.
---
 gnu/packages/mail.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index a6ed776db1..91577f72b1 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -24,7 +24,7 @@ 
 ;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017, 2018 Rene Saavedra <pacoon@protonmail.com>
-;;; Copyright © 2018, 2019 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2018, 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
 ;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
@@ -89,6 +89,7 @@ 
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libidn)
   #:use-module (gnu packages libunistring)
+  #:use-module (gnu packages libunwind)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lsof)
   #:use-module (gnu packages lua)
@@ -1435,6 +1436,12 @@  facilities for checking incoming mail.")
     (inputs
      `(("bzip2" ,bzip2)
        ("libsodium" ,libsodium)         ; extra password algorithms
+       ;; FIXME: The 'test-backtrace' tests fail on arm when using glibc's
+       ;; backtrace_symbol() function so fallback to using libunwind.
+       ,@(match (or (%current-target-system) (%current-system))
+           ((or "aarch64-linux" "armhf-linux")
+            `(("libunwind" ,libunwind)))
+           (_ '()))
        ("linux-pam" ,linux-pam)
        ("lz4" ,lz4)
        ("openssl" ,openssl)
-- 
2.26.0