Making debugging with stack traces work with DrKonqui (KDE Plasma)

Nix packages dont include debug symbols by default, and there are no separate packages that can simply be installed to get them.

I am facing frequent KDE Plasma issues (doesnt matter I suppose as the issues will change and the need will stay). Most of the time, the builtin crash helper DrKonqui does not launch, but a different tool allows to submit a crash report including system information.

That tool allows to install debug symbols, but I assume the support is limited to very few, package-based, distros.

For NixOS I have found the following resources about the issue

The info snippets out there are a bit confusing, clearing them up would help. I am looking for a reasonable way to help create better KDE Plasma crash reports. I.e. on pretty weak hardware compilation is not possible, and I would like to avoid running a custom build cache server.

I have tried adding the following to my configuration:

nixpkgs.config.packageOverrides = pkgs: {
    kdePackages.plasma-workspace = pkgs.kdePackages.plasma-workspace.overrideAttrs (oldAttrs: {
        separateDebugInfo = true;
    });
};

services.nixseparatedebuginfod2.enable = true;

environment.systemPackages = with pkgs; [
    gdb
    elfutils
];

The override causes the following build issue

error: attribute 'kwallet' missing
at /nix/store/gf12ajfzx0kyfdaxwa3yaz917bfd0mj1-nixos/nixos/nixos/modules/services/desktop-managers/plasma6.nix:293:7:
    292|     xdg.portal.extraPortals = [
    293|       kdePackages.kwallet
        |       ^
    294|       kdePackages.xdg-desktop-portal-kde

I am wondering which of these are needed for the specific case of KDE Plasma and the crash reporting tool.

related thread

as you can see here plasmaworkspace is built with mkkdederivation which is defined here: this function sets separateDebugInfo by default. So you don’t need to apply this overlay.

1 Like

So that means it would work with nixseparatedebuginfod2 without additional changes?

I expect so.

It seems drkonki will still not work because upstream developpers want it to fail loudly if any single library is missing debuginfo: Build-id, `separateDebugInfo` and nixseparatedebuginfod2

1 Like