unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Roman Scherer <roman.scherer@burningswell.com>
To: 61009@debbugs.gnu.org
Subject: [bug#61009] [PATCH] Building Icecat and jemalloc on aarch64-linux
Date: Sun, 22 Jan 2023 21:06:43 +0100	[thread overview]
Message-ID: <86ilgyuyc1.fsf@burningswell.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2185 bytes --]


Hi Guix,

I'm trying to build Icecat on an aarch64-linux based Guix system. I got it
working with the patches attached to this mail. I would like to include this
into Guix but I am not sure about the following issues:

1. jemalloc

I'm using the kernel configuration from the Asahi Linux project which uses 16K
as the kernel page size. Because of this I get an "Unsupported system page
size" error from the jemalloc package when building Icecat.

I fixed this issue by setting the page size in the jemalloc package to 16K,
when building for an aarch64-linux system. I got this from the PKGBUILD [1] of
ARM Arch Linux.

I'm new to ARM and now I'm wondering:

- What is the default kernel page size on an aarch64-linux system?

- If there is none, is there one that is most commonly used?

- Why does ARM Arch Linux default to 16K and should we too?

- Which kernel page size is used on CI to build jemalloc and Icecat on the
  aarch64-linux builders?

- Did Icecat ever built on aarch64-linux on CI?

I also updated the version of jemalloc to 5.3.0, because I thought they also
addressed this issue for my particular aarch64-linux system [2]. This new
version sets the page size also to 16K, but only when building for an
aarch64-apple-darwin system, and not for aarch64-linux systems. So I'm not
sure only updating the version would fix the kernel page size issue here.

More than 5000 packages depend on jemalloc, so this should probably go into
the core-updates branch? The changes to jemalloc caused my world to rebuild
locally, but I ended up with a working Icecat.

2. Disable EME on aarch64-linux

I removed the --disable-eme option on aarch64-linux because the configure
script failed an error saying this option is not supported on this
architecture. Since EME stands for Encrypted Media Extensions and is a
JavaScript API for playing DRMed video content in HTML, I'm not sure if this
is ok, or what to best do here?

Could someone please review the patches and give me some advice on how to
proceed with these issues?

Thanks, Roman.

[1] https://archlinuxarm.org/packages/aarch64/jemalloc/files/PKGBUILD
[2] https://github.com/jemalloc/jemalloc/blob/dev/configure.ac#L1733


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-jemalloc-Update-to-5.3.0.patch --]
[-- Type: text/x-diff, Size: 1280 bytes --]

From 87b3983e2981fc433b4b7e24f6d3b13f17d90c56 Mon Sep 17 00:00:00 2001
From: r0man <roman@burningswell.com>
Date: Sun, 22 Jan 2023 19:30:12 +0100
Subject: [PATCH 1/3] gnu: jemalloc: Update to 5.3.0.

* gnu/packages/jemalloc.scm (jemalloc): Update to 5.3.0.
---
 gnu/packages/jemalloc.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm
index 2e25780257..354f07a838 100644
--- a/gnu/packages/jemalloc.scm
+++ b/gnu/packages/jemalloc.scm
@@ -75,7 +75,7 @@ (define-public jemalloc-4.5.0
 (define-public jemalloc
   (package
     (inherit jemalloc-4.5.0)
-    (version "5.2.1")
+    (version "5.3.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -83,7 +83,7 @@ (define-public jemalloc
                     version "/jemalloc-" version ".tar.bz2"))
               (sha256
                (base32
-                "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl"))))
+                "1apyxjd1ixy4g8xkr61p0ny8jiz8vyv1j0k4nxqkxpqrf4g2vf1d"))))
     (arguments
       (substitute-keyword-arguments (package-arguments jemalloc-4.5.0)
         ;; Disable the thread local storage model in jemalloc 5 to prevent
-- 
2.38.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnu-jemalloc-Build-with-large-page-size-on-aarch64.patch --]
[-- Type: text/x-diff, Size: 913 bytes --]

From ff4f0076185143436058315a9d8ae74830c84eff Mon Sep 17 00:00:00 2001
From: r0man <roman@burningswell.com>
Date: Sun, 22 Jan 2023 19:31:37 +0100
Subject: [PATCH 2/3] gnu: jemalloc: Build with large page size on aarch64.

* gnu/packages/jemalloc.scm (jemalloc): Build with large page size on aarch64.
---
 gnu/packages/jemalloc.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm
index 354f07a838..877b026fda 100644
--- a/gnu/packages/jemalloc.scm
+++ b/gnu/packages/jemalloc.scm
@@ -58,6 +58,8 @@ (define-public jemalloc-4.5.0
        '(,@(match (%current-system)
              ((or "i686-linux" "x86_64-linux")
               '())
+             ("aarch64-linux"
+              (list "--with-lg-page=14"))
              ("powerpc-linux"
               (list "--disable-thp" "CPPFLAGS=-maltivec"))
              (_
-- 
2.38.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: 0003-gnu-icecat-Fix-disable-eme-option-on-aarch64.patch --]
[-- Type: text/x-diff, Size: 973 bytes --]

From 71bf3cf7187de92f7974bedc2d0291a78a0754bc Mon Sep 17 00:00:00 2001
From: r0man <roman@burningswell.com>
Date: Sun, 22 Jan 2023 19:33:13 +0100
Subject: [PATCH 3/3] gnu: icecat: Fix --disable-eme option on aarch64.

* gnu/packages/gnuzilla.scm (icecat): Fix --disable-eme option on aarch64.
---
 gnu/packages/gnuzilla.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 23249791bb..95c8be5f1b 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -756,7 +756,8 @@ (define-public icecat
          "--disable-tests"
          "--disable-updater"
          "--disable-crashreporter"
-         "--disable-eme"
+         ;; The --disable-eme option is not available on aarch64.
+         #$(if (target-aarch64?) "" "--disable-eme")
 
          ;; Building with debugging symbols takes ~5GiB, so disable it.
          "--disable-debug"
-- 
2.38.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

             reply	other threads:[~2023-01-22 20:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-22 20:06 Roman Scherer [this message]
2023-02-05 16:35 ` [bug#61009] [PATCH v2] Building Icecat and jemalloc on aarch64-linux Roman Scherer
2023-02-05 17:32 ` [bug#61009] [PATCH] " Leo Famulari
2023-02-06 19:52   ` Roman Scherer
2023-02-09 12:49     ` Leo Famulari
2023-02-11  9:44       ` Roman Scherer
2023-03-01 15:46         ` Christopher Baines
2023-03-01 18:05           ` Roman Scherer
2023-03-02 10:07             ` Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ilgyuyc1.fsf@burningswell.com \
    --to=roman.scherer@burningswell.com \
    --cc=61009@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).