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

Build failure: lldb_19 #380196

Open
3 tasks done
Ramblurr opened this issue Feb 7, 2025 · 21 comments · May be fixed by #380775
Open
3 tasks done

Build failure: lldb_19 #380196

Ramblurr opened this issue Feb 7, 2025 · 21 comments · May be fixed by #380775
Labels
0.kind: build failure A package fails to build

Comments

@Ramblurr
Copy link
Contributor

Ramblurr commented Feb 7, 2025

Nixpkgs version

  • Unstable (25.05)

Steps to reproduce

git checkout 89e574dd02ba196a29f80ed2eec83f1bb5152c80 # random but recent master commit
nix-build -A lldb 

or for nixos-unstable

git checkout nixos-unstable
nix-build -A lldb 

Can Hydra reproduce this build failure?

Yes, Hydra can reproduce this build failure.

Link to Hydra build job

https://hydra.nixos.org/build/288035026

Relevant log output

ERROR: noBrokenSymlinks: the symlink /nix/store/y02l0yp7lbg19bssf1x1izjyvcppkj7p-lldb-19.1.7-lib/lib/python3.12/site-packages/lldb/lldb-argdumper points to a missing target /nix/store/y02l0yp7lbg19bssf1x1izjyvcppkj7p-lldb-19.1.7-lib/bin/lldb-argdumper
ERROR: noBrokenSymlinks: found 1 dangling symlinks and 0 reflexive symlinks


see below for full build logs

Additional context

lldb-unstable.log

lldb-master.log

System metadata

❯ nix-shell -p nix-info --run "nix-info -m"

  • system: "x86_64-linux"
  • host os: Linux 6.6.60, NixOS, 24.11 (Vicuna), 24.11pre-git
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.10
  • nixpkgs: /nix/store/4r8s42c9mwfvgdlxv0izb1cmlzrsb5nz-source

Notify maintainers


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

@Ramblurr Ramblurr added the 0.kind: build failure A package fails to build label Feb 7, 2025
@Ramblurr
Copy link
Contributor Author

Ramblurr commented Feb 7, 2025

forgot to ping the eeam; @NixOS/llvm

@RossComputerGuy
Copy link
Member

@bartman
Copy link

bartman commented Feb 8, 2025

I reproduced this on raspberrypi (aarch64) with home-manager setup.

$ nix build 'nixpkgs#lldb'
...
error: builder for '/nix/store/f5jskhf9m14bgwwpdzfy4h2v9jklazs8-lldb-19.1.7.drv' failed with exit code 1;
       last 10 log lines:
       > patching script interpreter paths in /nix/store/n7qjwgnyvkyjg93fq5rvyk5n74rl9g2s-lldb-19.1.7-dev
       > shrinking RPATHs of ELF executables and libraries in /nix/store/bh01jmr7dlbbclykswsamdhisixq6q3x-lldb-19.1.7-lib
       > shrinking /nix/store/bh01jmr7dlbbclykswsamdhisixq6q3x-lldb-19.1.7-lib/lib/liblldbIntelFeatures.so.19.1
       > shrinking /nix/store/bh01jmr7dlbbclykswsamdhisixq6q3x-lldb-19.1.7-lib/lib/liblldb.so.19.1.7
       > checking for references to /tmp/nix-build-lldb-19.1.7.drv-0/ in /nix/store/bh01jmr7dlbbclykswsamdhisixq6q3x-lldb-19.1.7-lib...
       > patching script interpreter paths in /nix/store/bh01jmr7dlbbclykswsamdhisixq6q3x-lldb-19.1.7-lib
       > stripping (with command strip and flags -S -p) in  /nix/store/bh01jmr7dlbbclykswsamdhisixq6q3x-lldb-19.1.7-lib/lib
       > rewriting symlink /nix/store/m2a55zmrdafavxcwqn1grbmivsbs9ag0-lldb-19.1.7/share/vscode/extensions/llvm-org.lldb-dap-0.2.0/bin/lldb-dap to be relative to /nix/store/m2a55zmrdafavxcwqn1grbmivsbs9ag0-lldb-19.1.7
       > ERROR: noBrokenSymlinks: the symlink /nix/store/bh01jmr7dlbbclykswsamdhisixq6q3x-lldb-19.1.7-lib/lib/python3.12/site-packages/lldb/lldb-argdumper points to a missing target /nix/store/bh01jmr7dlbbclykswsamdhisixq6q3x-lldb-19.1.7-lib/bin/lldb-argdumper
       > ERROR: noBrokenSymlinks: found 1 dangling symlinks and 0 reflexive symlinks
       For full logs, run 'nix log /nix/store/f5jskhf9m14bgwwpdzfy4h2v9jklazs8-lldb-19.1.7.drv'.

full logs are here...

f5jskhf9m14bgwwpdzfy4h2v9jklazs8-lldb-19.1.7.drv.log

@yshui
Copy link
Contributor

yshui commented Feb 8, 2025

i mean adding more checks and be stricter is good, but what i don't get is why can't we make sure it doesn't cause regressions before merging it? this feels very reckless to me... (like, there is tooling to figure out what derivations have stopped building, and we would have to fix them sooner or later anyway. why can't we fix them before merging?)

related: #370750

@RossComputerGuy
Copy link
Member

why can't we fix them before merging?

That PR introduced a change which is very large. Building every package which is affected wouldn't be practical. There's a reason why staging exists. It's meant to help iron out issues but not every single issue. According to search.nixos.org, we have over 120,000 packages. Building & checking those would take a long time and a lot of storage.

@ninelore
Copy link
Contributor

ninelore commented Feb 8, 2025

I guess it didn't cause enough build failures to be noticed :/

@yshui
Copy link
Contributor

yshui commented Feb 8, 2025

@RossComputerGuy staging exists to catch failures like this, no? we knew this build failed in staging: https://hydra.nixos.org/build/287121996/log/tail

why didn't we just grep the failed builds for "noBrokenSymlinks"? why have hydra and do all these expensive builds if no one even cares?

@RossComputerGuy
Copy link
Member

staging exists to catch failures like this, no?

Yes, it would

we knew this build failed in staging

Doesn't help when nobody is constantly watching.

why didn't we just grep the failed builds for "noBrokenSymlinks"?

That would be very computationally heavy and isn't really possible.

@yshui
Copy link
Contributor

yshui commented Feb 8, 2025

why didn't we just grep the failed builds for "noBrokenSymlinks"?

That would be very computationally heavy and isn't really possible.

It wouldn't even take half an hour to search through tens of GBs of logs, there are only 11k failed drvs. and you've already spent much longer than that to build all of them. did anyone even think to try?

Rust builds the entirety of crates.io for changes that might cause backward incompatibility, because they care.

@RossComputerGuy
Copy link
Member

I believe the logs are in sqlite, not a plain text file.

@alyssais
Copy link
Member

alyssais commented Feb 9, 2025

Rust builds the entirety of crates.io for changes that might cause backward incompatibility, because they care.

If you care, you're welcome to help with the staging process (join #staging:nixos.org), and watch for failed builds. It's a balance of how long do we hold back important changes (some of which are security fixes) for the small remaining number of build regressions, so the more people who are working on those regressions, the fewer they will be.

@thefossguy
Copy link
Member

A bit offtopic but it would be nice to have a way for Hydra to ping the package maintainer(s) if the package that they're maintaining has a build failure. That way, we can catch it as soon as possible.

@RossComputerGuy
Copy link
Member

I believe that's been done before and it resulted in a lot of emails. Also, people would likely end up just ignoring the notification. Anyway, further discussion on this matter should move to Matrix.

@Ramblurr
Copy link
Contributor Author

Ramblurr commented Feb 9, 2025

Conversation aside (though I find it interesting and relevant fwiw), does anyone know how to fix it? lldb is a dependency of jetbrains ides, so they are broken atm.

@gepbird
Copy link
Contributor

gepbird commented Feb 9, 2025

Conversation aside (though I find it interesting and relevant fwiw), does anyone know how to fix it? lldb is a dependency of jetbrains ides, so they are broken atm.

A workaround for it is to disable the broken symlink checking behavior:

  nixpkgs.overlays = [
    (final: prev: {
      lldb = prev.lldb.overrideAttrs {
       dontCheckForBrokenSymlinks = true;
      };
    })
  ];

(I only tested it for other packages, and lldb is taking a while to build locally)

@yshui
Copy link
Contributor

yshui commented Feb 9, 2025

you're welcome to help with the staging process

i'd love to help, but i have too many commitments right now and if i take on more i'll just end up doing none of them. but besides manpower, i (looking from outside) feel like there might be a tooling problem? if it was easy to query "what did noBrokenSymlinks break", then someone probably would have done that.

A workaround for it is to disable the broken symlink checking behavior:

if you do this, make sure you override the right one. for me it was lldb_14 used by the vscode lldb extension :/

I believe that's been done before and it resulted in a lot of emails

did it send an email each time a drv was rebuilt? then i can imagine it being super annoying. maybe it's possible to do something smarter? or maybe manually? e.g. when devs feel staging is mature enough, they can trigger emails to be sent for remaining broken drvs.

Aadniz added a commit to Aadniz/nix-config that referenced this issue Feb 9, 2025
@paparodeo
Copy link
Contributor

removing the lib output seems like it would be the easiest thing to do given it already doesn't exist on darwin and both outputs (out, lib) are needed for for lldb to work anyway.

diff --git a/pkgs/development/compilers/llvm/common/lldb.nix b/pkgs/development/compilers/llvm/common/lldb.nix
index f4a131c47620..820bd5f21231 100644
--- a/pkgs/development/compilers/llvm/common/lldb.nix
+++ b/pkgs/development/compilers/llvm/common/lldb.nix
@@ -56,7 +56,7 @@ stdenv.mkDerivation (rec {
 
   # LLDB expects to find the path to `bin` relative to `lib` on Darwin. It can’t be patched with the location of
   # the `lib` output because that would create a cycle between it and the `out` output.
-  outputs = [ "out" "dev" ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "lib" ];
+  outputs = [ "out" "dev" ];
 
   sourceRoot = lib.optional (lib.versionAtLeast release_version "13") "${src.name}/${pname}";
 

@RossComputerGuy
Copy link
Member

I think the fix which would make sense is to patch this: #380196 (comment)

@paparodeo
Copy link
Contributor

I think the fix which would make sense is to patch this: #380196 (comment)

disagree given the added maintenance burden for pretty much zero benefit, not to mention that it doesn't work given it creates a cycle which breaks the build.

@bartman
Copy link

bartman commented Feb 9, 2025

here is my attempt at cleaning up the dangling symlink...
#380669
(apparently not the right thing to do... ignore)

@szaffarano
Copy link
Contributor

Conversation aside (though I find it interesting and relevant fwiw), does anyone know how to fix it? lldb is a dependency of jetbrains ides, so they are broken atm.

A workaround for it is to disable the broken symlink checking behavior:

nixpkgs.overlays = [
(final: prev: {
lldb = prev.lldb.overrideAttrs {
dontCheckForBrokenSymlinks = true;
};
})
];

(I only tested it for other packages, and lldb is taking a while to build locally)

☝ this workaround worked for me, thanks a lot @gepbird

FraGag added a commit to FraGag/nixpkgs that referenced this issue Feb 10, 2025
Remove the `lib` output, so that `/lib` goes to the `out` output
instead. This fixes the following error:

ERROR: noBrokenSymlinks: the symlink .../lib/python3.12/site-packages/lldb/lldb-argdumper points to a missing target .../bin/lldb-argdumper

Fixes NixOS#380196
@FraGag FraGag linked a pull request Feb 10, 2025 that will close this issue
13 tasks
FraGag added a commit to FraGag/nixpkgs that referenced this issue Feb 10, 2025
Remove the `lib` output, so that `/lib` goes to the `out` output
instead. This fixes the following error:

ERROR: noBrokenSymlinks: the symlink .../lib/python3.12/site-packages/lldb/lldb-argdumper points to a missing target .../bin/lldb-argdumper

Fixes NixOS#380196
Krutonium added a commit to Krutonium/NewNix that referenced this issue Feb 10, 2025
@FraGag FraGag marked this as a duplicate of #380743 Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants