Hello nix-dev!

If you're a Haskell user and run NixOS unstable or newer, by now you
have probably seen the message:

"unable to decommit memory: Invalid argument"

coming from GHC-built programs. The short version is, you need the
latest Linux kernel; try with

  boot.kernelPackages = pkgs.linuxPackages_latest;

in your configuration.nix.

The long version of the story [1] is that Linux 4.5 added a feature
present in other Unixy systems for some time (MADV_FREE). The NixOS
default glibc is currently newer than that, so it advertises MADV_FREE
and GHC will use it. But, the default kernel in NixOS is Linux 4.4 at
the moment, where the MADV_FREE isn't supported.

Hope this helps,
Thomas

[1]. https://ghc.haskell.org/trac/ghc/ticket/12495
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to