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: Taylan Ulrich Bayırlı/Kammer
Subject: Re: Removing compilers that cannot be bootstrapped
Date: Mon, 21 Mar 2016 20:15:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

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

> 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!  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.
>
> What can we possibly do to avoid being yet another distro that relies
> on a bunch of blobs (leaving the *true* bootstrap binaries out of it
> for now)?

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 think the original proposal had it that we keep an internal bootstrap
version of the package, which works by downloading a blob, and this is
used to compile the true, public package.  However, we would need to
update the bootstrap version whenever it becomes too old to compile the
newest version.  So new untrusted blobs enter the picture every once in
a while.  Maybe frequently, if some of these compilers don't care much
about supporting the ability to be compiled with somewhat older versions
of themselves.

A solution to that in turn might be to keep a growing list of
intermediate versions of the compiler in addition to the bootstrap and
newest versions.  The first version in this list can be compiled via the
bootstrap version, each nth version in the list can be compiled with the
n-1th version, and the last version in the list is used to compile the
current, newest version.

    (define %foo-compiler-bootstrap
      (package ... (source some-blob) ...))

    (define %foo-compiler-intermediate-versions-list
      '("1.1" "1.7" "2.2" ...))

    (define %foo-compiler-intermediate-versions
      (magic %foo-compiler-bootstrap
             %foo-compiler-intermediate-versions-list))

    (define foo-compiler
      (package
        ...
        (native-inputs
          `(("foo-compiler" ,(last %foo-compiler-intermediate-versions))
            ...))
        ...))

So when someone instructs guix to rebuild the world from scratch, it
downloads the bootstrap blob, then builds 1.1 with it, then builds 1.7
with that, then 2.2 with that, and so on, and ultimately the current
version.

This way it's truly one blob for each such compiler in guix.  And one
day, that blob can be replaced with a verified-safe one.

I just came up with this and haven't thought much about it.  Just
throwing it out there.

> - Dave

Taylan



reply via email to

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