Thomas Knudsen <knudsen.tho...@gmail.com> writes: > Den tirs. 5. dec. 2023 kl. 02.15 skrev Greg Troxel via gdal-dev < > gdal-dev@lists.osgeo.org>: >> Building the >> rust compiler requires the *immediately preceding* compiler, which seems >> unprecented, and I don't understand how people can think that's ok > > I don't think this is true - it's merely the common case:
I am guessing you have not struggled with packaging the rust compiler, and are just using binaries provided by other people, which is the Linuxy approach. > Over at https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html > the description is > >> The stage0 compiler is usually the current beta rustc compiler and its > associated >> dynamic libraries, which x.py will download for you. >> (You can also configure x.py to use something else.) > > which makes it hardly any different than any compiler bootstrapping process. That page *totally omits* discussion of how far back the bootstrap compiler can be. That is not about the concept of bootstrapping, but about whether the project has rules that the compiler codebase must only use language features from some earlier times. In theory, yes, any particular version of any particular self-hosted compiler needs at least some previous version. But there is a vast practical difference between "needs some not super ancient version" and "needs the version that was released a few months ago". The rust community appears to think it's ok to require the bootstrap compiler that is really recent. Based on hearing from and helping the people working on packaging rust in pkgsrc, it seems quite clear that the previous release is almost always required. Compiling bootstrap kits is a source of considerable difficulty, and if e.g. rust 1.60 could be used to build 1.61 through 1.74, they'd be doing it that way. In contrast, I think people are building gcc 12 with gcc 7 without issues. It's not really "5 versions old" so much as "gcc from 5 years ago can build new gcc". With gcc, it's probably even better than that, as they seem to get it that bootstrapping sequences are painful. I basically don't hear complaints about gcc bootstrapping, only discussion from the guix/mes community about getting to full gcc from a binary seed small enough to be hand reviewed (Thompson's trusting trust attack and all that). go is another example. go 1.4 can be built from C, go 1.18 can be built with 1.4, and later versions are buildable with 1.18. To disprove my statement, please install a rust compiler released in 2020 and use it to build 1.74, without the system under the hood fetching a 1.73 binary somebody else built. _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev