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

NixOS fails to build: iproute2-6.5.0/etc': No such file or directory #263445

Closed
nadir-ishiguro opened this issue Oct 25, 2023 · 17 comments · Fixed by #262767
Closed

NixOS fails to build: iproute2-6.5.0/etc': No such file or directory #263445

nadir-ishiguro opened this issue Oct 25, 2023 · 17 comments · Fixed by #262767
Labels
0.kind: bug Something is broken

Comments

@nadir-ishiguro
Copy link
Contributor

nadir-ishiguro commented Oct 25, 2023

Describe the bug

I was just trying to upgrade my NixOS installation to current nixos-unstable (2023-10-24) but the build fails with the following error:

$ nix --extra-experimental-features nix-command flakes build .#nixosConfigurations."optibox".config.system.build.toplevel --verbose --out-link /tmp/nixos-rebuild.jKcMUv/result
error:
       … while calling the 'head' builtin

         at /nix/store/z1nvpjx9vd4151vx2krxzmx2p1a36pf9-source/lib/attrsets.nix:850:11:

          849|         || pred here (elemAt values 1) (head values) then
          850|           head values
             |           ^
          851|         elsewhile evaluating the attribute 'value'

         at /nix/store/z1nvpjx9vd4151vx2krxzmx2p1a36pf9-source/lib/modules.nix:807:9:

          806|     in warnDeprecation opt //
          807|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          808|         inherit (res.defsFinal') highestPrio;

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

       error: getting status of '/nix/store/fijy0dlyk5b06ay7nxg88lr7bp13hpjb-iproute2-6.5.0/etc': No such file or directory

Seems like iproute2's etc is missing?

I'm not sure what other data might be helpful.

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.5.7, NixOS, 23.11 (Tapir), 23.11.20231019.7c9cc5a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.1`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/4jfc6vrkmq7z5pb651jh5b4kra5f1kwp-source`
@nadir-ishiguro nadir-ishiguro added the 0.kind: bug Something is broken label Oct 25, 2023
@spacekitteh
Copy link
Contributor

Same for me.

@spacekitteh
Copy link
Contributor

The fix is in #262767

@naturallaw777
Copy link

@spacekitteh how did you fix this?

@ParetoOptimalDev
Copy link

ParetoOptimalDev commented Oct 27, 2023

@spacekitteh how did you fix this?

It looks like it'll probably be in unstable soon if you can wait.

It doesn't seem to have worked or I have some other bug, but you may have luck with what I tried doing:

use a derivation directly from a nixpkgs pull request

add input

nixpkgs-iproute2-ifd.url = "github:nixos/nixpkgs/pull/242453/head";

taking advantage of lexical scoping to get at flake inputs from overlay (not sure how to do this without)

nixpkgs.overlays = [
  (final: prev: {
    iproute2 = flake.inputs.nixpkgs-iproute2-fix.legacyPackages.${final.stdenv.system}.iproute2;
  })
];

@naturallaw777
Copy link

naturallaw777 commented Oct 27, 2023

I had to disable the Mullvad module by commenting out # services.mullvad-vpn.enable = true;
Next, I updated to the latest nixpkgs NixOS 23.11.20231024.8efd5d1 (Tapir) x86_64 and it worked with no errors.
Then, I un-commented Mullvad module to activate it again. Then, I rebuilt switch and the error returned.

Thus, it seems the Mullvad module needs to be updated.

@purcell
Copy link
Member

purcell commented Oct 27, 2023

@naturallaw777 I think that the mullvad module enables the iproute2 module, so is it perhaps that without mullvad, you're not requiring iproute2 and so there's no problem? ie. if iproute2 is broken for you, then mullvad makes that breakage obvious, but mullvad isn't necessarily the cause.

@naturallaw777
Copy link

naturallaw777 commented Oct 27, 2023

@purcell thanks for thoughts on this... I don't have iproute2 module explicitly in my configuration.nix. Is there something I am missing regarding the logic?

Should I explicitly put the iproute2 in my configuration.nix to force the update?

@naturallaw777
Copy link

Yes, it is not Mullvad per say. It is the broken iproute2 module (networking.iproute2.enable = true;). I will wait until it is merged into the main unstable branch for the fix.

@purcell
Copy link
Member

purcell commented Oct 28, 2023

@naturallaw777 this link might help you: https://nixpk.gs/pr-tracker.html?pr=262767

@howdoicomputer
Copy link

I feel like every time I run nixos-rebuild something upstream breaks.

@nadir-ishiguro
Copy link
Contributor Author

I feel like every time I run nixos-rebuild something upstream breaks.

The issue tracker is the wrong place for useless comments like that.

@IogaMaster
Copy link
Contributor

IogaMaster commented Oct 30, 2023

@spacekitteh how did you fix this?

It looks like it'll probably be in unstable soon if you can wait.

It doesn't seem to have worked or I have some other bug, but you may have luck with what I tried doing:

use a derivation directly from a nixpkgs pull request

add input

nixpkgs-iproute2-ifd.url = "github:nixos/nixpkgs/pull/242453/head";

taking advantage of lexical scoping to get at flake inputs from overlay (not sure how to do this without)

nixpkgs.overlays = [
  (final: prev: {
    iproute2 = flake.inputs.nixpkgs-iproute2-fix.legacyPackages.${final.stdenv.system}.iproute2;
  })
];

For anyone having an issue with this temp fix:

add input

nixpkgs-iproute2-fix.url = "github:nixos/nixpkgs/pull/242453/head";

taking advantage of lexical scoping to get at flake inputs from overlay (not sure how to do this without)

nixpkgs.overlays = [
  (final: prev: {
    iproute2 = flake.inputs.nixpkgs-iproute2-fix.legacyPackages.${final.stdenv.system}.iproute2;
  })
];

He made a typo, the input is called `nixpkgs-iproute2-ifd` the overlay calls for `nixpkgs-iproute2-fix`
Just change the input to `nixpkgs-iproute2-fix`

Thanks to @ardishco-the-great, he brought this issue to my attention

@IogaMaster
Copy link
Contributor

@ParetoOptimalDev thanks for the fix, keep up the good work! 👍

@nilsherzig
Copy link

I had to disable the Mullvad module by commenting out # services.mullvad-vpn.enable = true; Next, I updated to the latest nixpkgs NixOS 23.11.20231024.8efd5d1 (Tapir) x86_64 and it worked with no errors. Then, I un-commented Mullvad module to activate it again. Then, I rebuilt switch and the error returned.

Thus, it seems the Mullvad module needs to be updated.

Same here, i figured it out by commeting out parts of my config until it started to work again lmao, is there a smarter way to do this? The rebuild trace doesn't even mention mullvad

@purcell
Copy link
Member

purcell commented Oct 31, 2023

@IogaMaster You should presumably prefer to overlay the merged fix PR #262767, not the unmerged #242453, no?

@purcell
Copy link
Member

purcell commented Oct 31, 2023

The fix PR has hit nixos-unstable, and works great on my machine, for those who were waiting.

@IogaMaster
Copy link
Contributor

@IogaMaster You should presumably prefer to overlay the merged fix PR #262767, not the unmerged #242453, no?

Yeah, I was just fixing the typo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
8 participants