Skip to content

llvmPackages_13.libcxxStdenv has wrong header search paths #151879

@crabtw

Description

@crabtw

Describe the bug

When using llvmPackages_13.libcxxStdenv to compile program, clang reports no member named 'abort' in namespace 'std'.
Comparing search paths with llvm12, llvm13 has 3 additional paths.

 /nix/store/h6d0c7lnxx65i925xmnxgwdfdvc7hc2p-gcc-10.3.0/lib64/gcc/x86_64-unknown-linux-gnu/10.3.0/../../../../include/c++/10.3.0
 /nix/store/h6d0c7lnxx65i925xmnxgwdfdvc7hc2p-gcc-10.3.0/lib64/gcc/x86_64-unknown-linux-gnu/10.3.0/../../../../include/c++/10.3.0/x86_64-unknown-linux-gnu
 /nix/store/h6d0c7lnxx65i925xmnxgwdfdvc7hc2p-gcc-10.3.0/lib64/gcc/x86_64-unknown-linux-gnu/10.3.0/../../../../include/c++/10.3.0/backward

Steps To Reproduce

Steps to reproduce the behavior:

$ clang++ -c test.cpp

#include <cstdlib>

int main() {
    std::abort();
    return 0;
}

Expected behavior

clang reports no error.

Notify maintainers

@lovek323 @raskin @dtzWill @primeos

Metadata

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

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.87, NixOS, 22.05 (Quokka)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.6.0pre20211217_6e6e998`
 - channels(root): `"home-manager, nixos, sops-nix"`
 - channels(user): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: llvm/clangIssues related to llvmPackages, clangStdenv and related
    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