<jemalloc>: Unsupported system page size [solved]
This took me forever to piece together so I'm going to write it down here because I didn't see it anywhere here. Running a misconfigured precompiled binary on a certain arm64 server panics and fails due to the title of this issue. This is because the file system's page file is 64k. This causes jemalloc-sys (really jemalloc) to panic and exit because it defaults to 4k I think. This is easily fixed if you put in "JEMALLOC_SYS_WITH_LG_PAGE=16",
in Cross.toml
(16 because 64k = 2^16).
Maybe for a fix offer 2 different versions for arch binaries?
$ getconf PAGE_SIZE
65536
$ cat Cross.toml
[build.env]
passthrough = [
"RUSTC_WRAPPER",
"AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY",
"SCCACHE_BUCKET",
"SCCACHE_ENDPOINT",
"SCCACHE_S3_USE_SSL",
"JEMALLOC_SYS_WITH_LG_PAGE=16",
]
... more stuff down here
This references https://github.com/jemalloc/jemalloc/issues/467 and the rust caller https://crates.io/crates/jemalloc-sys
Edited by jan kete