guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing compilers that cannot be bootstrapped


From: Ludovic Courtès
Subject: Re: Removing compilers that cannot be bootstrapped
Date: Mon, 21 Mar 2016 23:48:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

"Thompson, David" <address@hidden> skribis:

> Haskell, OCaml, Chicken, and other compilers that we package have a
> serious issue that many of us are aware of: they cannot be built from
> source!

(And GCC, but let’s put it aside for now.)

> They rely upon pre-built binaries of the same compiler.  I understand
> that it's very inconvenient to not have these compilers available to
> us, and all of the software that is written in their respective
> languages, but I feel like all of our work is undermined by making
> exceptions for them.  I would like to remove compilers that don't have
> a bunch of dependent packages yet such as Chicken until upstream fixes
> the issue.  But we have tons of Haskell packages and a handful of
> OCaml packages and it would be heartbreaking to some to remove all of
> that hard work.

I definitely sympathize with your concerns, and also in the case of
whole-distro bootstrapping.

However, removing things seems really harsh, and also sidestepping the
problem (not to mention that once we’d done that, we couldn’t ignore
GCC’s bootstrapping.)

address@hidden (Taylan Ulrich "Bayırlı/Kammer") skribis:

> A while back Mark raised the idea of hosting one pre-compiled bootstrap
> version of each such compiler, and use that to compile further versions.
>
> This way the number of blobs is one per such compiler, instead of one
> for every new version of each such compiler.
>
> It seemed like a good medium-term solution to me.  I'm not sure how it
> would be implemented.

I like the idea.

Often, in their implementation history, compilers are boostrapped from
something else initially, and only later to they become self-hosted and
unbootstrappable.

So in theory, it’d be possible to find, say, an old-enough GHC that only
requires a C compiler (?), and use that to build the next version and so
on, until we reach the latest version.  I suspect the same applies to
many compilers.

This is technically possible.  The main difficulty is to find what exact
chain of compiler versions will work, and then to make sure that the
super-old compilers can build.  The risk, as Andreas suggests, is that
maintaining those old versions will require dragging a whole graph of
old dependencies, recursively.

But really, we won’t know until we’ve actually tried ;-), and it’ll
be different for each compiler.

I would suggest that people pick a compiler they’re more or less
familiar with, and give it a try.  MIT/GNU Scheme might be a good start,
since we should be able to talk with the folks behind it and reach
mutual understanding.  ;-)

For GCC, an idea discussed at
<https://reproducible-builds.org/events/athens2015/bootstrapping/> would
be to build GCC 4.7 (the last version written in plain C) with something
more auditable like TinyCC, and then use this g++ 4.7 to build whatever
GCC version we want.  Again, sounds like it should work, but we need to
actually try.

Thoughts?

BTW, the “good news” is that more and more compilers build upon LLVM,
and for those there’s no bootstrapping problem if we take the C++
compiler for granted.

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]