Skip to content

clang-tools: clangd broken after staging-next 2025-11-02 merge #463367

Description

@jchv

Nixpkgs version

  • Unstable (25.11)

Describe the bug

clangd no longer works correctly after the staging-next merge. Including any standard header, e.g. <iostream>, fails with an error like 'iostream' file not found (clang pp_file_not_found). This is another bug that cropped up during the staging-next merge at de21549 (#457894).

Steps to reproduce

It's a bit hard to reproduce this from scratch, so I've taken two steps:

  • I made a simple demo that has a shell script that will rapidly reproduce the problem. Check the README.
  • I made a NixOS test (nixosTests.clangd: init #463366) based on this that I will try to get merged as soon as it passes again.

But in short, the problem occurs with almost any clangd setup I can find: clangd is no longer able to find include files after the staging merge. This seems to also be the case for any version of clangd I could find.

Expected behaviour

clangd should work I hope :)

Screenshots

No response

Relevant log output

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"pp_file_not_found","message":"'iostream' file not found","range":{"end":{"character":19,"line":0},"start":{"character":9,"line":0}},"severity":1,"source":"clang"},{"code":"undeclared_var_use","message":"Use of undeclared identifier 'std'","range":{"end":{"character":5,"line":2},"start":{"character":2,"line":2}},"severity":1,"source":"clang"},{"code":"undeclared_var_use","message":"Use of undeclared identifier 'std'","range":{"end":{"character":37,"line":2},"start":{"character":34,"line":2}},"severity":1,"source":"clang"}],"uri":".../main.cpp","version":0}}I[23:03:57.286] --> reply:textDocument/documentHighlight(1) 11 ms

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.17.7, NixOS, 25.11 (Xantusia), 25.11.20251116.50a96ed
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.31.2
  • channels(root): "nixos"
  • channels(john): ""
  • nixpkgs: /nix/store/c9asdiqw1rf5qwdjz26f57hp68ppb8fc-source

Notify maintainers

@Patryk27


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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions