Why am I unable to build vmware for the last few weeks

I wonder if I’m doing something wrong.

Is this not supposed to work? It’s been giving me this error for weeks.

copying path '/nix/store/cbr8nlr38aj742ia6bwxq48n201lc7h2-rygel-0.42.5' from 'https://cache.nixos.org'...
DED_CC code/server/sv_client.c
  LD [M]  /build/source/vmmon-only/vmmon.ko
  BTF [M] /build/source/vmmon-only/vmmon.ko
Skipping BTF generation for /build/source/vmmon-only/vmmon.ko due to unavailability of vmlinux
make[2]: Leaving directory '/nix/store/1s3p9wbbxci26azycpppwdml12cnaai9-linux-6.9.2-dev/lib/modules/6.9.2/build'
make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[2]: Entering directory '/build/source/vmmon-only'
make[2]: 'postbuild' is up to date.
make[2]: Leaving directory '/build/source/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make[1]: Leaving directory '/build/source/vmmon-only'
error: builder for '/nix/store/38vlxl49c9ac6i5nvx05daz6kqfvysk6-vmware-modules-workstation-17.5.1-unstable-2024-01-12-6.9.2.drv' failed with exit code 2
error: 1 dependencies of derivation '/nix/store/wysmi42l7yq8djn1yjnhxyi6f1k8gdzb-kernel-modules.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4qfvz1rg632732861p6qfpzfya0s4dkc-linux-6.9.2-modules.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pzvci9s1bywc6zxpl67wv5a2b9dqs0rw-nixos-system-quasar-23.11.7454.25cf937a30bf.drv' failed to build

This is a known issue with kernels that are version 6.9 or later. See this issue comment for more info.

You need patches to build vmware against kernel 5.9. They are available here: GitHub - mkubecek/vmware-host-modules: Patches needed to build VMware (Player and Workstation) host modules against recent kernels

An easier solution is probably to switch to the most recent LTS kernel.

LTS is like really old. Is there any other target that is a bit closer to 6.9?:wink:

6.6 isn’t all that old but you could use 6.7 or 6.8.

However, those kernels aren’t getting patches anymore so unless you need something specific from one of those kernels, I would use 6.6 LTS kernel.

Is 6.6 an LTS on 23.11 or are you talking 24.05?

It is the LTS kernel on 24.05 but it is an LTS kernel regardless.

ok, but what is the handle for it on 23.11?

…something like:?

  boot.kernelPackages = pkgs.linuxPackages_LTS6;
boot.kernelPackages = pkgs.linuxPackages_6_6;

Yes, thank you.

I also found this to get what those mean:

nix eval -f '<nixpkgs>' linuxPackages_latest.kernel.version
"6.9.4"

nix eval -f '<nixpkgs>' linuxPackages_6_8.kernel.version
"6.8.12"