void-packages icon indicating copy to clipboard operation
void-packages copied to clipboard

Tracking: packages broken on larger pagesize kernels (like rpi5-kernel)

Open classabbyamp opened this issue 1 year ago • 3 comments

Some programs have issues when running on kernels with larger pagesizes.

jemalloc

One common case is programs (especially rust programs) that use jemalloc. this was fixed in #48194 for the jemalloc package itself and all rust packages built in the future, but some packages still may need a rebuild. This often manifests itself like this:

<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
memory allocation of 5 bytes failed

Probably broken

as yet untested, based on https://github.com/AsahiLinux/docs/wiki/Broken-Software#broken-packages

  • [ ] qt5-webengine
  • [ ] qt6-webengine (qt6-pdf?)

broken

  • [ ] zig: https://github.com/ziglang/zig/pull/17382
  • [ ] f2fs: broken in linux <=6.6, fixed in 6.7

classabbyamp avatar Jan 17 '24 19:01 classabbyamp

zig was definitely broken last year on 16k, the relevant pr's are in progress https://github.com/ziglang/zig/pull/17382

dkwo avatar Jan 17 '24 21:01 dkwo

For zig, we may consider this patch to mem.zig:

pub const page_size = switch (builtin.cpu.arch) {
    .wasm32, .wasm64 => 64 * 1024,
    .aarch64 => switch (builtin.os.tag) {
+        .macos, .ios, .watchos, .tvos, .linux => 16 * 1024,
-        .macos, .ios, .watchos, .tvos, => 16 * 1024,
        else => 4 * 1024,
    },
    .sparc64 => 8 * 1024,
    else => 4 * 1024,
};

I don't know how many aarch64 machines this would break, but at least it could be usable on rpi5 and apple.

dkwo avatar May 13 '24 20:05 dkwo

AFAIK F2FS still won't work, since it requires userspace support from f2fs-tools, which hasn't had a release yet.

Calandracas606 avatar Jun 24 '24 17:06 Calandracas606

Surprisingly, river from void's repo works fine on apple silicon (16k kernel), even though zig is broken. How is this possible??

dkwo avatar Aug 25 '24 11:08 dkwo

Surprisingly, river from void's repo works fine on apple silicon (16k kernel), even though zig is broken. How is this possible??

this makes sense, and works for the same reason that any cross compiled binaries work.

the zig compiler may be broken when using a 16k build machine, but binaries built by the compiler may work just fine.

this is exactly the same as why cross compilers work. the aarch64 gcc cross compiler runs on a x86_64 build machine, and outputs binaries which run on an aarch64 machine

Calandracas606 avatar Aug 25 '24 16:08 Calandracas606

zig pr implementing runtime page size detect has been merged into master :)

dkwo avatar Feb 07 '25 17:02 dkwo