I cannot really formulate the question entirely. I’d like to make better use of the clang tooling in a nix-shell environment where I build stuff using the regular gcc + GNU libstdc++ toolchain and somehow the include paths clash to produce a lot of:
In included file: no member named 'signbit' in the global namespace; did you mean '__signbit'?clang(no_member_suggest)
See: clang-tools: teach about nix's include path · NixOS/nixpkgs@a10ef1a · GitHub
Despite me commenting on this I have never really fully understood what is going on here and what would be a proper fix for that. I also don’t really get how closely the C++ standard includes are bound to the stdenv that I’m using. Should there be an stdenv.cxx.cxx.lib
? Why the double cc
in stdenv.cc.cc.lib
? Can I mix and match standard library headers in a nix-shell
environment using some environment variables (CPATH/…) or do I need to write my nix-expressions in a special way (overrideCC
, etc.)?
Sorry that I’m so vague, but I guess I’d really appreciate some general insights on how the stdenv relates to it’s shipped C and C++ compiler to be able to fully understand why the above issues occurs. What is fixed after nix has built the toolchain and what is still configurable.