NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.46k stars 12.96k forks source link

Build failure: virtualbox-modules 7.0.12-6.9 #312336

Open mevatron opened 1 month ago

mevatron commented 1 month ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. I have virtualisation.virtualbox.host.enable = true; set in my system config.

Build log

@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/812ni2dg2zgch4997k0zzc47mmcj82ja-virtualbox-7.0.12-modsrc
source root is virtualbox-7.0.12-modsrc
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
build flags: -j16 SHELL=/nix/store/57dqrh5d96g2lriyyf81j53vzphfflh9-bash-5.2-p15/bin/bash INSTALL_MOD_PATH=\$\(out\)
=== Building 'vboxdrv' module ===
make[1]: Entering directory '/build/virtualbox-7.0.12-modsrc/vboxdrv'
make V= CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /nix/store/4k54vmi0mwxbrpkxp1z9x62pbsz64kl7-linux-6.9-dev/lib/modules/6.9.0/build M=/build/virtualbox-7.0.12-modsrc/vboxdrv SRCROOT=/build/virtualbox->
make[2]: Entering directory '/nix/store/4k54vmi0mwxbrpkxp1z9x62pbsz64kl7-linux-6.9-dev/lib/modules/6.9.0/build'
make[2]: warning: -j16 forced in submake: resetting jobserver mode.
  CC [M]  /build/virtualbox-7.0.12-modsrc/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /build/virtualbox-7.0.12-modsrc/vboxdrv/SUPDrv.o
  CC [M]  /build/virtualbox-7.0.12-modsrc/vboxdrv/SUPDrvGip.o
  CC [M]  /build/virtualbox-7.0.12-modsrc/vboxdrv/SUPDrvSem.o
  CC [M]  /build/virtualbox-7.0.12-modsrc/vboxdrv/SUPDrvTracer.o
  CC [M]  /build/virtualbox-7.0.12-modsrc/vboxdrv/SUPLibAll.o
  CC [M]  /build/virtualbox-7.0.12-modsrc/vboxdrv/common/string/strformatrt.o
  CC [M]  /build/virtualbox-7.0.12-modsrc/vboxdrv/combined-agnostic1.o
  CC [M]  /build/virtualbox-7.0.12-modsrc/vboxdrv/combined-agnostic2.o
  CC [M]  /build/virtualbox-7.0.12-modsrc/vboxdrv/combined-os-specific.o
In file included from /build/virtualbox-7.0.12-modsrc/vboxdrv/combined-os-specific.c:43:
/build/virtualbox-7.0.12-modsrc/vboxdrv/r0drv/linux/memobj-r0drv-linux.c: In function 'VBoxHost_rtR0MemObjLinuxVirtToPage':
/build/virtualbox-7.0.12-modsrc/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1177:9: error: implicit declaration of function 'p4d_large'; did you mean 'p4d_page'? [-Werror=implicit-function-declaration]
 1177 |     if (p4d_large(u.Four))
      |         ^~~~~~~~~
      |         p4d_page
/build/virtualbox-7.0.12-modsrc/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1193:9: error: implicit declaration of function 'pud_large'; did you mean 'pud_page'? [-Werror=implicit-function-declaration]
 1193 |     if (pud_large(u.Upper))
      |         ^~~~~~~~~
      |         pud_page
/build/virtualbox-7.0.12-modsrc/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1209:9: error: implicit declaration of function 'pmd_large'; did you mean 'pmd_page'? [-Werror=implicit-function-declaration]
 1209 |     if (pmd_large(u.Middle))
      |         ^~~~~~~~~
      |         pmd_page
cc1: some warnings being treated as errors
make[4]: *** [/nix/store/4k54vmi0mwxbrpkxp1z9x62pbsz64kl7-linux-6.9-dev/lib/modules/6.9.0/source/scripts/Makefile.build:244: /build/virtualbox-7.0.12-modsrc/vboxdrv/combined-os-specific.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [/nix/store/4k54vmi0mwxbrpkxp1z9x62pbsz64kl7-linux-6.9-dev/lib/modules/6.9.0/source/Makefile:1919: /build/virtualbox-7.0.12-modsrc/vboxdrv] Error 2
make[2]: *** [/nix/store/4k54vmi0mwxbrpkxp1z9x62pbsz64kl7-linux-6.9-dev/lib/modules/6.9.0/source/Makefile:240: __sub-make] Error 2
make[2]: Leaving directory '/nix/store/4k54vmi0mwxbrpkxp1z9x62pbsz64kl7-linux-6.9-dev/lib/modules/6.9.0/build'
make[1]: *** [/build/virtualbox-7.0.12-modsrc/vboxdrv/Makefile-footer.gmk:133: vboxdrv] Error 2
make[1]: Leaving directory '/build/virtualbox-7.0.12-modsrc/vboxdrv'
make: *** [Makefile:78: vboxdrv] Error 2

Additional context

Add any other context about the problem here.

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.9, NixOS, 23.11 (Tapir), 23.11.20240512.44072e2`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

Vitstark commented 1 month ago

Actual for my config too:

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.9.0, NixOS, 23.11 (Tapir), 23.11.7122.9ddcaffecdf0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
konsti219 commented 1 month ago

This only happens for me if boot.kernelPackages = pkgs.linuxPackages_latest; is set. It worked fine with kernel 6.8, but it now seems to break with kernel 6.9.0.

My system info:

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.9.0, NixOS, 23.11 (Tapir), 23.11.20240514.9ddcaff`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.11, nixos-hardware"`
 - channels(konsti): `"nixpkgs-unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Jacob-P-Busby commented 1 month ago

I'm having the same problem with kernel 6.8.9, creating the same build log as mentioned above.

Zero clue about the build process for the virtualbox package, but I've temporarily commented out virtualisation.virtualbox.host.enable = true; and it solved the issue.

I'm not too knowledgeable on how nix packages are built, but as the log mentions c code, there may have been a regression upstream with the actual source code. This is just a guess though.

nix-info:

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.9, NixOS, 24.05 (Uakari), 24.05.20240505.25865a4`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"home-manager-23.11.tar.gz, nixos-23.11"`
 - nixpkgs: `/nix/store/3pif36ks3f56py4wb1dkq6sh0nkf3ygj-source`
pyrox0 commented 1 month ago

As per the VirtualBox Changelog, version 7.0.16 adds support for kernel 6.9(see the upstream bug report). Therefore, #311362 should resolve this, but it depends on #303790 being merged first. Once both of those are merged, the build should be fixed. For now, though, you should set virtualisation.virtualbox.host.enable to false.

nixos-discourse commented 1 month ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/why-am-i-unable-to-build-vmware-for-the-last-few-weeks/46278/2

nixos-discourse commented 3 weeks ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/thinkpad-t14s-wont-power-down/46809/10