guix-devel
[Top][All Lists]
Advanced

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

ocaml bootstrap (was Re: Core-updates merge)


From: Efraim Flashner
Subject: ocaml bootstrap (was Re: Core-updates merge)
Date: Sun, 30 Apr 2023 09:05:37 +0300

On Fri, Apr 28, 2023 at 04:17:40PM +0200, Simon Tournier wrote:
> Hi Andreas,
> 
> On mar., 25 avril 2023 at 16:09, Andreas Enge <andreas@enge.fr> wrote:
> 
> > - OCaml could be simplified by dropping version 4.07 (Julien Lepiller).
> 
> Well, 4.07 is the version that is de-bootstrapped, i.e. bootstrapped
> using ’camlboot’ via Guile – for details see [2].
> 
> However, higher versions (4.09, 4.14, 5) does not use this seed and thus
> they are not de-bootstrapped.  Well, I do not know the status upstream;
> from my point of view, we have two options:
> 
>  a) Agree with other distros and OCaml folks to rely on a common OCaml
>  4.07 bootstrapped using camlboot and then use this OCaml 4.07 as the
>  seed for the subsequent versions.  Somehow having a way to verify the
>  current OCaml compiler without running again and again via camlboot.
> 
>  b) Build ourselves a chain from 4.07 bootstrapped with camlboot to
>  modern OCaml compilers.  However, each time we modify one dependency of
>  camlboot, it means rebuild the complete chain.  Well, bootstrapping via
>  camlboot can be very slow and I do not know if we have the resources
>  for non-x86_64 architecture.  Here, the list of the emerged
>  dependencies:

I think similarly to the very slow *-mes part of the bootstrap chain, we
have to realize that some parts are just very slow. (A vote for b)

I built camlboot once on aarch64, probably a year ago. IIRC it took more
than 24 hours. I will say that it is doable without needing 8GB of ram,
which is also a limiting factor for the slow architectures.

>     $ guix graph camlboot -t bag-emerged | grep label | cut -d'=' -f2
>      "camlboot@0.0.0-1.45045d0", shape 
>      "guile@3.0.9", shape 
>      "pkg-config@0.29.2", shape 
>      "tar@1.34", shape 
>      "gzip@1.12", shape 
>      "bzip2@1.0.8", shape 
>      "file@5.44", shape 
>      "diffutils@3.8", shape 
>      "patch@2.7.6", shape 
>      "findutils@4.9.0", shape 
>      "gawk@5.2.1", shape 
>      "sed@4.8", shape 
>      "grep@3.8", shape 
>      "xz@5.2.8", shape 
>      "coreutils@9.1", shape 
>      "make@4.3", shape 
>      "bash-minimal@5.1.16", shape 
>      "ld-wrapper@0", shape 
>      "binutils@2.38", shape 
>      "gcc@11.3.0", shape 
>      "glibc@2.35", shape 
>      "glibc-utf8-locales@2.35", shape 
>      "libffi@3.4.4", shape 
>      "bash-minimal@5.1.16", shape 
>      "libunistring@1.0", shape 
>      "libgc@8.2.2", shape
>
>  c) Fix the dependencies of camlboot.

Looking at camlboot, there's a native input of guile-3.0. Unless we want
to bootstrap using some of the boot0 packages or actually find the
minimum set of packages needed and remove the rest that are brought in
by implicit-inputs (recursively) I think it's already as small as
possible.

> 
> Well, it seems a separated discussion but it echoes the recent blog post [3]
> about “The Full-Source Bootstrap”. :-)
> 
> 2: 
> https://10years.guix.gnu.org/video/camlboot-debootstrapping-the-ocaml-compiler
> 3: 
> https://guix.gnu.org/en/blog/2023/the-full-source-bootstrap-building-from-source-all-the-way-down/
> 
> 
> Cheers,
> simon
> 
> 
> 

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: signature.asc
Description: PGP signature


reply via email to

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