How to get this basic C++ build to work in a nix-shell?

@vcunat We ran into a problem that seems to have the same solution that you implemented in chntpw: fix #11474, build with multiple-output glibc · NixOS/nixpkgs@d130116 · GitHub

or @dtzWill (Merge pull request #34645 from dtzWill/feature/musl · NixOS/nixpkgs@a267ae4 · GitHub)

Changing glibc into glibc.out seems to avoid certain -isystem setting logic in

Is there a rule or logic behind using glibc.out vs glibc or glibc.dev?

Possibly related: stdenv: principial linking problems when putting static and dynamic libraries into different directories · Issue #12085 · NixOS/nixpkgs · GitHub

1 Like