Aux Foundation is now available!

I’m happy to announce the release of Aux Foundation, a binary bootstrap chain for Nix. This allows us to build a modern, core set of tools (like GCC, Python, etc) from a single ~300-byte binary seed file. Aux Foundation is was made possible by the bootstrapping efforts in Guix as well as the work and help of Emily Trau.

Today Aux Foundation provides an i686-linux bootstrap chain. In the future we may be able to provide one for x86_64-linux as well, but certain blockers remain there. For now it is best used as a starting point to do cross compilation and build a larger package set. Currently this is being experimented on in Tidepool.

Again, I cannot give enough thanks to the Guix developers, Emily Trau, and everyone else who has worked on creating and porting this bootstrap chain. The work is extremely difficult and unforgiving at the lower levels and getting it all working is nothing short of incredible.

12 Likes

I am curious what the blockers are for x86-64-linux native bootstrap. This is something I may be able to help with. I looked through the Tidepool and Foundation git repos but was not able to find any explanation of the problem, only an assertion that it doesn’t work with a link to a private Matrix conversation (#10 - assert against trying to bootstrap with x86_64-linux - auxolotl/foundation - Auxolotl Forge).

There’s nothing particularly exciting / useful in what I assume the relevant bits of the channel scrollback are. I think the tools the bootstrap chain which foundation is based on (which is similar to the one in guix, and in a nixpkgs PR somewhere) just doesn’t support it - I’ll try to find you some links…

Edit: actually, not sure that’s true. There might be more info in the old github repo? I’ll have a rummage.

minimal-bootstrap.stage0-posix: support x86_64-linux by emilytrau · Pull Request #232329 · NixOS/nixpkgs · GitHub says:

Note that mes is currently only able to bootstrap from M2 on i686-linux , however x86_64-linux and riscv is targetted for the next release

… not sure if that’s our problem, or if it ever got sorted anywhere…

Edit: minimal-bootstrap.mes: 0.24.2 -> 0.25 by emilytrau · Pull Request #268839 · NixOS/nixpkgs · GitHub looks like it might be the fix for the above. Also browsing around nixpkgs, looks like it might be worth tagging in @pyrox who’s been working in this area?

Desperately trying to refresh my memory here :) Looks like @isabel was the last person to look at x64 bootstrap back when foundation was still part of labs? :- auxolotl/labs/feat/x86-64_linux
There’s an old failed evaluation on hydra for that which I think shows the same error we’re still seeing: Hydra - Log of step 1 of build 1009 of job steve-test:aux.labs.foundation.x86-64:stage1-musl-boot

Also, maybe someone like @jakehamilton could split these replies off into a new thread in the SIG Core forum or something?

Edit:

Random guess: foundation/src/stages/stage1/tinycc/helpers.nix at 187b21870e60c650fb7f08c00b99e6f648c53198 - auxolotl/foundation - Auxolotl Forge seems to always build a 32-bit targeted compiler, which is making the musl configure try to target x32 (ILP32)?

I have a vague recollection of having started debugging this last year …

I’ve also given the bootstrap stuff a close read, though I haven’t changed anything in it. If anyone else is trying to get oriented in it, let me know and I might be able to help.