GNU bug report logs - #61009
[PATCH] Building Icecat and jemalloc on aarch64-linux

Previous Next

Package: guix-patches;

Reported by: Roman Scherer <roman.scherer <at> burningswell.com>

Date: Sun, 22 Jan 2023 20:09:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61009 in the body.
You can then email your comments to 61009 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#61009; Package guix-patches. (Sun, 22 Jan 2023 20:09:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Roman Scherer <roman.scherer <at> burningswell.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 22 Jan 2023 20:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Roman Scherer <roman.scherer <at> burningswell.com>
To: Guix Patches <guix-patches <at> gnu.org>
Subject: [PATCH] Building Icecat and jemalloc on aarch64-linux
Date: Sun, 22 Jan 2023 21:06:43 +0100
[Message part 1 (text/plain, inline)]
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

[0001-gnu-jemalloc-Update-to-5.3.0.patch (text/x-diff, attachment)]
[0002-gnu-jemalloc-Build-with-large-page-size-on-aarch64.patch (text/x-diff, attachment)]
[0003-gnu-icecat-Fix-disable-eme-option-on-aarch64.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#61009; Package guix-patches. (Sun, 05 Feb 2023 16:46:02 GMT) Full text and rfc822 format available.

Message #8 received at 61009 <at> debbugs.gnu.org (full text, mbox):

From: Roman Scherer <roman.scherer <at> burningswell.com>
To: 61009 <at> debbugs.gnu.org
Subject: [PATCH v2] Building Icecat and jemalloc on aarch64-linux
Date: Sun, 05 Feb 2023 17:35:28 +0100
[Message part 1 (text/plain, inline)]
Hi Guix,

here is another approach to this. This patch series updates jemalloc to
v5.3.0 and does not disable transparent huge pages on aarch64-linux,
similar to what we do on i686-linux and x86_64-linux. So I think this
would support now building binaries for Rust and Icecat on CI for 4K but
also larger kernel page sizes.

Could you please review the patches?

Thanks, Roman.

[0001-gnu-jemalloc-Update-to-5.3.0.patch (text/x-patch, attachment)]
[0002-gnu-jemalloc-Build-with-transparent-huge-pacges-on-a.patch (text/x-patch, attachment)]
[0003-gnu-icecat-Remove-unsupported-disable-eme-option-on-.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#61009; Package guix-patches. (Sun, 05 Feb 2023 17:33:02 GMT) Full text and rfc822 format available.

Message #11 received at 61009 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Roman Scherer <roman.scherer <at> burningswell.com>
Cc: 61009 <at> debbugs.gnu.org
Subject: Re: [bug#61009] [PATCH] Building Icecat and jemalloc on aarch64-linux
Date: Sun, 5 Feb 2023 18:32:41 +0100
On Sun, Jan 22, 2023 at 09:06:43PM +0100, Roman Scherer wrote:
> 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?

Guix adheres to the Free System Distribution Guidelines, which
explicitly forbids browsers with EME support:

https://guix.gnu.org/en/about/
https://www.gnu.org/distros/free-system-distribution-guidelines.en.html

Unfortunately, I don't know the answers to your other questions.




Information forwarded to guix-patches <at> gnu.org:
bug#61009; Package guix-patches. (Mon, 06 Feb 2023 20:05:01 GMT) Full text and rfc822 format available.

Message #14 received at 61009 <at> debbugs.gnu.org (full text, mbox):

From: Roman Scherer <roman.scherer <at> burningswell.com>
To: Leo Famulari <leo <at> famulari.name>
Cc: 61009 <at> debbugs.gnu.org
Subject: Re: [bug#61009] [PATCH] Building Icecat and jemalloc on aarch64-linux
Date: Mon, 06 Feb 2023 20:52:43 +0100
[Message part 1 (text/plain, inline)]
Hi Leo,

thanks for your reply. Ok, I understand. I try to see if I can disable
it in some other way then. Are you familiar with this? Do you have any
tips to share?

I think the v2 patches about transparent huge pages for jemalloc could
still be an improvement, if it's a compatible change. It would enable
the use of rust substitutes that depend on jemalloc on aarch64 that run
with kernel pages > 4K.

Roman

Leo Famulari <leo <at> famulari.name> writes:

> On Sun, Jan 22, 2023 at 09:06:43PM +0100, Roman Scherer wrote:
>> 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?
>
> Guix adheres to the Free System Distribution Guidelines, which
> explicitly forbids browsers with EME support:
>
> https://guix.gnu.org/en/about/
> https://www.gnu.org/distros/free-system-distribution-guidelines.en.html
>
> Unfortunately, I don't know the answers to your other questions.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#61009; Package guix-patches. (Thu, 09 Feb 2023 12:51:02 GMT) Full text and rfc822 format available.

Message #17 received at 61009 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Roman Scherer <roman.scherer <at> burningswell.com>
Cc: 61009 <at> debbugs.gnu.org
Subject: Re: [bug#61009] [PATCH] Building Icecat and jemalloc on aarch64-linux
Date: Thu, 9 Feb 2023 13:49:56 +0100
On Mon, Feb 06, 2023 at 08:52:43PM +0100, Roman Scherer wrote:
> thanks for your reply. Ok, I understand. I try to see if I can disable
> it in some other way then. Are you familiar with this? Do you have any
> tips to share?

No, I don't have any specific knowledge about IceCat or aarch64.

Mark Weaver is the primary maintainer of our IceCat package.

It seems like a mistake that IceCat would require EME on a particular
architecture. Maybe the name of the configure option has changed.




Information forwarded to guix-patches <at> gnu.org:
bug#61009; Package guix-patches. (Sat, 11 Feb 2023 09:46:01 GMT) Full text and rfc822 format available.

Message #20 received at 61009 <at> debbugs.gnu.org (full text, mbox):

From: Roman Scherer <roman.scherer <at> burningswell.com>
To: Leo Famulari <leo <at> famulari.name>
Cc: 61009 <at> debbugs.gnu.org
Subject: Re: [bug#61009] [PATCH] Building Icecat and jemalloc on aarch64-linux
Date: Sat, 11 Feb 2023 10:44:27 +0100
[Message part 1 (text/plain, inline)]
Alright, thanks Leo!

Leo Famulari <leo <at> famulari.name> writes:

> On Mon, Feb 06, 2023 at 08:52:43PM +0100, Roman Scherer wrote:
>> thanks for your reply. Ok, I understand. I try to see if I can disable
>> it in some other way then. Are you familiar with this? Do you have any
>> tips to share?
>
> No, I don't have any specific knowledge about IceCat or aarch64.
>
> Mark Weaver is the primary maintainer of our IceCat package.
>
> It seems like a mistake that IceCat would require EME on a particular
> architecture. Maybe the name of the configure option has changed.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#61009; Package guix-patches. (Wed, 01 Mar 2023 15:49:02 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Roman Scherer <roman.scherer <at> burningswell.com>
Cc: 61009 <at> debbugs.gnu.org, guix-patches <at> gnu.org,
 Leo Famulari <leo <at> famulari.name>
Subject: Re: [bug#61009] [PATCH] Building Icecat and jemalloc on aarch64-linux
Date: Wed, 01 Mar 2023 15:46:20 +0000
[Message part 1 (text/plain, inline)]
Roman Scherer <roman.scherer <at> burningswell.com> writes:

> Alright, thanks Leo!
>
> Leo Famulari <leo <at> famulari.name> writes:
>
>> On Mon, Feb 06, 2023 at 08:52:43PM +0100, Roman Scherer wrote:
>>> thanks for your reply. Ok, I understand. I try to see if I can disable
>>> it in some other way then. Are you familiar with this? Do you have any
>>> tips to share?
>>
>> No, I don't have any specific knowledge about IceCat or aarch64.
>>
>> Mark Weaver is the primary maintainer of our IceCat package.
>>
>> It seems like a mistake that IceCat would require EME on a particular
>> architecture. Maybe the name of the configure option has changed.

I've pushed one of these patches now as
72ec11d24f34104efce0d91050a3faba4e2c7242. I missed any other patches
that were sent to this issue.

I think removing the --disable-eme option is OK on aarch64 as it's
probably not an option since I'm guessing EME isn't available on
aarch64. Anyway, Icecat looks to add these disable options by default so
I'm not sure we need it for any architecture in the guix package.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#61009; Package guix-patches. (Wed, 01 Mar 2023 15:49:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#61009; Package guix-patches. (Wed, 01 Mar 2023 18:16:02 GMT) Full text and rfc822 format available.

Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Roman Scherer <roman.scherer <at> burningswell.com>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 61009 <at> debbugs.gnu.org, guix-patches <at> gnu.org,
 Leo Famulari <leo <at> famulari.name>
Subject: Re: [bug#61009] [PATCH] Building Icecat and jemalloc on aarch64-linux
Date: Wed, 01 Mar 2023 19:05:38 +0100
[Message part 1 (text/plain, inline)]
Hi Christopher,

thanks for applying the patch and for the explanation.

Not sure what you meant by "missed". But, I sent an improved version of
the jemalloc patches as a separate issue a while ago. They are here:

https://lists.gnu.org/archive/html/guix-patches/2023-02/msg00698.html

Without the jemalloc patches, Icecat and all other packages using
jemalloc crash with the error `<jemalloc>: Unsupported system page size`
on aarch64 systems that run with kernel page sizes > 4K.

If you are familiar with this, I could need some help here as well ;)

Thanks, Roman.

Christopher Baines <mail <at> cbaines.net> writes:

> [[PGP Signed Part:Undecided]]
>
> Roman Scherer <roman.scherer <at> burningswell.com> writes:
>
>> Alright, thanks Leo!
>>
>> Leo Famulari <leo <at> famulari.name> writes:
>>
>>> On Mon, Feb 06, 2023 at 08:52:43PM +0100, Roman Scherer wrote:
>>>> thanks for your reply. Ok, I understand. I try to see if I can disable
>>>> it in some other way then. Are you familiar with this? Do you have any
>>>> tips to share?
>>>
>>> No, I don't have any specific knowledge about IceCat or aarch64.
>>>
>>> Mark Weaver is the primary maintainer of our IceCat package.
>>>
>>> It seems like a mistake that IceCat would require EME on a particular
>>> architecture. Maybe the name of the configure option has changed.
>
> I've pushed one of these patches now as
> 72ec11d24f34104efce0d91050a3faba4e2c7242. I missed any other patches
> that were sent to this issue.
>
> I think removing the --disable-eme option is OK on aarch64 as it's
> probably not an option since I'm guessing EME isn't available on
> aarch64. Anyway, Icecat looks to add these disable options by default so
> I'm not sure we need it for any architecture in the guix package.
>
> [[End of PGP Signed Part]]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#61009; Package guix-patches. (Wed, 01 Mar 2023 18:16:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#61009; Package guix-patches. (Thu, 02 Mar 2023 10:23:02 GMT) Full text and rfc822 format available.

Message #35 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Roman Scherer <roman.scherer <at> burningswell.com>
Cc: 61009-done <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#61009] [PATCH] Building Icecat and jemalloc on aarch64-linux
Date: Thu, 02 Mar 2023 10:07:17 +0000
[Message part 1 (text/plain, inline)]
Roman Scherer <roman.scherer <at> burningswell.com> writes:

> Hi Christopher,
>
> thanks for applying the patch and for the explanation.
>
> Not sure what you meant by "missed". But, I sent an improved version of
> the jemalloc patches as a separate issue a while ago. They are here:
>
> https://lists.gnu.org/archive/html/guix-patches/2023-02/msg00698.html
>
> Without the jemalloc patches, Icecat and all other packages using
> jemalloc crash with the error `<jemalloc>: Unsupported system page size`
> on aarch64 systems that run with kernel page sizes > 4K.
>
> If you are familiar with this, I could need some help here as well ;)

Sending the jemalloc patch seperately sounds good. I'm going to mark
this issue as done since that's tracked separately.

I've replied to that separate issue, but I think that these changes may
already be in place on core-updates. I'm going to have a go at merging
master in to core-updates which should allow for testing icecat in
core-updates with the changes I've merged in master.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Thu, 02 Mar 2023 10:23:02 GMT) Full text and rfc822 format available.

Notification sent to Roman Scherer <roman.scherer <at> burningswell.com>:
bug acknowledged by developer. (Thu, 02 Mar 2023 10:23:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 30 Mar 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.