| 19 Aug 2021 |
sterni | so you need to use targetPackages if you want to get the “default” compiler of that package set | 19:07:13 |
Alyssa Ross | that's the same as just nativeBuildInputs = [ targetPackages.stdenv.cc ]; when using callPackage though, right? thanks to splicing? | 19:08:33 |
symphorien | weird because the manual says targetPackages is a synonym for pkgsTargetTarget so the cc from targetPackage should never be cross ??? | 19:08:35 |
symphorien | ah you said "cc is the cc used to build the set" | 19:09:30 |
symphorien | so cc does not really "belong" to the set | 19:09:39 |
Alyssa Ross | yeah stdenv is sort of one level back in the chain | 19:09:52 |
symphorien | ok I think I understand | 19:10:04 |
Alyssa Ross | when you cross compile, there are three package sets involved | 19:10:24 |
Alyssa Ross | (build, build, build) -> (build, build, target) -> (build, target, target) | 19:11:06 |
Alyssa Ross | stdenv.cc is the compiler from the middle package set | 19:11:29 |
sterni | In reply to @symphorien:xlumurb.eu weird because the manual says targetPackages is a synonym for pkgsTargetTarget so the cc from targetPackage should never be cross ??? note also that targetPackages and buildPackages are relative terms i. e. for a given set, set.buildPackages is the “previous” set used to build the set and targetPackages is the “next” set built using the set | 19:24:27 |
sterni | e. g. pkgs.buildPackages.targetPackages = pkgs | 19:24:57 |
sterni | symphorien: also have you seen? https://github.com/NixOS/nixpkgs/pull/124498 may be related to what you are trying to do | 19:27:58 |
| 20 Aug 2021 |
sterni | John Ericson: https://github.com/NixOS/nixpkgs/blob/f4ddae2ba55889d5f21bd4601bcf6cc256baf39c/pkgs/stdenv/adapters.nix#L70-L73 shouldn't this read libc == "glibc"? I just stumbled over this while reviewing your PR | 08:51:19 |
sterni | although it is if at all an unrelated bug | 08:51:29 |
John Ericson | sterni (he/him): yeah it should be | 15:01:59 |
John Ericson | good catch! | 15:02:02 |
| 21 Aug 2021 |
John Ericson | sterni (he/him): hmm aarch64 + musl is failing with gcc-ng | 20:09:24 |
John Ericson | configure time | 20:09:27 |
John Ericson | looks like some CPP issue | 20:09:49 |
John Ericson | -gnu suceeds and -musl fails | 20:10:02 |
John Ericson | but this is funny as this this is pre building any libcs | 20:10:14 |
John Ericson | There was a thing messing with LOCAL_INCLUDE_DIR. Maybe that will help. | 20:16:29 |
John Ericson | nope | 20:25:04 |
sterni | John Ericson: sure that -gnu / -musl doesn't also influence buildPackages in that case? | 20:26:39 |
John Ericson | oh it definitely does | 20:26:53 |
sterni | surely gcc needs a build platform libc | 20:26:55 |
John Ericson | some specfile nonsense | 20:26:57 |
John Ericson | the build platform libc is glibc in both cases | 20:27:14 |
sterni | okay so you're not using pkgsMusl | 20:27:32 |