Skip to content

llvmPackages_{15,16,17}.lldb: broken, "ModuleNotFoundError: No module named 'lldb'" #166604

@dtzWill

Description

@dtzWill

Describe the bug

lldb from llvmPackages_14.lldb seems to be broken, reporting:

$ lldb --version
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb'
lldb version 14.0.0

This error is present in all invocations of lldb I've tried: with no arguments, pointed at an executable, and debugging a coredump (SYSTEMD_DEBUGGER=lldb for coredumpctl debug(/gdb), FWIW).

Coredump usage is worse, with something like:

$ coredump debug
...<<snip>>...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb'
(lldb) target create "<<redacted>>" --core "/var/tmp/coredump-VXmhXt"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined

Core file '/var/tmp/coredump-VXmhXt' (x86_64) was loaded.
(lldb)

Steps To Reproduce

Steps to reproduce the behavior:

  1. lldb --version or other lldb invocations, until this is fixed this works: nix run nixpkgs#llvmPackages_14.lldb -- --version.
  2. Note the messages as described above

Expected behavior

LLDB doesn't show this error, and presumably whatever functionality triggering this isn't working properly but I haven't tried using it after the error(s) are printed.

Additional context

Another LLVM14 package to fix before this is ready for use:

cc #165701

Notify maintainers

@lovek323 @7c6f434c @dtzWill @primeos

Metadata

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

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.17.0, NixOS, 22.05 (Quokka), 22.05pre364898.00e27c78d3d`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.8.0pre20220330_2252272`
 - channels(will): `""`
 - channels(root): `"home-manager, nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: llvm/clangIssues related to llvmPackages, clangStdenv and related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions