Nix Cross Compiling | 555 Members | |
| 119 Servers |
| Sender | Message | Time |
|---|---|---|
| 28 Aug 2025 | ||
| * the goal is to keep pam support when building linux cross, but remove it from buildPackages when building non-linux cross from linux. It'll be removed from host packages using availableOn in the case of freebsd, but the build python going into llvm pulls libuuid, which is in the compiler bootstrap, so targetPlatfrom checks seem appropriate to me here | 09:36:16 | |
| * the goal is to keep pam support on host when building linux cross, but remove it from buildPackages (when building non-linux) cross from linux. It'll be removed from host packages using availableOn in the case of freebsd, but the build python going into llvm pulls libuuid, which is in the compiler bootstrap, so targetPlatfrom checks seem appropriate to me here | 09:43:08 | |
In reply to @grimmauld:grapevine.grimmauld.de if you're trying to use are you trying to make a compiler that requires rebuilding to change what machine it generates code for?
| 09:58:49 | |
| * if you're trying to use targetPlatform: are you trying to make a compiler that requires rebuilding to change what machine it generates code for? yes: okay, use it. arrgh. no: do not use targetPlatform | 09:59:09 | |
| hmm, it would be nicer if we could fix the infinite recursion | 10:00:19 | |
| The inf rec is because availableOn somehow does weird output logic which then depends on stdenv? | 10:00:49 | |
| at least as far as i understand | 10:01:03 | |
| I'm wondering if we can get away with just delaying the isClang check | 10:01:22 | |
| what even is this clangFixup thing | 10:02:03 | |
i mean, buildPackages does not need pam to build stuff. Pam is only ever required on a real system. So doing targetPlatform == hostPlatform checks might work | 10:02:27 | |
| Does mean a lot of rebuilds in buildPackages though | 10:02:38 | |
| that, yes | 10:02:46 | |
| Yeah I think this is fixable in the FreeBSD mkDerivation | 10:03:37 | |
| delaying the isClang check might work too, but that is too deep in the LLVM stack for me to properly understand what is going on there | 10:03:49 | |
| i'm looking at that as well but yes i think we should not disable pam support in buildPackages | 10:04:21 | |
| i am all for it if it can be fixed in the freebsd mkderivation, but i don't know enough freebsd/stdenv wizardry to fix it there. I knew how to fix it in util-linux, but i won't make a claim about that being the best fix | 10:05:45 | |
| Yep, I have a fix. | 10:06:11 | |
In reply to @grimmauld:grapevine.grimmauld.deokay i would like to clarify that i am saying that making util-linux depend on targetPlatform is not acceptable. that would make anyone cross compiling to rebuild everything in buildPackages that depends on util-linux | 10:07:23 | |
| right. | 10:07:50 | |
| and random stuff will depend on util-linux | 10:07:55 | |
| this was llvm -> libxml2 -> python3 -> libuuid (which is util-linuxMinimal) | 10:08:18 | |
| my personal opinion: hypothetically if a long time to fix freebsd cross, i would rather leave freebsd broken than make util-linux depend on targetPlatform | 10:09:00 | |
| * my personal opinion: hypothetically if it took a long time to fix freebsd cross, i would rather leave freebsd broken than make util-linux depend on targetPlatform | 10:09:14 | |
though i am also confused, because util-linuxMinimal has pamSupport = false;, it shouldn't even call that stuff in libuuid... | 10:12:08 | |
| of course the lastlog isn't dependent on
| 10:13:30 | |
| https://github.com/NixOS/nixpkgs/pull/437867 | 10:14:02 | |
In reply to @dramforever:matrix.orgSo staging? Everything in buildPackages has to be rebuild anyways since it can't be shared with native pkgs (not saying the change should be done but rebuilding isn't an issue) | 10:14:47 | |
formatter complains, but other than that this looks like the better fix. No buildPackages/targetPlatform hacks, which is nice. Though this is also very far outside my expertise. | 10:22:10 | |
they are shared
| 11:08:25 | |
| i suppose this is a bad example because llvm depends on util-linuxMinimal which doesn't depend on pam | 11:11:39 | |