-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output of packages using jemalloc-sys rust crate is dependend on host kernel pagesize #202863
Comments
For context, this affects all users running NixOS on Apple hardware by way of https://github.com/tpwrules/nixos-apple-silicon's Asahi Linux kernel and other packages. From Asahi Linux's initial alpha release notes:
As suggested in sharkdp/fd#1085, passing the So, at least in the case of diff --git a/pkgs/tools/misc/fd/default.nix b/pkgs/tools/misc/fd/default.nix
index b1845451491..ff603112a6a 100644
--- a/pkgs/tools/misc/fd/default.nix
+++ b/pkgs/tools/misc/fd/default.nix
@@ -15,6 +15,8 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ installShellFiles ];
+ JEMALLOC_SYS_WITH_LG_PAGE = 16;
+
# skip flaky test
checkFlags = [
"--skip=test_owner_current_group" But I'm guessing that this case-by-case workaround isn't the most efficient way to provide a fix – #243324 seems simpler. |
jemalloc-sys hardcodes the build system's pagesize (#202863), making it incompatible with systems that don't have the standard 4k page size (such as Asahi Linux).
jemalloc-sys hardcodes the build system's pagesize (NixOS#202863), making it incompatible with systems that don't have the standard 4k page size (such as Asahi Linux).
Some of the build parameters are auto-detected by jemalloc-sys:
https://github.com/gnzlbg/jemallocator/tree/master/jemalloc-sys#environment-variables
In our jemalloc package, we already consider support for >4k page size on aarch64, but jemalloc-sys builds its own jemalloc and thus these fixes are not applied there.
IMO the best solution would be to make jemalloc-sys use our distro's jemalloc package everywhere, using the JEMALLOC_OVERRIDE env variable.
For instance, this would work to fix
fd
:The text was updated successfully, but these errors were encountered: