Skip to content

Commit f5ff3cf

Browse files
committed
lldb: Fix dependency cycle between out and lib outputs
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 #380196
1 parent 7c3f4d1 commit f5ff3cf

File tree

1 file changed

+5
-4
lines changed
  • pkgs/development/compilers/llvm/common

1 file changed

+5
-4
lines changed

pkgs/development/compilers/llvm/common/lldb.nix

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ stdenv.mkDerivation (rec {
5454
src = src';
5555
inherit patches;
5656

57-
# LLDB expects to find the path to `bin` relative to `lib` on Darwin. It can’t be patched with the location of
58-
# the `lib` output because that would create a cycle between it and the `out` output.
59-
outputs = [ "out" "dev" ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "lib" ];
57+
# There is no `lib` output because some of the files in `$out/lib` depend on files in `$out/bin`.
58+
# For example, `$out/lib/python3.12/site-packages/lldb/lldb-argdumper` is a symlink to `$out/bin/lldb-argdumper`.
59+
# Also, LLDB expects to find the path to `bin` relative to `lib` on Darwin.
60+
outputs = [ "out" "dev" ];
6061

6162
sourceRoot = lib.optional (lib.versionAtLeast release_version "13") "${src.name}/${pname}";
6263

@@ -140,7 +141,7 @@ stdenv.mkDerivation (rec {
140141
'';
141142

142143
postInstall = ''
143-
wrapProgram $out/bin/lldb --prefix PYTHONPATH : $lib/${python3.sitePackages}/
144+
wrapProgram $out/bin/lldb --prefix PYTHONPATH : ''${!outputLib}/${python3.sitePackages}/
144145
145146
# Editor support
146147
# vscode:

0 commit comments

Comments
 (0)