Skip to content

include-what-you-use fails to find standard headers #189753

@trofi

Description

@trofi

Reproducer:

$ printf "#include <stdio.h>" > a.c
$ nix-shell -p include-what-you-use
$$ include-what-you-use -c a.c
a.c:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^~~~~~~~~

The problem here happens because include-what-you-use failed to embed system headers:

$ strace -f include-what-you-use -c a.c |& fgrep /include
newfstatat(AT_FDCWD, "/nix/store/i7dkz0zjzv4aiyc5zldsgj23mwn14kf8-include-what-you-use-0.18/lib/clang/14.0.6/include", 0x7ffcc0b326d0, 0) = -1 ENOENT (No such file or directory)

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
    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