Subject: Bug#1104080: linux: Please build with CONFIG_KERNEL_GZIP=y instead of CONFIG_KERNEL_XZ=y on sh4

From: Ben Hutchings <[email-masked]>
Date: Fri, 02 May 2025 20:55:45 +0200

On Fri, 2025-05-02 at 18:54 +0200, Ben Hutchings wrote:
> Control: tag -1 moreinfo
> 
> On Fri, 25 Apr 2025 11:38:14 +0200 John Paul Adrian Glaubitz <[email-masked]> wrote:
> > Source: linux
> > Version: 6.12.22-1
> > Severity: normal
> > User: [email-masked]
> > Usertags: sh4
> > X-Debbugs-Cc: [email-masked]
> > 
> > Hello,
> > 
> > src:linux currently fails to build from source on sh4 due to the kernel
> > image compression set to XZ (CONFIG_KERNEL_XZ=y).
> 
> You didn't say exactly why xz is a problem, but looking at the logs I
> see xz sometimes failing with an out-of-memory error.
[...]

By the way, this seems to be due to:

commit 8653c909922743bceb4800e5cc26087208c9e0e6
Author: Lasse Collin <[email-masked]>
Date:   Sun Jul 21 16:36:28 2024 +0300
 
    xz: use 128 MiB dictionary and force single-threaded mode

which causes xz to allocate 1346 MiB (!) at build time.

If you have the time, it might be worth trying to add an option to use a
smaller dictionary size again.

Ben.

-- 
Ben Hutchings
Absolutum obsoletum. (If it works, it's out of date.) - Stafford Beer