Skip to content
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

xanmod_stable fails to build with ZFS support. #338764

Closed
shymega opened this issue Sep 1, 2024 · 5 comments
Closed

xanmod_stable fails to build with ZFS support. #338764

shymega opened this issue Sep 1, 2024 · 5 comments

Comments

@shymega
Copy link

shymega commented Sep 1, 2024

I'm using NixOS (24.05), and attempting to rebuild, but ran into an issue with ZFS and Xanmod.

My configuration is:

boot.kernelPackages = pkgs.linuxPackages_xanmod_stable
boot.extraModulePackages = with config.boot.kernelPackages; [ zfs ];

The stack trace is below:

$ sudo nixos-rebuild boot --option builders '' && exit
building the system configuration...
error: builder for '/nix/store/k5ya2qhsvrrqcpp1zl4yiq6d6fy7d1q3-zfs-kernel-2.2.4-6.10.5.drv' failed with exit code 1;
       last 10 log lines:
       > checking whether blk_queue_write_cache() is GPL-only... yes
       > checking whether blk_queue_max_hw_sectors() is available... configure: error:
       >    *** None of the expected "blk_queue_max_hw_sectors" interfaces were detected.
       >  *** This may be because your kernel version is newer than what is
       >      *** supported, or you are using a patched custom kernel with
       >   *** incompatible modifications.
       >        ***
       >    *** ZFS Version: zfs-2.2.4-1
       >   *** Compatible Kernels: 3.10 - 6.8
       >
       For full logs, run 'nix log /nix/store/k5ya2qhsvrrqcpp1zl4yiq6d6fy7d1q3-zfs-kernel-2.2.4-6.10.5.drv'.
error: 1 dependencies of derivation '/nix/store/1fia7sqwwz02212ndv6cyxakw28kdbcn-linux-6.10.5-modules.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ibn52jj32yn2w7k7chn8skf1zh8dcqwx-nixos-system-MORPHEUS-LINUX-24.05.20240830.6e99f2a.drv' failed to build

I would rather use xanmod_stable, because I need this NixOS machine to be relatively stable.

I've tried using xanmod_latest, with the same issue.

Please do let me know if further details are required.

@jaen
Copy link
Contributor

jaen commented Sep 5, 2024

That's normal with ZFS – your kernel (6.10.5) is too new. You have to either:

  • wait for zfs_2_2: 2.2.5 -> 2.2.6 #339696 to be merged for Linux 6.10 support,
  • overlay newer ZFS on top of your nixpkgs (kind of annoying IME),
  • use LTS xanmod (that is, pkgs.linuxPackages_xanmod), but keep in mind that's Linux 6.6.

@shymega
Copy link
Author

shymega commented Sep 5, 2024

Yeah, I was aware. I did try pkgs.linuxPackages_xanmod, which was unfruitful last time I tried.

It would be useful to have an option like config.boot.zfs.package.latestCompatibleLinuxPackages;, but for other kernels, via an argument passed to the module. Would that be possible, do you think - maybe I should open an feature request?

@shymega
Copy link
Author

shymega commented Sep 5, 2024

Just saw #339696 was merged. I think I'll stick with LTS Xanmod for now.

I'll draft a feature request for a parameterised config.boot.zfs.package.latestCompatibleLinuxPackages at some point, though.

Seeing as LTS Xanmod works on my system, I will close this issue as completed.

@shymega shymega closed this as completed Sep 5, 2024
@amarshall
Copy link
Member

amarshall commented Sep 5, 2024

I’d be mostly fine with making the filter customizable. It’s easier (but still a bit of work) now that it’s actually dynamic rather than static. However, in general I don’t think using zfs.latestCompatibleLinuxPackages is a good idea, since your Kernel version can go backwards. IMO it’s better to specify the Kernel version and variant explicitly in your own config (or at least some amount of asserts).

@shymega
Copy link
Author

shymega commented Sep 5, 2024

I agree with you. Did you want to create the feature request, or shall I, and cc you in it? I'm not as familiar with the filter as other people may be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants