Make gtk use librsvg on aarch64 again.

  • Done
  • quality assurance status badge
Details
One participant
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
pelzflorian (Florian Pelz)
Severity
normal

Debbugs page

pelzflorian (Florian Pelz) wrote 2 years ago
(address . bug-guix@gnu.org)
871qrebbgg.fsf@pelzflorian.de
Hi Guix,

Mathieu Othacehe <othacehe@gnu.org> writes at https://issues.guix.gnu.org/57933:
Toggle quote (3 lines)
> That's because `gst-plugins-bad` and `librsvg-bootstrap` both refer to
> `librsvg` which depends on Rust which is only supported on x86_64-linux.

This isn’t entirely true. Since
32a87714f4507f853824d82d9c6ca10e1405c8eb, bordeaux has substitutes for
librsvg for aarch64.

I wrote a patch but probably it would rebuild the world. I haven’t
tried compiling yet. Would using (or (target-aarch64?)
(target-x86-64?)) be better?
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Tue, 11 Oct 2022 16:57:06 +0200
Subject: [PATCH] gnu: gtk: Use recent librsvg on aarch64 again.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Commit 75e24eec1ed9772dbcb6737270076eca571dc4ea assumed librsvg didn’t
support aarch64, but it *is* supported since commit
32a87714f4507f853824d82d9c6ca10e1405c8eb.

* gnu/packages/gtk.scm (gtk)[propagated-inputs]: Check if librsvg is supported.
---
gnu/packages/gtk.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

Toggle diff (31 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index faf4d6f7eb..985031c7b2 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -32,6 +32,7 @@
;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2022 Benjamin Slade <slade@lambda-y.net>
;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+;;; Copyright © 2022 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -969,9 +970,11 @@ (define-public gtk+-2
(outputs '("out" "bin" "doc" "debug"))
(propagated-inputs
(list atk cairo
- (if (target-x86-64?)
- librsvg-bootstrap
- librsvg-2.40)
+ (let ((target (or (%current-target-system)
+ (%current-system))))
+ (if (supported-package? librsvg-bootstrap target)
+ librsvg-bootstrap
+ librsvg-2.40))
glib pango))
(inputs
(list cups

base-commit: 59911ae29442aba18bcb53233e793d8f3d264504
--
2.37.3
Regards,
Florian
pelzflorian (Florian Pelz) wrote 2 years ago
(address . 58444@debbugs.gnu.org)
87tu4a1cfz.fsf@pelzflorian.de
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> writes:
Toggle quote (2 lines)
> I wrote a patch but probably it would rebuild the world.

It does rebuild the world. I will try with (or (target-aarch64?)
(target-x86-64?)).

Regards,
Florian
pelzflorian (Florian Pelz) wrote 2 years ago
(address . 58444@debbugs.gnu.org)
877d14x26k.fsf@pelzflorian.de
close 58444
thanks

"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> writes:
Toggle quote (5 lines)
> "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> writes:
>> I wrote a patch but probably it would rebuild the world.
> It does rebuild the world. I will try with (or (target-aarch64?)
> (target-x86-64?)).

My other attempt also caused rebuilds. Also it's not that important if
gtk+-2 uses an old librsvg. I had thought GNUtoo's i686 fix (and thank
you for it) introduced a regression for aarch64, but had not noticed how
his use of (target-x86-64?) was a common pattern for e.g. emacs as well.
Perhaps it is better to remove the (target-x86-64?) checks as soon as
mrustc supports i686.

Sorry for the noise. Closing.

Regards,
Florian
?
Your comment

This issue is archived.

To comment on this conversation send an email to 58444@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58444
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help