void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.46k stars 2.09k forks source link

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

Open classabbyamp opened 5 months ago

classabbyamp commented 5 months ago

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

broken

dkwo commented 5 months ago

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

dkwo commented 1 month ago

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.

Calandracas606 commented 6 days ago

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