From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SLg8NvWXzWMuHgAAbAwnHQ (envelope-from ) for ; Sun, 22 Jan 2023 21:09:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aH8UNvWXzWNK4wAAauVa8A (envelope-from ) for ; Sun, 22 Jan 2023 21:09:25 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9A1F21BBCA for ; Sun, 22 Jan 2023 21:09:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJgeH-0006E3-8k; Sun, 22 Jan 2023 15:09:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJgeE-0006Da-OQ for guix-patches@gnu.org; Sun, 22 Jan 2023 15:09:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJgeE-0004vW-As for guix-patches@gnu.org; Sun, 22 Jan 2023 15:09:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJgeD-0005WS-Uc for guix-patches@gnu.org; Sun, 22 Jan 2023 15:09:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61009] [PATCH] Building Icecat and jemalloc on aarch64-linux Resent-From: Roman Scherer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Jan 2023 20:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61009 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61009@debbugs.gnu.org X-Debbugs-Original-To: Guix Patches Received: via spool by submit@debbugs.gnu.org id=B.167441812621202 (code B ref -1); Sun, 22 Jan 2023 20:09:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jan 2023 20:08:46 +0000 Received: from localhost ([127.0.0.1]:52680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJgdw-0005Vt-4E for submit@debbugs.gnu.org; Sun, 22 Jan 2023 15:08:46 -0500 Received: from lists.gnu.org ([209.51.188.17]:40714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJgdq-0005Vh-LC for submit@debbugs.gnu.org; Sun, 22 Jan 2023 15:08:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJgdq-0006Cj-1n for guix-patches@gnu.org; Sun, 22 Jan 2023 15:08:38 -0500 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJgdn-0004sp-MK for guix-patches@gnu.org; Sun, 22 Jan 2023 15:08:37 -0500 Received: by mail-ej1-x630.google.com with SMTP id az20so25831521ejc.1 for ; Sun, 22 Jan 2023 12:08:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=BuIpt1XBXskrelt2qFEyEjezSgHF4LaDylKDsi+PaNU=; b=0qyFB/3g0SMUcBUqJhGu3EKNu9HYc/Q7Iu1ze/PrgtebZMTQEQ5HGSA1ANx0qSQpJM CxsCjtEfDoyIxPf/vR7Qw3ocXt3ECobe0TDLBHoo4SrVcUW9/lU75YG0qudBAqoVjVxH 0TlLHTcibeZfbjSR3A4bBZCkEOoKzyVsM7QIzkrX2n/h4DEVzrEeuJeQPMMhstd5lTst 7CIMsfa/h8y0bXqffhciT3fR0mMeh/C5w7o2OLXloH70+1eSTdQXWpUgKTzwmcJ9gF0U 8GBQO5O59nEGdSd+ayPhHTiHGmng8a+AK7++2k369DuEjy/lR0nc/qxQDJa/nFSN+hCc zghA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BuIpt1XBXskrelt2qFEyEjezSgHF4LaDylKDsi+PaNU=; b=4LwpZRaf2TEdZOxwieGvvnfsSbRZmw1cMVxiuoQcIUEOGTSYTcRlSDanKf6YGKmYYl slWfs6TIVtBTtr4QQvBl2Vxvni7mapINTrXCEz7QZFYyKU09oma+0/EkCpZR7xuz6+xo eXb+ryMehiLo7IQWDezRADjw2ITT2ulBWYbwvvzt15eomIlgDTwEX2nQA8LYaracB38Y PJP8MzWuaaE46YXHsGG/8sOWiHa3HgsWSnR74OsHU7FN0Nwcg+ZhU7Bsldkalh+T6Oqe R+0Ti91gi3X8Qa42eybl/bh5ZFr1Kq18nXHoycJYsqQmR0VjX2yzMN50vS8cldylkNLC zT4Q== X-Gm-Message-State: AFqh2kpSoB/jpNf2LSxInoqfmehhaJMcmZgFGDrbVHR9fJZwGiEGKF7f 79M+FjZXU3xsrr9Q7IZxZmVyKqHaQFGsKA5eDx4= X-Google-Smtp-Source: AMrXdXv+6WFCnU4pQwPqcEm348nVal30ubOjaeq9aKlYhuZ9Gs60XqAQ//tYnaMiSKlb3HAyC3DG8w== X-Received: by 2002:a17:906:6d99:b0:870:58ae:842e with SMTP id h25-20020a1709066d9900b0087058ae842emr21796704ejt.24.1674418113442; Sun, 22 Jan 2023 12:08:33 -0800 (PST) Received: from precision (tmo-119-74.customers.d1-online.com. [80.187.119.74]) by smtp.gmail.com with ESMTPSA id c2-20020a17090618a200b0077a8fa8ba55sm21072595ejf.210.2023.01.22.12.08.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Jan 2023 12:08:32 -0800 (PST) User-agent: mu4e 1.8.13; emacs 29.0.50 From: Roman Scherer Date: Sun, 22 Jan 2023 21:06:43 +0100 Message-ID: <86ilgyuyc1.fsf@burningswell.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: none client-ip=2a00:1450:4864:20::630; envelope-from=roman.scherer@burningswell.com; helo=mail-ej1-x630.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674418165; a=rsa-sha256; cv=none; b=aGIwf+Fhg4ACWcvv/J/zhe5GicPATU83fre6ozTkLw00al5wZxrowmIxL9jII29EI2nOW8 xRlYN/TTZLNxgprwVlCuwVv/F5rV2uJJ5jFv/Bu9XlM6EBhjdHW07yzPfUv2+QQSXJckut iD6OQhLNI8beQrx1Ta7/b2EXl7No1P+uswi3SEQWpQlbdhspJDU09Ec0LxF7pi2Bfx0Q+j jYYjUW2w8CJT5Lg/LJb/3RDd+JwyhxZ+Bo7OSH3eIIJFqz5905KFsf1YZ2DdS4KyLp7Jfz 9Obah+PgJmpf9rlgGPLYe1NTuCdP5at6Yqoq38JCAi9t4+P3ldaW6yG4LFK/TA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=burningswell-com.20210112.gappssmtp.com header.s=20210112 header.b="0qyFB/3g"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674418165; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=BuIpt1XBXskrelt2qFEyEjezSgHF4LaDylKDsi+PaNU=; b=Cd8SXPJCJ59a5NdXGxOHZUD2GJrh4L17Dh+ueRUM/J41mlxRMlQiqFLMejlzX1WEvv6duf DR6XGT51hTOo54A1NX+briRXvi/EGg2oXkNlfADD4tKyZ60MzPiIfb6/n4uNXgyI5RmmWJ uDy0mTyyjx8CA6IKown0eXgDdOoxdC2LmO1jzjMn1pA96aWsrM4bV98MLbfZJvks6nAskm UqLutW7zxcBAZAbB0bv4nTEjakyptcLJJQ+/jnArDxwDrYDZzcCu5o1oeoguWMWB11uWGw cOCG4Yna0Odagb+cJoxjJRTZoL9rQ8bAPF+57dKS5pBgo06vJrWWhvaetlPD3A== X-Spam-Score: -1.79 X-Migadu-Queue-Id: 9A1F21BBCA Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=burningswell-com.20210112.gappssmtp.com header.s=20210112 header.b="0qyFB/3g"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.79 X-TUID: hQK4iQmarBgZ --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-jemalloc-Update-to-5.3.0.patch Content-Transfer-Encoding: quoted-printable From=2087b3983e2981fc433b4b7e24f6d3b13f17d90c56 Mon Sep 17 00:00:00 2001 From: r0man 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. =2D-- 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 =2D-- 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) =2D (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 =2D "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl"))= )) + "1apyxjd1ixy4g8xkr61p0ny8jiz8vyv1j0k4nxqkxpqrf4g2vf1d")))) (arguments (substitute-keyword-arguments (package-arguments jemalloc-4.5.0) ;; Disable the thread local storage model in jemalloc 5 to prevent =2D-=20 2.38.1 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-gnu-jemalloc-Build-with-large-page-size-on-aarch64.patch Content-Transfer-Encoding: quoted-printable From=20ff4f0076185143436058315a9d8ae74830c84eff Mon Sep 17 00:00:00 2001 From: r0man 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 aarch= 64. =2D-- 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 =2D-- 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=3D14")) ("powerpc-linux" (list "--disable-thp" "CPPFLAGS=3D-maltivec")) (_ =2D-=20 2.38.1 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0003-gnu-icecat-Fix-disable-eme-option-on-aarch64.patch Content-Transfer-Encoding: quoted-printable From=2071bf3cf7187de92f7974bedc2d0291a78a0754bc Mon Sep 17 00:00:00 2001 From: r0man 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. =2D-- 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 =2D-- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -756,7 +756,8 @@ (define-public icecat "--disable-tests" "--disable-updater" "--disable-crashreporter" =2D "--disable-eme" + ;; The --disable-eme option is not available on aarch64. + #$(if (target-aarch64?) "" "--disable-eme") =20 ;; Building with debugging symbols takes ~5GiB, so disable it. "--disable-debug" =2D-=20 2.38.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmPNl64fHHJvbWFuLnNj aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmeCTCACOPRGUqtSsZ8eS YIAe2RM4VKQla2PPWrolCqP6Ts52ehME25vZv7KHvjCrowVx2DHPrObSWKcH1GJM D049lB5nEmnDtU1XTLFH//UJZMDr2Oui4F+D0XKmnfT98p5O3oIyAuaXXOuoOkEP Unql6gDfiSo0xznarWJ/6nnaYtQuxkyzedAHSokN9qlqWvYSZe1DJiWPSrrxYuuw JuNUCletNAp1D621RD5r/oTn5MW9DMRk37zMooNLUrltVXC3Kj8kRDVfrWqAGMEm lHPWkR4qoXiwFhA95xRbSNrq1DVnEyh52fVQpcYUUA72TVH7EEjNiWfHUdKf0SNL 1fvkouUn =y9uY -----END PGP SIGNATURE----- --==-=-=--