!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

228 Members
73 Servers

Load older messages


SenderMessageTime
16 Dec 2025
@pyrox:pyrox.devdish [Fox/It/She] we need some sort of libc to build glibc, and it is way way way easier to build a gcc that targets musl then build glibc, then rebuild gcc to target glibc, than it is to use mes-libc or similar to build glibc and its deps 17:49:33
@pyrox:pyrox.devdish [Fox/It/She] thats what I was thinking of doing, that way we don't have to rebuild yet another GCC, and instead can just make a wrapper that passes the appropriate gcc flags to link to glibc instead. Plus, this gcc wouldn't be used in actual stdenv, its just used to build the stdenv tools, so using musl or gcc in bootstrap shouldn't matter, since the whole point of the early stdenv stages is to not have any bootstrap tools leaking into stdenv proper 17:51:38
17 Dec 2025
@aleksi:pikaviestin.fialeksiOk, I think here's a gcc that targets glibc: https://github.com/NixOS/nixpkgs/pull/471642/changes/1f77d59c3450ac97333d9048dc13185ede16478812:02:55
@aleksi:pikaviestin.fialeksiIt's not very thoroughly tested, but gcc and g++ both seemed to work with simple programs12:03:19
@pyrox:pyrox.devdish [Fox/It/She]as much as I don't like doing this, we probably want to build all the bootstrap tools into a tarball at the end of it, that way we have a single blessed bootstrap path where all platforms get a tarball and busybox and go from there, and we're not special-casing platforms that use minimal-bootstrap into a different code path.17:45:32
@pyrox:pyrox.devdish [Fox/It/She]Simplicity is the way to go here, after all17:45:38
@k900:0upti.meK900Actually kinda disagree, I think it makes sense to cross-bootstrap the other platforms17:46:19
@k900:0upti.meK900And then we can just have Nix handle caching17:46:27
@pyrox:pyrox.devdish [Fox/It/She]sounds good to me17:46:40
@pyrox:pyrox.devdish [Fox/It/She]as long as we have a single code path then that makes everyone's life better(even if that involves cross-building on non-minimal platforms)17:47:02
@pyrox:pyrox.devdish [Fox/It/She]since stdenv doesn't need more complexity17:47:17
@pyrox:pyrox.devdish [Fox/It/She]frankly it hurts my head sometimes lol17:47:22
18 Dec 2025
@aleksi:pikaviestin.fialeksi

Can we cross-bootstrap even the darwin platforms from Linux?

08:58:00
@k900:0upti.meK900No, Darwin needs its own bootstrap chain I think09:10:11
@emilazy:matrix.orgemilythat would also make Darwin development a pain11:37:05
@alex:tunstall.xyzAlexIs it not already?12:05:38
@reckenrode:matrix.orgRandy EckenrodeMaybe once Darwin is switched to LLVM/LLD bintools.12:37:14
@reckenrode:matrix.orgRandy EckenrodeBut it would still be painful without some way to emulate the Linux part.12:37:36
20 Dec 2025
@chn:chn.moe陈浩南I fixed a bug in binutils wrapper and bootstraping https://github.com/NixOS/nixpkgs/pull/472652 But I am not confident with complex bash scripts. Could anyone check the pr if I miss any edge cases?10:12:25
4 Aug 2022
@winterqt:nixos.devWinter (she/her) joined the room.03:27:09
@0x4a6f:matrix.org[0x4A6F] joined the room.22:08:01
6 Aug 2022
@winterqt:nixos.devWinter (she/her)

Does anyone know where the fact that the Darwin stdenv builds CMake twice comes from? As far as I can tell, it's from stage 0, and then just gets used in the other stages from there. Am I missing something here, is it something with the overrides? It looks like it might be, but then the fact that those are only allowed in the final stage (per booter.nix) (when that doesn't seem true, since then they wouldn't be defined...?) comes up.

(Isn't this the same pattern (defining in one stage and referencing in the others) that makes Glibc only build a limited number of times in the Linux stdenv?)

08:00:17
@trofi:matrix.orgtrofi

You think cmake should be rebuild less? Or more?

glibc's is probably a bit different as it's a part of stdenv.cc.libc and mainly used by that I would guess. Also, if depends if the package is used or not by other packages in the derivation would affect rebuild count as well.

14:59:09
@trofi:matrix.orgtrofi Looking at stdenv's dep tree I see 2 cmake-boot hashes and one cmake hash: https://dpaste.com/8GGM6P9BF.txt 15:03:11
@winterqt:nixos.devWinter (she/her)
In reply to @trofi:matrix.org

You think cmake should be rebuild less? Or more?

glibc's is probably a bit different as it's a part of stdenv.cc.libc and mainly used by that I would guess. Also, if depends if the package is used or not by other packages in the derivation would affect rebuild count as well.

I have no particular opinion, I'm just curious how that happens.
21:22:09
@winterqt:nixos.devWinter (she/her) Oh, for clarification, I was talking about cmake-boot. 21:22:19
@winterqt:nixos.devWinter (she/her) (which is cmake in the stdenv stages) 21:22:29
@winterqt:nixos.devWinter (she/her)see the line i linked21:22:36
@trofi:matrix.orgtrofi AFAIU cmake = cmakeMinimal is only for stage1-4 (first build: bootstrapTools -> cmake-boot in pastebin). Last stage uses cmake as is. Also note that cmakeMinimal is used by zstd (used by final stage, does second build: stage4 -> cmake-boot -> zstd in pastebin). 21:44:31
@trofi:matrix.orgtrofi I used the following command to grep through the full depgraph: $ nix-store --query --graph $(nix-instantiate -A stdenv --argstr system x86_64-darwin) 21:45:39

Show newer messages


Back to Room ListRoom Version: 9