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

[Bug]: failed to build dependencies of derication AND cannot unlink directory #37

Open
1 task done
Melody-TG opened this issue Jan 23, 2025 · 13 comments
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@Melody-TG
Copy link

Already reported ? *

  • I have searched the existing open and closed issues.

Regression?

No

System Info and Version

System/Version info
<System:
  Host: nixos Kernel: 6.6.72 arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 5.27.11 Distro: NixOS 24.11 (Vicuna)
Machine:
  Type: Desktop Mobo: ASUSTeK model: G15CS v: 1.0 serial: <superuser required>
    UEFI: American Megatrends v: G15CS.304 date: 08/18/2020
CPU:
  Info: 8-core model: Intel Core i7-9700F bits: 64 type: MCP cache: L2: 2 MiB
  Speed (MHz): avg: 1210 min/max: 800/4700 cores: 1: 800 2: 800 3: 4083
    4: 800 5: 800 6: 800 7: 800 8: 800
Graphics:
  Device-1: NVIDIA TU104 [GeForce RTX 2070 SUPER] driver: nouveau v: kernel
  Device-2: Logi Webcam C920e driver: snd-usb-audio,uvcvideo type: USB
  Display: x11 server: X.org v: 1.21.1.14 driver: gpu: nouveau resolution:
    1: 1920x1080~60Hz 2: 1920x1080~60Hz
  API: OpenGL Message: Unable to show GL data. glxinfo is missing.
Audio:
  Device-1: Intel Cannon Lake PCH cAVS driver: snd_hda_intel
  Device-2: NVIDIA TU104 HD Audio driver: snd_hda_intel
  Device-3: FIFINE Microphones Microphone
    driver: hid-generic,snd-usb-audio,usbhid type: USB
  Device-4: Logi Webcam C920e driver: snd-usb-audio,uvcvideo type: USB
  API: ALSA v: k6.6.72 status: kernel-api
  Server-1: PipeWire v: 1.2.7 status: active
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi
  IF: wlo1 state: up mac: 34:2e:b7:c8:e8:3f
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: r8169
  IF: eno2 state: down mac: 24:4b:fe:e8:d2:c5
Bluetooth:
  Device-1: N/A driver: btusb type: USB
  Report: rfkill ID: hci0 rfk-id: 3 state: down bt-service: not found
    rfk-block: hardware: no software: no address: see --recommends
Drives:
  Local Storage: total: 1.39 TiB used: 29.66 GiB (2.1%)
  ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKNW512G8 size: 476.94 GiB
  ID-2: /dev/sda vendor: Seagate model: ST1000DM010-2EP102 size: 931.51 GiB
  ID-3: /dev/sdd vendor: Patriot model: N/A size: 14.91 GiB type: USB
Partition:
  ID-1: / size: 451.05 GiB used: 29.63 GiB (6.6%) fs: ext4 dev: /dev/nvme0n1p2
  ID-2: /boot size: 511 MiB used: 29.4 MiB (5.7%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: partition size: 17.1 GiB used: 1.5 MiB (0.0%)
    dev: /dev/nvme0n1p3
Sensors:
  Src: /sys System Temperatures: cpu: 48.0 C pch: 43.0 C mobo: N/A
    gpu: nouveau temp: 28.0 C
  Fan Speeds (rpm): cpu: 600 gpu: nouveau fan: 987
Info:
  Memory: total: 16 GiB available: 15.55 GiB used: 2.63 GiB (16.9%)
  Processes: 248 Uptime: 1h 33m Shell: Bash inxi: 3.3.35>

KooL's Dots version

Whatever the current version is.

Description

I have ran both the main and alternative installation scripts for NixOS and both give me an error.

_warning: Git tree '/home/melody/NixOS-Hyprland' is dirty
building the system configuration...
warning: Git tree '/home/melody/NixOS-Hyprland' is dirty
error: builder for '/nix/store/2hidrkx03q9mqzf2zsmpyvgnxbqj5vma-v4l2loopback-0.13.2-6.13.drv' failed with exit code 2;
last 25 log lines:
> mkdir: cannot create directory '.tmp_87': Permission denied
> mkdir: cannot create directory '.tmp_90': Permission denied
> mkdir: cannot create directory '.tmp_93': Permission denied
> mkdir: cannot create directory '.tmp_96': Permission denied
> mkdir: cannot create directory '.tmp_99': Permission denied
> mkdir: cannot create directory '.tmp_102': Permission denied
> mkdir: cannot create directory '.tmp_105': Permission denied
> mkdir: cannot create directory '.tmp_108': Permission denied
> mkdir: cannot create directory '.tmp_111': Permission denied
> mkdir: cannot create directory '.tmp_114': Permission denied
> mkdir: cannot create directory '.tmp_117': Permission denied
> mkdir: cannot create directory '.tmp_120': Permission denied
> mkdir: cannot create directory '.tmp_123': Permission denied
> mkdir: cannot create directory '.tmp_126': Permission denied
> mkdir: cannot create directory '.tmp_129': Permission denied
> mkdir: cannot create directory '.tmp_132': Permission denied
> mkdir: cannot create directory '.tmp_135': Permission denied
> mkdir: cannot create directory '.tmp_138': Permission denied
> mkdir: cannot create directory '.tmp_141': Permission denied
> mkdir: cannot create directory '.tmp_144': Permission denied
> mkdir: cannot create directory '.tmp_147': Permission denied
> /nix/store/6b9j17qfxdvyh9kmi9fjgh6zg0ix8if5-linux-6.13-dev/lib/modules/6.13.0/source/Makefile:777: /nix/store/6b9j17qfxdvyh9kmi9fjgh6zg0ix8if5-linux-6.13-dev/lib/modules/6.13.0/source/include/config/auto.conf: No such file or directory
> make[1]: *** [/nix/store/6b9j17qfxdvyh9kmi9fjgh6zg0ix8if5-linux-6.13-dev/lib/modules/6.13.0/source/Makefile:251: __sub-make] Error 2
> make[1]: Leaving directory '/nix/store/6b9j17qfxdvyh9kmi9fjgh6zg0ix8if5-linux-6.13-dev/lib/modules/6.13.0/build'
> make: *** [Makefile:53: v4l2loopback.ko] Error 2
For full logs, run 'nix log /nix/store/2hidrkx03q9mqzf2zsmpyvgnxbqj5vma-v4l2loopback-0.13.2-6.13.drv'.
error: 1 dependencies of derivation '/nix/store/ckpc7114558gdzyan7p0l3mwh0cslhz5-linux-6.13-modules.drv' failed to build
error (ignored): error: cannot unlink '"/tmp/nix-build-nvidia-x11-565.77-6.13.drv-2/build/NVIDIA-Linux-x86_64-565.77"': Directory not empty
error: 1 dependencies of derivation '/nix/store/sani4fg7xsfykxx5qdx1s7gy2949bnqp-nixos-system-mel-25.05.20250121.9e4d519.drv' failed to build
_
is what i get. Below is what the .drv file says.

Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/xdbbsch12z9lx4hs8zci01j212b8m3lc-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
substituteStream() in derivation v4l2loopback-0.13.2-6.13: WARNING: '--replace' is deprecated, use --replace->
build flags: SHELL=/nix/store/4fvc5fm8bszmkydng1ivrvr5cbvr1g60-bash-5.2p37/bin/bash O=$(buildRoot) ARCH=x8>

++++++ To sign the module, you must set KBUILD_SIGN_KEY/KBUILD_SIGN_CERT to point to the signing key/certifi>
++++++ For your convenience, we try to read these variables as 'mok_signing_key' resp. 'mok_certificate' from>

++++++ If your certificate requires a password, pass it via the KBUILD_SIGN_PIN env-var!
++++++ E.g. using 'export KBUILD_SIGN_PIN; read -s -p "Passphrase for signing key : " KBUILD_SIGN_PIN; sudo ->

Building v4l2-loopback driver...
make -C /nix/store/6b9j17qfxdvyh9kmi9fjgh6zg0ix8if5-linux-6.13-dev/lib/modules/6.13.0/build M=/build/source K>
make[1]: Entering directory '/nix/store/6b9j17qfxdvyh9kmi9fjgh6zg0ix8if5-linux-6.13-dev/lib/modules/6.13.0/bu>
mkdir: cannot create directory '.tmp_72': Permission denied
mkdir: cannot create directory '.tmp_75': Permission denied

How to reproduce

Fresh install of Nix 24.11, run the install command for hyprland as written https://github.com/JaKooLit/NixOS-Hyprland?tab=readme-ov-file#-1-using-auto-install-script

install logs, images or videos

It wouldn't let me attach the drv

@Melody-TG Melody-TG added the bug Something isn't working label Jan 23, 2025
@JaKooLit
Copy link
Owner

try to clean garbage collection before running the script

sudo nix-collect-garbage -d

@Melody-TG
Copy link
Author

still failed to build and unlink.

error: 1 dependencies of derivation '/nix/store/ckpc7114558gdzyan7p0l3mwh0cslhz5-linux-6.13-modules.drv' failed to build
error (ignored): error: cannot unlink '"/tmp/nix-build-nvidia-x11-565.77-6.13.drv-3/build/NVIDIA-Linux-x86_64-565.77/kernel"': Directory not empty
error: 1 dependencies of derivation '/nix/store/sani4fg7xsfykxx5qdx1s7gy2949bnqp-nixos-system-mel-25.05.20250121.9e4d519.drv' failed to build

@JaKooLit
Copy link
Owner

could be one of those nixos moments again

try switching to stable kernel first

coule be the 6.13 kernel causing issue

edit

NixOS-Hyprland/host/default/config.nix

line 27. change the word latest to stable

then ran the install.sh in the NixOS-Hyprland NOT the auto-install

then follow accordingly

@JaKooLit
Copy link
Owner

anyway, im just guessing here

not infront of my system as Im travelling atm

@Melody-TG
Copy link
Author

Melody-TG commented Jan 23, 2025

got this now

warning: Git tree '/home/melody/NixOS-Hyprland' is dirty
error:
       … while calling the 'seq' builtin
         at /nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/lib/modules.nix:334:18:
          333|         options = checked options;
          334|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          335|         _module = checked (config._module);while evaluating a branch condition
         at /nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/lib/modules.nix:273:9:
          272|       checkUnmatched =
          273|         if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
             |         ^
          274|           let

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: syntax error, unexpected '=', expecting ';'
       at /nix/store/8g02rh0h5xpirls2khdrxfc3p28v7skg-source/hosts/melody/config.nix:80:17:
           79|       useTmpfs = true
           80|       tmpfsSize = "30%";
             |                 ^
           81|       };

Sorry to bother you on your vacation. I can gladly wait for you to get back. Safe Travels!

@JaKooLit
Copy link
Owner

np

I do believe you accidentally remove the

;

on that line

@Melody-TG
Copy link
Author

Ok, after a million years of combing through and adding all the semicolons, i have been left with this wack error

warning: Git tree '/home/melody/NixOS-Hyprland' is dirty
building the system configuration...
warning: Git tree '/home/melody/NixOS-Hyprland' is dirty
error:
       … while calling the 'head' builtin
         at /nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/lib/attrsets.nix:1574:11:
         1573|         || pred here (elemAt values 1) (head values) then
         1574|           head values
             |           ^
         1575|         elsewhile evaluating the attribute 'value'
         at /nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/lib/modules.nix:846:9:
          845|     in warnDeprecation opt //
          846|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          847|         inherit (res.defsFinal') highestPrio;while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `assertions':

       … while evaluating definitions from `/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/nixos/modules/system/boot/systemd.nix':

       … while evaluating the option `systemd.services':

       … while evaluating definitions from `/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/nixos/modules/services/logging/logrotate.nix':

       … while evaluating the option `services.logrotate.enable':

       … while evaluating the option `users.groups':

       … while evaluating definitions from `/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/nixos/modules/config/resolvconf.nix':

       … while evaluating the option `networking.resolvconf.enable':

       … while evaluating the option `environment.etc':

       … while evaluating definitions from `/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/nixos/modules/hardware/video/nvidia.nix':

       … while evaluating the option `hardware.nvidia.package':

       … while evaluating definitions from `/nix/store/i1c0iycl81ja5sfi6xn74ybcaaln4qy7-source/modules/nvidia-drivers.nix':

       … while evaluating the option `boot.kernelPackages':

       … while evaluating definitions from `/nix/store/i1c0iycl81ja5sfi6xn74ybcaaln4qy7-source/hosts/default/config.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'linuxPackages_stable' missing
       at /nix/store/i1c0iycl81ja5sfi6xn74ybcaaln4qy7-source/hosts/default/config.nix:27:22:
           26|   boot = {
           27|     kernelPackages = pkgs.linuxPackages_stable; # Kernel
             |                      ^
           28|

@JaKooLit
Copy link
Owner

https://nixos.wiki/wiki/Linux_kernel

woops

apologized, my bad.

there are no such thing as "stable"

lts kernel is abit old.

recommend to try the zen instead

so replace the stable with zen

@Melody-TG
Copy link
Author

That fixed that issue, and I promised I looked this up. But it's giving me time zone errors now

warning: Git tree '/home/melody/NixOS-Hyprland' is dirty
building the system configuration...
warning: Git tree '/home/melody/NixOS-Hyprland' is dirty
error:
       … while calling the 'head' builtin
         at /nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/lib/attrsets.nix:1574:11:
         1573|         || pred here (elemAt values 1) (head values) then
         1574|           head values
             |           ^
         1575|         elsewhile evaluating the attribute 'value'
         at /nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/lib/modules.nix:846:9:
          845|     in warnDeprecation opt //
          846|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          847|         inherit (res.defsFinal') highestPrio;while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `assertions':

       … while evaluating definitions from `/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/nixos/modules/system/boot/systemd.nix':

       … while evaluating the option `systemd.services':

       … while evaluating definitions from `/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/nixos/modules/services/logging/logrotate.nix':

       … while evaluating the option `services.logrotate.enable':

       … while evaluating the option `users.groups':

       … while evaluating definitions from `/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/nixos/modules/config/resolvconf.nix':

       … while evaluating the option `networking.resolvconf.enable':

       … while evaluating the option `environment.etc':

       … while evaluating definitions from `/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source/nixos/modules/config/locale.nix':

       … while evaluating the option `time.timeZone':

       … while evaluating definitions from `/nix/store/j0avjvbyrcqyzgn925q5ncizj8bkckz5-source/hosts/melody/config.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attempt to call something which is not a function but a string: "America/Los_Angeles"
       at /nix/store/j0avjvbyrcqyzgn925q5ncizj8bkckz5-source/hosts/melody/config.nix:122:19:
          121|   # Set your time zone.
          122|   time.timeZone = "America/Los_Angeles"
             |                   ^
          123|

@JaKooLit
Copy link
Owner

make sure you didnt ommit the

;

at the end

@Melody-TG
Copy link
Author

Now that that's fixed I get

Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/xdbbsch12z9lx4hs8zci01j212b8m3lc-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
substituteStream() in derivation v4l2loopback-0.13.2-6.13: WARNING: '--replace' is deprecated, use --replace->
build flags: SHELL=/nix/store/4fvc5fm8bszmkydng1ivrvr5cbvr1g60-bash-5.2p37/bin/bash O=\$\(buildRoot\) ARCH=x8>

++++++ To sign the  module, you must set KBUILD_SIGN_KEY/KBUILD_SIGN_CERT to point to the signing key/certifi>
++++++ For your convenience, we try to read these variables as 'mok_signing_key' resp. 'mok_certificate' from>

++++++ If your certificate requires a password, pass it via the KBUILD_SIGN_PIN env-var!
++++++ E.g. using 'export KBUILD_SIGN_PIN; read -s -p "Passphrase for signing key : " KBUILD_SIGN_PIN; sudo ->

Building v4l2-loopback driver...
make -C /nix/store/6b9j17qfxdvyh9kmi9fjgh6zg0ix8if5-linux-6.13-dev/lib/modules/6.13.0/build M=/build/source K>
make[1]: Entering directory '/nix/store/6b9j17qfxdvyh9kmi9fjgh6zg0ix8if5-linux-6.13-dev/lib/modules/6.13.0/bu>
mkdir: cannot create directory '.tmp_72': Permission denied
mkdir: cannot create directory '.tmp_75': Permission denied
mkdir: cannot create directory '.tmp_78': Permission denied
mkdir: cannot create directory '.tmp_81': Permission denied
mkdir: cannot create directory '.tmp_84': Permission denied
mkdir: cannot create directory '.tmp_87': Permission denied
mkdir: cannot create directory '.tmp_90': Permission denied
mkdir: cannot create directory '.tmp_93': Permission denied
mkdir: cannot create directory '.tmp_96': Permission denied
mkdir: cannot create directory '.tmp_99': Permission denied
mkdir: cannot create directory '.tmp_102': Permission denied
mkdir: cannot create directory '.tmp_105': Permission denied
mkdir: cannot create directory '.tmp_108': Permission denied
mkdir: cannot create directory '.tmp_111': Permission denied
mkdir: cannot create directory '.tmp_114': Permission denied
mkdir: cannot create directory '.tmp_117': Permission denied
mkdir: cannot create directory '.tmp_120': Permission denied
mkdir: cannot create directory '.tmp_123': Permission denied
mkdir: cannot create directory '.tmp_126': Permission denied
mkdir: cannot create directory '.tmp_129': Permission denied
mkdir: cannot create directory '.tmp_132': Permission denied
mkdir: cannot create directory '.tmp_135': Permission denied
mkdir: cannot create directory '.tmp_138': Permission denied
mkdir: cannot create directory '.tmp_141': Permission denied
mkdir: cannot create directory '.tmp_144': Permission denied
mkdir: cannot create directory '.tmp_147': Permission denied
/nix/store/6b9j17qfxdvyh9kmi9fjgh6zg0ix8if5-linux-6.13-dev/lib/modules/6.13.0/source/Makefile:777: /nix/store>
make[1]: *** [/nix/store/6b9j17qfxdvyh9kmi9fjgh6zg0ix8if5-linux-6.13-dev/lib/modules/6.13.0/source/Makefile:2>
make[1]: Leaving directory '/nix/store/6b9j17qfxdvyh9kmi9fjgh6zg0ix8if5-linux-6.13-dev/lib/modules/6.13.0/bui>
make: *** [Makefile:53: v4l2loopback.ko] Error 2

@MahmoudNasrZ
Copy link

MahmoudNasrZ commented Jan 24, 2025

i got the same problem too
@Melody-TG you can check the solution in the #39 issue

@JaKooLit
Copy link
Owner

whats the status of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants