| 10 Nov 2024 |
emily | some stdenv overlay stuff I don't understand, I presume? | 16:57:33 |
emily | it's breaking Alyssa's PR https://github.com/NixOS/nixpkgs/pull/344239 | 16:57:46 |
emily | this is only applying to actual gcc13, not the GCC that's actually used :/ | 16:57:56 |
emily | (also, it seems weird that the builder of the unwrapped gcc is a bootstrap tools Bash – I thought the bootstrap tools were meant to be rinsed out by the late stdenv stages?) | 16:58:19 |
@trofi:matrix.org | gcc needs stdenv. sdtenv needs gcc. I don't think they can be defined in a single bootstrap phase. | 16:58:45 |
@trofi:matrix.org | gcc gets clobbered by a last stage of the bootstrap: https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/linux/default.nix#L683 | 17:01:08 |
emily | makes sense | 17:03:24 |
emily | what's the correct way to adjust the wrapping options of the C compiler that's actually used? I couldn't find where the wrapping happens in the bootstrap. | 17:03:40 |
@trofi:matrix.org | bootstrap stages use gcc attribute, that is a wrapper (compared to gcc-unwrapped compiler without a wrapper). For example here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/linux/default.nix#L565 . Otherwise it should use default nixpkgs definition. | 17:08:19 |
emily | "otherwise" as in, for a "complete" Nixpkgs gcc should be the same as gcc13? | 17:09:20 |
emily | because that's not what I observed :( | 17:09:38 |
@trofi:matrix.org | "otherwise", as in in the previous bootstrap stages (there gcc usually comes as a prebuild from bootstrap-tools) | 17:12:26 |
emily | right | 17:17:16 |
emily | so I guess Alyssa's modifications need duplicating in both stdenv and gcc :/ | 17:17:31 |
emily | at least they're only temporary | 17:17:37 |
Alyssa Ross | Is it that gcc ≠ gcc13, or that gcc ≠ stdenv.cc?
| 19:24:03 |
Alyssa Ross | I assume the latter? | 19:24:50 |
Alyssa Ross | If we just overrode the flags for stdenv.cc, that would mean packages already pinned to gcc13 don't have to worry about the flags, which might be nice?
| 19:25:15 |
Alyssa Ross | Doesn't matter too much either way though I think | 19:25:22 |
emily | no | 19:25:55 |
emily | gcc = stdenv.cc ≠ gcc13 | 19:26:00 |
Alyssa Ross | Oh that's actually good then? | 19:26:07 |
Alyssa Ross | We can leave gcc13 alone | 19:26:18 |
emily | in that the override should just be in stdenv and nowhere else? | 19:26:21 |
Alyssa Ross | Yeah | 19:26:24 |
emily | I guess so, but when I see gcc = pkgs.${"gcc${toString default-gcc-version}"} I'm not expecting the two to behave differently… | 19:26:54 |
Alyssa Ross | Redacted or Malformed Event | 19:29:19 |
@trofi:matrix.org | I agree stdenv overlay is scary in that way and requires some time to get used to it. | 21:28:29 |
p14 | It would be good to have a comment next to the gcc at least to point out that it is overlaid. Otherwise we get the confusing situation emily was in where it was necessary to first identify "this is not the gcc you are looking for" before you can even figure out any other issues. | 21:43:29 |
emily | my mental model was always that only stdenv.* has weird overlay stuff once the bootstrap is complete | 21:46:41 |