Nixpkgs Stdenv | 227 Members | |
| 75 Servers |
| Sender | Message | Time |
|---|---|---|
| 25 Nov 2024 | ||
| I believe I built it. I'm not sure. | 01:19:46 | |
| could be misremembering | 01:19:47 | |
In reply to @philiptaron:matrix.orgMy experience is that everyone has their own vision of how bootstrap is supposed to work in nixpkgs. Everyone's vision is usually slightly flawed in one way or another (as in does not achieve basic goals like "no references to the bootstrap tools (or copies) in the final stdenv", or does not actually deliver fully working gcc, or does not allow mixing gccs, etc.). | 16:55:40 | |
| Yes, trofi, exactly this. What we have today works but requires a large seed, is quite entangled with the actual tools themselves, and has pitfalls of many specified and unspecified varieties. I don't have a vision of my own. I'm just the poor sod in the meme who says we should improve matters somewhat. I hope (at some unspecified future time) to put my labor into trying to define what better looks like and to making it so. | 18:47:28 | |
| We have the minimal bootstrap work | 18:51:13 | |
| That's very good and just needs someone to get everything in place to ship it | 18:51:30 | |
| "just" is doing a lot of load-bearing work in that sentence! | 18:52:22 | |
| For sure: minimal bootstrap's path has been paved substantially, not least of which by GUIX. | 18:52:50 | |
| it exists in-tree | 18:56:27 | |
I personally think minimal bootstrap is an orthogonal effort to bootstrap structure: minimal bootstrap changes how binary seed is provided, but does not change the way how it's used to get an up-to-date toolchain. For example it does not magically untangle circular dependency between g++ and libstdc++.so. | 21:33:46 | |
| Dealing with circular dependencies seems like a part of shrinking a binary seed though? Because otherwise you need to include one of the dependencies in the seed. | 21:43:01 | |
g++ uses libstdc++.so as part of it's implementation. libstdc++ uses g++ to build itself. It's not directly related to the seed. Even after you got the seed you need to build both of those. You need to build both in a single derivation to get them linked against one another (gcc usually builds it in 2 stages internally to untagle from builder's gcc/libstdc++.so, which nixpkgs disables and suffers afterwardsm fresh example is https://github.com/NixOS/nixpkgs/issues/342904). | 21:47:27 | |
* g++ uses libstdc++.so as part of it's implementation. libstdc++ uses g++ to build itself. It's not directly related to the seed. Even after you got the seed you need to build both of those. You need to build both in a single derivation to get them linked against one another (gcc usually builds it in 2 stages internally to untagle from builder's gcc/libstdc++.so, which nixpkgs disables and suffers afterwards, fresh example is https://github.com/NixOS/nixpkgs/issues/342904). | 21:47:55 | |
| Isn't this kind of problem exactly why the Guix bootstrap involves multiple versions of GCC? Obviously, you want to build as few versions as possible and it seems like someone else has already done the hard work of finding a usable path from stage0 to modern GCC. I suppose the main difficulty is porting the build steps to Nix? | 21:58:52 | |
| that has already been done | 21:59:24 | |
| it doesn't address trofi's concern, which comes up within a GCC build | 21:59:30 | |
| Right, I see now. Nix needs a DAG but it requires hacking into the GCC build system to untangle libstdc++ from g++. | 22:00:54 | |
Yeah, or patching built binaries after the fact to redirect to fresher libstdc++. | 22:23:26 | |
| 26 Nov 2024 | ||
| 07:49:11 | ||
| 27 Nov 2024 | ||
In reply to @trofi:matrix.orgI think it is still related | 06:34:27 | |
| Nix wants a dag, but the from-scratch bootstrap forces a dag | 06:34:38 | |
| in practice, reality does dictate it's a dag | 06:34:47 | |
| the way the world get around that in practice is bootstrapping to a fixed point | 06:35:02 | |
| * the way the world get around that in practice is bootstrapping to a fixed point, either byte-for-byte or just the ABI | 06:35:20 | |
In reply to @philiptaron:matrix.orgGood list! Would like to we the GCC repackaging on that list too :) | 06:35:57 | |
| what repackaging? | 06:36:33 | |
In reply to @Ericson2314:matrix.orgIt's a DAG from build step standpoint. But from installation directory standpoint gcc's own bootstrap allows installing libstdc++ and gcc multiple times to make sure both are using one another. nix does not allow for in place file updates and one has to resort to file copies from one store path into another and requires binary patching to achieve the same effect (which is fragile for self-references and effectively requires CA compatibility as a precondition). | 06:56:31 | |
Luckily gcc is CA-compatible, but glibc is not. As a result I have to use hacks like https://bpa.st/raw/5QWA just to make glibc work in CA (and in cases when I have to rewrite references to relocate glibc) :) | 07:02:13 | |
__FILE__ has been a persistent painful cause of "trivial" self-references / unwanted references for me lately | 07:08:30 | |
| not even with CA derivations | 07:08:33 | |