| 8 Mar 2026 |
matthewcroughan - nix.how | like with bash | 17:22:04 |
matthewcroughan - nix.how | I notice the build graph starts off with a glib that does get fixed, and then ends on another glib which is not fixed | 17:22:22 |
matthewcroughan - nix.how |  Download image.png | 17:22:43 |
Alyssa Ross | hmm, maybe it's from some library glib links or something, then? maybe you can catch it in a debugger | 18:49:00 |
| 10 Mar 2026 |
| amaan joined the room. | 05:34:54 |
Puna | 👋 | 05:35:11 |
amaan | hey 👋 | 05:35:51 |
Puna | so ArchPOWER's ppc64 build has a 64k page size? have you run into any issues with that, or know of any patches they're applying for that to work? | 05:36:53 |
Puna | i've only ever tested 4K, cus that's what Debian uses | 05:37:21 |
amaan | yeah i ran into issues building jemalloc which is why i submitted that patch, tho it seems to vary by distro i guess, tbf I just got access to this machine today and figured I'd build a nix iso on it to try it out | 05:37:33 |
Puna | ahhh oki! | 05:37:48 |
Puna | do you know how the machine's firmware looks for bootable media? i have some PRs and a branch in my fork that works for making a PowerMac (and maybe CHRP?) compatible ISO, but i don't have access to anything newer than ~ POWER4. | 05:38:57 |
Puna | the branch in question, if you wanna give that a try: https://github.com/OPNA2608/nixpkgs/tree/wip/ppc64-installer | 05:42:12 |
amaan | i guess gentoo, suse, and fedora also use 64kb page sizes:
https://github.com/gentoo/genkernel/blob/master/arch/ppc64/arch-config#L26
https://github.com/openSUSE/kernel-source/blob/master/config/ppc64le/default#L559
https://src.fedoraproject.org/rpms/kernel/blob/rawhide/f/kernel-ppc64le-fedora.config#_5366
also in the ppc kconfig it defaults to 64kb in certain scenarios interestingly - https://github.com/torvalds/linux/blob/master/arch/powerpc/Kconfig#L853 | 05:42:52 |
amaan | i am not sure tbh, i just found a zulip that offers free machines to ssh to and dev on tho...they are power8 btw | 05:43:24 |
amaan | my plan was to build the iso then ask the owner to install it in a dedicated vm to play around on | 05:43:41 |
Puna | hmm… prolly makes sense to default to the 64K-compatible setting for jemalloc then, just to cover more systems. as said, the 64K setting should work on 4K systems? it might just not be optimal (at least according to an upstream issue on raising the aarch64 default from 4K to 64K).
a function argument to override that would prolly still be nice though - could be interesting for someone measuring the performance impact and deciding to optimise for their system via an overlay.
| 05:52:16 |
amaan | yeah i think providing a function argument makes sense | 05:53:10 |
Puna | diff --git a/pkgs/by-name/je/jemalloc/package.nix b/pkgs/by-name/je/jemalloc/package.nix
index 202195c152db..88e7b776b28d 100644
--- a/pkgs/by-name/je/jemalloc/package.nix
+++ b/pkgs/by-name/je/jemalloc/package.nix
@@ -13,6 +13,18 @@
# compatibility.
stripPrefix ? stdenv.hostPlatform.isDarwin,
disableInitExecTls ? false,
+ # The upstream default is dependent on the builders' page size
+ # https://github.com/jemalloc/jemalloc/issues/467
+ # https://sources.debian.org/src/jemalloc/5.3.0-3/debian/rules/
+ pageSizeLog2 ?
+ if
+ (
+ stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isLoongArch64 || stdenv.hostPlatform.isPower64
+ )
+ then
+ 16
+ else
+ 12,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -46,21 +58,11 @@ stdenv.mkDerivation (finalAttrs: {
configureFlags = [
"--with-version=${lib.versions.majorMinor finalAttrs.version}.0-0-g${finalAttrs.src.rev}"
"--with-lg-vaddr=${with stdenv.hostPlatform; toString (if isILP32 then 32 else parsed.cpu.bits)}"
+ (lib.strings.withFeatureAs true "lg-page" (toString pageSizeLog2))
]
# see the comment on stripPrefix
++ lib.optional stripPrefix "--with-jemalloc-prefix="
++ lib.optional disableInitExecTls "--disable-initial-exec-tls"
- # The upstream default is dependent on the builders' page size
- # https://github.com/jemalloc/jemalloc/issues/467
- # https://sources.debian.org/src/jemalloc/5.3.0-3/debian/rules/
- ++ [
- (
- if (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isLoongArch64) then
- "--with-lg-page=16"
- else
- "--with-lg-page=12"
- )
- ]
# See https://github.com/jemalloc/jemalloc/issues/1997
# Using a value of 48 should work on both emulated and native x86_64-darwin.
++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) "--with-lg-vaddr=48";
ig
| 06:02:19 |
Puna | with the isPower64 addition in a separate commit, just to separate that abit more cleanly | 06:03:55 |
amaan | would you prefer that to be before or after the configurable page size? | 06:04:35 |
Puna | doesn't really matter i think | 06:04:58 |
amaan | i was thinking exposing just "pageSize" would be less of a cognitive burden on users | 06:05:11 |
amaan | and just adding a simple mapping | 06:05:23 |
Puna | should be fine as well | 06:08:11 |
amaan | cool, just updated the pr | 06:14:34 |
Puna | if we reject non-int values for pageSizeKiB with an assert + informative message, then supplying an unsupported number actually displays the supported options on my end (Lix)
error: attribute '"32"' missing
at /home/puna/Development/nixpkgs/pkgs/by-name/je/jemalloc/package.nix:76:10:
75| }
76| ."${toString pageSizeKiB}"
| ^
77| }"
note: trace involved the following derivations:
derivation 'jemalloc-5.3.0-unstable-2025-09-12'
Did you mean one of 16, 4 or 64?
maybe useful, prolly overkill. thoughts?
| 06:26:57 |
Puna | * if we reject non-int values for pageSizeKiB with an assert + informative message at the start, then supplying an unsupported number actually displays the supported options on my end (Lix)
error: attribute '"32"' missing
at /home/puna/Development/nixpkgs/pkgs/by-name/je/jemalloc/package.nix:76:10:
75| }
76| ."${toString pageSizeKiB}"
| ^
77| }"
note: trace involved the following derivations:
derivation 'jemalloc-5.3.0-unstable-2025-09-12'
Did you mean one of 16, 4 or 64?
maybe useful, prolly overkill. thoughts?
| 06:27:06 |
amaan | huh i already get that w/o an assert though | 06:29:50 |
amaan | if i pass in 32, for example:
error:
… while evaluating list element at index 2
… while calling the 'toString' builtin
at /home/amaanq/projects/nix/nixpkgs/pkgs/by-name/je/jemalloc/package.nix:70:7:
69| "--with-lg-page=${
70| toString
| ^
71| {
error: attribute '"32"' missing
at /home/amaanq/projects/nix/nixpkgs/pkgs/by-name/je/jemalloc/package.nix:71:9:
70| toString
71| {
| ^
72| "4" = 12;
Did you mean one of 16, 4 or 64?
| 06:30:14 |