From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 26 Feb 2021 23:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46806@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16143812442881 (code B ref -1); Fri, 26 Feb 2021 23:15:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Feb 2021 23:14:04 +0000 Received: from localhost ([127.0.0.1]:42780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFmJ9-0000kP-IL for submit@debbugs.gnu.org; Fri, 26 Feb 2021 18:14:04 -0500 Received: from lists.gnu.org ([209.51.188.17]:60926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFmJ7-0000k6-J0 for submit@debbugs.gnu.org; Fri, 26 Feb 2021 18:14:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFmJ7-0002ZO-Dr for guix-patches@gnu.org; Fri, 26 Feb 2021 18:14:01 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]:33066) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFmJ2-0002F6-JM for guix-patches@gnu.org; Fri, 26 Feb 2021 18:14:00 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 841a9365 for ; Fri, 26 Feb 2021 23:13:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type; s=dkim; bh=8Vz /nnhEHTS8ku46lfeRYHa7+EaaYpjC4MP4CbhW+zI=; b=BSEOCnBJBkAQALgGa+w wfcfu9TrRmr2AZxFmcl2C0a4kVVcFyLa5RhOrWQxp6i9m9Xxw5ZBHqLJP+AX+o+/ BCAdFiDNUrxWTdWMB149OIh9o4gTHjrv3NBfOw7fiZr0xkSjbziv0bYPCCrlXzhd VzO9IDdUfclOLd6cw2g4qektEzrvKvmvrLiS46KZiO+QjKCJ3/Kh1YpLG8zDwPJc hwYNRK5qqAfXBSjouhmlrycjegaIiqrQgOFqksvNWYzkrbzkOME3FWM+G5KekWl1 ybxOCkjnEFAhyVbaBY4GBnZQc0YgXkFOp/Gk9q7vPIFruhXYGgJ6BmaTvBX6ZjdF fCA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id a78db312 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Fri, 26 Feb 2021 23:13:45 +0000 (UTC) Date: Sat, 27 Feb 2021 00:13:39 +0100 From: Julien Lepiller Message-ID: <20210227001244.17cc3833@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/w5x6PD+DE2QrzzUUd_Wu75L" Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --MP_/w5x6PD+DE2QrzzUUd_Wu75L Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Guix! This small series adds camlboot, a project to reimplement a bootstrap for OCaml, which lets us remove the pre-built boot/ocaml{c,lex} :) The first patch builds the bootstraped ocamlc and ocamllex. This takes around 4 hours to build. The second patch rebuilds them using the source code for ocaml 4.07.1, instead of the modified sources used in camlboot, and reuse them to run the main Makefile (make world.opt). As a result, we have identical files for this bootstrap and the unbootstrapped OCaml (up to output store paths and hash of some files that get embedded in native files, which differ because of the different output path). --MP_/w5x6PD+DE2QrzzUUd_Wu75L Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-gnu-Add-camlboot.patch >From 8fd06caa83e55d27dc5998f7548a7d45c55c6a91 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 27 Feb 2021 00:07:20 +0100 Subject: [PATCH 1/2] gnu: Add camlboot. * gnu/packages/ocaml.scm (camlboot): New variable. --- gnu/packages/ocaml.scm | 66 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 9e68359a42..01c14a0ba0 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -52,6 +52,7 @@ #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) + #:use-module (gnu packages guile) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) #:use-module (gnu packages llvm) @@ -105,6 +106,71 @@ ".tar.gz")) (sha256 (base32 hash)))) +(define-public camlboot + (let ((commit "506280c6e0813e0e794988151a8e46be55373ebc") + (revision "0")) + (package + (name "camlboot") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Ekdohibs/camlboot") + (commit commit) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0vimxl4karw9ih3npyc5rhxg85cjh6fqjbq3dzj7j2iymlhwfbkv")) + (modules '((guix build utils))) + (snippet + `(begin + ;; Remove bootstrap binaries and pre-generated source files, + ;; to ensure we actually bootstrap properly. + (for-each delete-file (find-files "ocaml-src" "^.depend$")) + (delete-file "ocaml-src/boot/ocamlc") + (delete-file "ocaml-src/boot/ocamllex") + ;; Ensure writable + (for-each + (lambda (file) + (chmod file (logior (stat:mode (stat file)) #o200))) + (find-files "." ".")))))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list "_boot/ocamlc"); build target + #:tests? #f; no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'no-autocompile + (lambda _ + ;; prevent a guile warning + (setenv "GUILE_AUTO_COMPILE" "0"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (install-file "_boot/ocamlc" bin) + (rename-file "miniml/interp/lex.byte" "ocamllex") + (install-file "ocamllex" bin))))))) + (native-inputs + `(("guile" ,guile-3.0))) + (home-page "https://github.com/Ekdohibs/camlboot") + (synopsis "OCaml bootstrap") + (description "OCaml is written in OCaml. Its sources contain a pre-compiled +bytecode version of ocamlc and ocamllex that are used to build the next version +of the compiler. Camlboot implements a bootstrap for the OCaml compiler and +provides a bootstrapped equivalent to these files. + +It contains a compiler for a small subset of OCaml written in Guile Scheme, +an interpreter for OCaml written in that subset and a manually-written lexer +for OCaml. These elements eliminate the need for the binary bootstrap in +OCaml and can effectively bootstrap OCaml 4.07. + +This package produces a native ocamlc and a bytecode ocamllex.") + (license license:expat)))) + (define-public ocaml-4.11 (package (name "ocaml") -- 2.30.0 --MP_/w5x6PD+DE2QrzzUUd_Wu75L Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0002-gnu-ocaml-4.07-Bootstrap.patch >From 8fa9e59c8d90339478d65e269b37cbb3b201232d Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 27 Feb 2021 00:07:30 +0100 Subject: [PATCH 2/2] gnu: ocaml-4.07: Bootstrap. * gnu/packages/ocaml.scm (ocaml-4.07): Implement bootstrap via camlboot. --- gnu/packages/ocaml.scm | 179 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 176 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 01c14a0ba0..272ed3a2d6 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -255,7 +255,7 @@ functional, imperative and object-oriented styles of programming.") (base32 "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj")))))) -(define-public ocaml-4.07 +(define ocaml-4.07-boot (package (inherit ocaml-4.09) (version "4.07.1") @@ -267,11 +267,102 @@ functional, imperative and object-oriented styles of programming.") "/ocaml-" version ".tar.xz")) (sha256 (base32 - "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z")))) + "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z")) + (modules '((guix build utils))) + (snippet + `(begin + ;; Remove bootstrap binaries and pre-generated source files, + ;; to ensure we actually bootstrap properly. + (for-each delete-file (find-files "." "^.depend$")) + (delete-file "boot/ocamlc") + (delete-file "boot/ocamllex"))))) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'configure 'copy-bootstrap + (lambda* (#:key inputs #:allow-other-keys) + (let ((camlboot (assoc-ref inputs "camlboot"))) + (copy-file (string-append camlboot "/bin/ocamllex") "boot/ocamllex") + (copy-file (string-append camlboot "/bin/ocamlc") "boot/ocamlc") + (chmod "boot/ocamllex" #o755) + (chmod "boot/ocamlc" #o755)))) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (mandir (string-append out "/share/man"))) + (invoke "./configure" + "--prefix" out + "--mandir" mandir)))) + (replace 'build + (lambda* (#:key parallel-build? #:allow-other-keys) + (define* (make . args) + (apply invoke "make" + (append (if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + args))) + (define (touch file) (invoke "touch" file)) + (touch "byterun/.depend") + (make "-C" "byterun" "depend") + (make "-C" "byterun" "all") + (copy-file "byterun/ocamlrun" "boot/ocamlrun") + (touch ".depend") + (make "ocamlyacc") + (copy-file "yacc/ocamlyacc" "boot/ocamlyacc") + (touch "stdlib/.depend") + (make "-C" "stdlib" "sys.ml") + (make "-C" "stdlib" "CAMLDEP=../boot/ocamlc -depend" "depend") + (make "-C" "stdlib" "COMPILER=" + "CAMLC=../boot/ocamlc -use-prims ../byterun/primitives" + "all") + (for-each + (lambda (file) + (copy-file file (string-append "boot/" (basename file)))) + (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo" "stdlib/camlheader" + (find-files "stdlib" ".*.cmi$"))) + (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a") + (touch "tools/.depend") + (make "-C" "tools" + "CAMLC=../boot/ocamlc -nostdlib -I ../boot -use-prims ../byterun/primitives -I .." + "make_opcodes" "cvt_emit") + (touch "lex/.depend") + (make "-C" "lex" "CAMLDEP=../boot/ocamlc -depend" "depend") + (make "CAMLDEP=boot/ocamlc -depend" "depend") + (make "CAMLC=boot/ocamlc -nostdlib -I boot -use-prims byterun/primitives" + "ocamlc") + (make "-C" "lex" + "CAMLC=../boot/ocamlc -strict-sequence -nostdlib -I ../boot -use-prims ../byterun/primitives" + "all"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (install-file "ocamlc" bin) + (install-file "lex/ocamllex" bin) + (install-file "byterun/ocamlrun" bin))))))) + (native-inputs + `(("camlboot" ,camlboot) + ("perl" ,perl) + ("pkg-config" ,pkg-config))))) + +(define-public ocaml-4.07 + (package + (inherit ocaml-4.07-boot) (arguments (substitute-keyword-arguments (package-arguments ocaml-4.09) ((#:phases phases) `(modify-phases ,phases + (add-before 'configure 'copy-bootstrap + (lambda* (#:key inputs #:allow-other-keys) + (let ((ocaml (assoc-ref inputs "ocaml"))) + (copy-file (string-append ocaml "/bin/ocamllex") "boot/ocamllex") + (copy-file (string-append ocaml "/bin/ocamlc") "boot/ocamlc") + (copy-file (string-append ocaml "/bin/ocamlrun") "boot/ocamlrun") + (chmod "boot/ocamlrun" #o755) + (chmod "boot/ocamllex" #o755) + (chmod "boot/ocamlc" #o755)))) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -280,7 +371,89 @@ functional, imperative and object-oriented styles of programming.") ;; --prefix= syntax (with equals sign). (invoke "./configure" "--prefix" out - "--mandir" mandir)))))))))) + "--mandir" mandir)))) + (add-before 'build 'generate-depend + (lambda* (#:key parallel-build? #:allow-other-keys) + (define* (make . args) + (apply invoke "make" + (append (if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + args))) + ;; These files were deleted in a snippet because they are + ;; pre-generated + (invoke "touch" ".depend" "stdlib/.depend" "byterun/.depend" + "tools/.depend" "lex/.depend" "asmrun/.depend" + "debugger/.depend" "ocamltest/.depend" "ocamldoc/.depend" + "ocamldoc/stdlib_non_prefixed/.depend" + "otherlibs/bigarray/.depend" + "otherlibs/graph/.depend" + "otherlibs/raw_spacetime_lib/.depend" + "otherlibs/str/.depend" + "otherlibs/systhreads/.depend" + "otherlibs/threads/.depend" + "otherlibs/unix/.depend" + "otherlibs/win32unix/.depend") + (make "-C" "byterun" "depend") + (make "-C" "asmrun" "depend") + (make "-C" "byterun" "all") + (copy-file "byterun/ocamlrun" "boot/ocamlrun") + (make "ocamlyacc") + (copy-file "yacc/ocamlyacc" "boot/ocamlyacc") + (make "-C" "stdlib" "sys.ml") + (make "-C" "stdlib" + "CAMLDEP=../boot/ocamlc -depend" + "depend") + (make "-C" "stdlib" "COMPILER=" + "CAMLC=../boot/ocamlc -use-prims ../byterun/primitives" + "all") + (for-each + (lambda (file) + (copy-file file (string-append "boot/" (basename file)))) + (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo" "stdlib/camlheader" + (find-files "stdlib" ".*.cmi$"))) + (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a") + (make "-C" "lex" "CAMLDEP=../boot/ocamlc -depend" "depend") + (make "-C" "lex" "all") + (substitute* "tools/Makefile" + (("\\$\\(CAMLRUN\\) ./ocamldep") "../boot/ocamlc -depend")) + (substitute* '("otherlibs/graph/Makefile" + "otherlibs/systhreads/Makefile" + "otherlibs/threads/Makefile" + "otherlibs/unix/Makefile") + (("\\$\\(CAMLRUN\\) ../../tools/ocamldep") + "../../boot/ocamlc -depend")) + (substitute* '("otherlibs/bigarray/Makefile" + "otherlibs/raw_spacetime_lib/Makefile" + "otherlibs/str/Makefile" + "otherlibs/win32unix/Makefile") + (("\\$\\(CAMLRUN\\) \\$\\(ROOTDIR\\)/tools/ocamldep") + "../../boot/ocamlc -depend")) + (make "-C" "tools" "depend") + (make "-C" "otherlibs/bigarray" "depend") + (make "-C" "otherlibs/graph" "depend") + (make "-C" "otherlibs/raw_spacetime_lib" "depend") + (make "-C" "otherlibs/str" "depend") + (make "-C" "otherlibs/systhreads" "depend") + (make "-C" "otherlibs/threads" "depend") + (make "-C" "otherlibs/unix" "depend") + (make "-C" "otherlibs/win32unix" "depend") + (make "-C" "debugger" "CAMLDEP=../boot/ocamlc -depend" "depend") + (make "-C" "ocamltest" "ocamldep=../boot/ocamlc -depend -slash" "depend") + (make "parsing/parser.mli") + (substitute* "ocamldoc/Makefile" + (("include Makefile.unprefix") + "include Makefile.unprefix +depend: $(STDLIB_MLIS) $(STDLIB_DEPS)")) + (make "-C" "ocamldoc" "OCAMLDEP=../boot/ocamlc -depend -slash" "depend") + (make "-C" "ocamldoc/stdlib_non_prefixed" + "OCAMLDEP=../../boot/ocamlc -depend -slash" "depend") + (make "CAMLDEP=boot/ocamlc -depend" "depend") + )))))) + (native-inputs + `(("ocaml" ,ocaml-4.07-boot) + ("perl" ,perl) + ("pkg-config" ,pkg-config))))) (define-public ocaml ocaml-4.11) -- 2.30.0 --MP_/w5x6PD+DE2QrzzUUd_Wu75L-- From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Feb 2021 02:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.161447815924006 (code B ref 46806); Sun, 28 Feb 2021 02:10:02 +0000 Received: (at 46806) by debbugs.gnu.org; 28 Feb 2021 02:09:19 +0000 Received: from localhost ([127.0.0.1]:45606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGBWI-0006F7-UF for submit@debbugs.gnu.org; Sat, 27 Feb 2021 21:09:19 -0500 Received: from lepiller.eu ([89.234.186.109]:58926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGBWD-0006Es-Bn for 46806@debbugs.gnu.org; Sat, 27 Feb 2021 21:09:17 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id ccfdab03 for <46806@debbugs.gnu.org>; Sun, 28 Feb 2021 02:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=a1W25So/OqhM Atw+R+4hr9/F+DKwCqiCdaQDQW84clo=; b=Qc44Z0pfuujBA4Mc8gCop1PF//lI PNN0EG+51Fw2iMsJYQeoqXMy1uEmFFsFGgWVhXc7DYnDFkwna4+xaixPruvzIgZA /wzbeQA4DulyyGBViw6TbGKevlxljGxwd1TH5j9SqBVBXoDejNWcvfdWLPtRqEws Bt3y0xL4/bD/Dde/4Of7Kb0jKPoLNBhu/AbdI29uNTgjAS1jh0cwnOs5rqV06tNu hsf6fsUlAIXwNpPIa/afB6Orh8qeRWu5hISTQtjrFTx6JYqb3vmMtcs9mnmpqeq0 G9HYYaPJkVjVpmrsD2IxxCJ2rfHThgiP2v6/22aN2b7rqD9ZUF9y3gj9Pw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 9eb468f9 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <46806@debbugs.gnu.org>; Sun, 28 Feb 2021 02:09:10 +0000 (UTC) Date: Sun, 28 Feb 2021 03:09:05 +0100 From: Julien Lepiller Message-ID: <20210228030905.78ccf557@tachikoma.lepiller.eu> In-Reply-To: <20210227001244.17cc3833@tachikoma.lepiller.eu> References: <20210227001244.17cc3833@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Le Sat, 27 Feb 2021 00:13:39 +0100, Julien Lepiller a =C3=A9crit : > Hi Guix! >=20 > This small series adds camlboot, a project to reimplement a bootstrap > for OCaml, which lets us remove the pre-built boot/ocaml{c,lex} :) >=20 > The first patch builds the bootstraped ocamlc and ocamllex. This takes > around 4 hours to build. The second patch rebuilds them using the > source code for ocaml 4.07.1, instead of the modified sources used in > camlboot, and reuse them to run the main Makefile (make world.opt). >=20 > As a result, we have identical files for this bootstrap and the > unbootstrapped OCaml (up to output store paths and hash of some files > that get embedded in native files, which differ because of the > different output path). Here's the second version of the series: the first patch is unchanged, the second patch is slightly better: the bootstrap ocaml 4.07 now run "make alldepends" to generate all the .depend files, and installs them to its output at share/depends. Then, ocaml-4.07 simply copies the bootstrap data from this package (ocamlc, ocamllex, ocamlrun and all the .depends) that were deleted from the archive, since they were pre-generated. I feel much better about this patch than the previous one. Thoughts? From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Feb 2021 02:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.161447938726146 (code B ref 46806); Sun, 28 Feb 2021 02:30:02 +0000 Received: (at 46806) by debbugs.gnu.org; 28 Feb 2021 02:29:47 +0000 Received: from localhost ([127.0.0.1]:45629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGBq6-0006nd-I7 for submit@debbugs.gnu.org; Sat, 27 Feb 2021 21:29:47 -0500 Received: from lepiller.eu ([89.234.186.109]:58932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGBq3-0006nQ-DB for 46806@debbugs.gnu.org; Sat, 27 Feb 2021 21:29:44 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 9c01c991 for <46806@debbugs.gnu.org>; Sun, 28 Feb 2021 02:29:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:in-reply-to:references:mime-version :content-type; s=dkim; bh=SZ+9yTKoZ0mr0AClhIVnkvWty0/l0muc6xNEGm P/6Jo=; b=lo31cpQbpJ8XxiHkId5vY7XNcLK+gvu7nz5snEWZYi10bwXqQc+SuP TTRDmDAS6+fSCg4kBShbsgnWNsfgU/qZFPgtIbwedKvHdcRQ0goZqN7EQoNWHN/Q 3lxvOOI9oOtv/ZncHxc1NwsVrj3oAak7hL+V24OL2xcVCP1xSnT5yKkwXmsogoPG LvqcBE4u8I/T4Br/O5WckSUU/mGbncfVyLo+SnPl636Ph9QgX3HwXFfEB3+fWfAd Zp1xsMSazl+AuLnyb/2T1iiDeMPebPOkx0wWbyCy0jMTy0OJNMN4CiIj40AuAniF w1QtunNQcIloYTlh7OK5i9GKJQ9E1d9w== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 85f1d9af (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <46806@debbugs.gnu.org>; Sun, 28 Feb 2021 02:29:40 +0000 (UTC) Date: Sun, 28 Feb 2021 03:29:33 +0100 From: Julien Lepiller Message-ID: <20210228032933.6f84c90a@tachikoma.lepiller.eu> In-Reply-To: <20210228030905.78ccf557@tachikoma.lepiller.eu> References: <20210227001244.17cc3833@tachikoma.lepiller.eu> <20210228030905.78ccf557@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/UwmgCR6s5fLMNBYR7SkI6F1" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --MP_/UwmgCR6s5fLMNBYR7SkI6F1 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Of course I forgot to attach the patches ^^' --MP_/UwmgCR6s5fLMNBYR7SkI6F1 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-gnu-Add-camlboot.patch >From 8fd06caa83e55d27dc5998f7548a7d45c55c6a91 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 27 Feb 2021 00:07:20 +0100 Subject: [PATCH 1/2] gnu: Add camlboot. * gnu/packages/ocaml.scm (camlboot): New variable. --- gnu/packages/ocaml.scm | 66 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 9e68359a42..01c14a0ba0 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -52,6 +52,7 @@ #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) + #:use-module (gnu packages guile) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) #:use-module (gnu packages llvm) @@ -105,6 +106,71 @@ ".tar.gz")) (sha256 (base32 hash)))) +(define-public camlboot + (let ((commit "506280c6e0813e0e794988151a8e46be55373ebc") + (revision "0")) + (package + (name "camlboot") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Ekdohibs/camlboot") + (commit commit) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0vimxl4karw9ih3npyc5rhxg85cjh6fqjbq3dzj7j2iymlhwfbkv")) + (modules '((guix build utils))) + (snippet + `(begin + ;; Remove bootstrap binaries and pre-generated source files, + ;; to ensure we actually bootstrap properly. + (for-each delete-file (find-files "ocaml-src" "^.depend$")) + (delete-file "ocaml-src/boot/ocamlc") + (delete-file "ocaml-src/boot/ocamllex") + ;; Ensure writable + (for-each + (lambda (file) + (chmod file (logior (stat:mode (stat file)) #o200))) + (find-files "." ".")))))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list "_boot/ocamlc"); build target + #:tests? #f; no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'no-autocompile + (lambda _ + ;; prevent a guile warning + (setenv "GUILE_AUTO_COMPILE" "0"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (install-file "_boot/ocamlc" bin) + (rename-file "miniml/interp/lex.byte" "ocamllex") + (install-file "ocamllex" bin))))))) + (native-inputs + `(("guile" ,guile-3.0))) + (home-page "https://github.com/Ekdohibs/camlboot") + (synopsis "OCaml bootstrap") + (description "OCaml is written in OCaml. Its sources contain a pre-compiled +bytecode version of ocamlc and ocamllex that are used to build the next version +of the compiler. Camlboot implements a bootstrap for the OCaml compiler and +provides a bootstrapped equivalent to these files. + +It contains a compiler for a small subset of OCaml written in Guile Scheme, +an interpreter for OCaml written in that subset and a manually-written lexer +for OCaml. These elements eliminate the need for the binary bootstrap in +OCaml and can effectively bootstrap OCaml 4.07. + +This package produces a native ocamlc and a bytecode ocamllex.") + (license license:expat)))) + (define-public ocaml-4.11 (package (name "ocaml") -- 2.30.0 --MP_/UwmgCR6s5fLMNBYR7SkI6F1 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0002-gnu-ocaml-4.07-Bootstrap.patch >From ed2c4c1c221eb60ddc9e47b58c03d9194c6a2beb Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 27 Feb 2021 00:07:30 +0100 Subject: [PATCH 2/2] gnu: ocaml-4.07: Bootstrap. * gnu/packages/ocaml.scm (ocaml-4.07): Implement bootstrap via camlboot. --- gnu/packages/ocaml.scm | 152 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 149 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 01c14a0ba0..ec5ddce2ac 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -255,7 +255,11 @@ functional, imperative and object-oriented styles of programming.") (base32 "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj")))))) -(define-public ocaml-4.07 +;; This package is a bootstrap package for ocaml-4.07. It builds from camlboot, +;; using the upstream sources for ocaml 4.07. It installs a bytecode ocamllex +;; and ocamlc, the bytecode interpreter ocamlrun, and generated .depend files +;; that we otherwise remove for bootstrap purposes. +(define ocaml-4.07-boot (package (inherit ocaml-4.09) (version "4.07.1") @@ -267,11 +271,149 @@ functional, imperative and object-oriented styles of programming.") "/ocaml-" version ".tar.xz")) (sha256 (base32 - "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z")))) + "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z")) + (modules '((guix build utils))) + (snippet + `(begin + ;; Remove bootstrap binaries and pre-generated source files, + ;; to ensure we actually bootstrap properly. + (for-each delete-file (find-files "." "^.depend$")) + (delete-file "boot/ocamlc") + (delete-file "boot/ocamllex"))))) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'configure 'copy-bootstrap + (lambda* (#:key inputs #:allow-other-keys) + (let ((camlboot (assoc-ref inputs "camlboot"))) + (copy-file (string-append camlboot "/bin/ocamllex") "boot/ocamllex") + (copy-file (string-append camlboot "/bin/ocamlc") "boot/ocamlc") + (chmod "boot/ocamllex" #o755) + (chmod "boot/ocamlc" #o755)))) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (mandir (string-append out "/share/man"))) + (invoke "./configure" + "--prefix" out + "--mandir" mandir)))) + (replace 'build + (lambda* (#:key parallel-build? #:allow-other-keys) + (define* (make . args) + (apply invoke "make" + (append (if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + args))) + ;; create empty .depend files because they are included by various + ;; Makefiles, and they have no rule to generate them. + (invoke "touch" ".depend" "stdlib/.depend" "byterun/.depend" + "tools/.depend" "lex/.depend" "asmrun/.depend" + "debugger/.depend" "ocamltest/.depend" "ocamldoc/.depend" + "ocamldoc/stdlib_non_prefixed/.depend" + "otherlibs/bigarray/.depend" "otherlibs/graph/.depend" + "otherlibs/raw_spacetime_lib/.depend" "otherlibs/str/.depend" + "otherlibs/systhreads/.depend" "otherlibs/threads/.depend" + "otherlibs/unix/.depend" "otherlibs/win32unix/.depend") + ;; We cannot build ocamldep until we have created all the .depend + ;; files, so replace it with ocamlc -depend. + (substitute* "tools/Makefile" + (("\\$\\(CAMLRUN\\) ./ocamldep") "../boot/ocamlc -depend")) + (substitute* '("otherlibs/graph/Makefile" + "otherlibs/systhreads/Makefile" + "otherlibs/threads/Makefile" + "otherlibs/unix/Makefile") + (("\\$\\(CAMLRUN\\) ../../tools/ocamldep") + "../../boot/ocamlc -depend")) + (substitute* '("otherlibs/bigarray/Makefile" + "otherlibs/raw_spacetime_lib/Makefile" + "otherlibs/str/Makefile" + "otherlibs/win32unix/Makefile") + (("\\$\\(CAMLRUN\\) \\$\\(ROOTDIR\\)/tools/ocamldep") + "../../boot/ocamlc -depend")) + ;; Ensure we copy needed file, so we can generate a proper .depend + (substitute* "ocamldoc/Makefile" + (("include Makefile.unprefix") + "include Makefile.unprefix +depend: $(STDLIB_MLIS) $(STDLIB_DEPS)")) + ;; Generate required tools for `alldepend' + (make "-C" "byterun" "depend") + (make "-C" "byterun" "all") + (copy-file "byterun/ocamlrun" "boot/ocamlrun") + (make "ocamlyacc") + (copy-file "yacc/ocamlyacc" "boot/ocamlyacc") + (make "-C" "stdlib" "sys.ml") + (make "-C" "stdlib" "CAMLDEP=../boot/ocamlc -depend" "depend") + ;; Build and copy files later used by `tools' + (make "-C" "stdlib" "COMPILER=" + "CAMLC=../boot/ocamlc -use-prims ../byterun/primitives" + "all") + (for-each + (lambda (file) + (copy-file file (string-append "boot/" (basename file)))) + (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo" "stdlib/camlheader" + (find-files "stdlib" ".*.cmi$"))) + (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a") + (make "parsing/parser.mli"); required for ocamldoc/stdlib_non_prefixed + ;; required for dependencies + (make "-C" "tools" + "CAMLC=../boot/ocamlc -nostdlib -I ../boot -use-prims ../byterun/primitives -I .." + "make_opcodes" "cvt_emit") + ;; generate all remaining .depend files + (make "alldepend" + (string-append "ocamllex=" (getcwd) "/boot/ocamlrun " + (getcwd) "/boot/ocamllex") + (string-append "CAMLDEP=" (getcwd) "/boot/ocamlc -depend") + (string-append "OCAMLDEP=" (getcwd) "/boot/ocamlc -depend") + (string-append "ocamldep=" (getcwd) "/boot/ocamlc -depend")) + ;; Build ocamllex + (make "CAMLC=boot/ocamlc -nostdlib -I boot -use-prims byterun/primitives" + "ocamlc") + ;; Build ocamlc + (make "-C" "lex" + "CAMLC=../boot/ocamlc -strict-sequence -nostdlib -I ../boot -use-prims ../byterun/primitives" + "all"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (depends (string-append out "/share/depends"))) + (mkdir-p bin) + (mkdir-p depends) + (install-file "ocamlc" bin) + (install-file "lex/ocamllex" bin) + (for-each + (lambda (file) + (let ((dir (string-append depends "/" (dirname file)))) + (mkdir-p dir) + (install-file file dir))) + (find-files "." "^\\.depend$")))))))) + (native-inputs + `(("camlboot" ,camlboot) + ("perl" ,perl) + ("pkg-config" ,pkg-config))))) + +(define-public ocaml-4.07 + (package + (inherit ocaml-4.07-boot) (arguments (substitute-keyword-arguments (package-arguments ocaml-4.09) ((#:phases phases) `(modify-phases ,phases + (add-before 'configure 'copy-bootstrap + (lambda* (#:key inputs #:allow-other-keys) + (let ((ocaml (assoc-ref inputs "ocaml"))) + (copy-file (string-append ocaml "/bin/ocamllex") "boot/ocamllex") + (copy-file (string-append ocaml "/bin/ocamlc") "boot/ocamlc") + (chmod "boot/ocamllex" #o755) + (chmod "boot/ocamlc" #o755) + (let ((rootdir (getcwd))) + (with-directory-excursion (string-append ocaml "/share/depends") + (for-each + (lambda (file) + (copy-file file (string-append rootdir "/" file))) + (find-files "." "."))))))) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -280,7 +422,11 @@ functional, imperative and object-oriented styles of programming.") ;; --prefix= syntax (with equals sign). (invoke "./configure" "--prefix" out - "--mandir" mandir)))))))))) + "--mandir" mandir)))))))) + (native-inputs + `(("ocaml" ,ocaml-4.07-boot) + ("perl" ,perl) + ("pkg-config" ,pkg-config))))) (define-public ocaml ocaml-4.11) -- 2.30.0 --MP_/UwmgCR6s5fLMNBYR7SkI6F1-- From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: pukkamustard Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Feb 2021 09:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.16145039617503 (code B ref 46806); Sun, 28 Feb 2021 09:20:01 +0000 Received: (at 46806) by debbugs.gnu.org; 28 Feb 2021 09:19:21 +0000 Received: from localhost ([127.0.0.1]:45849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGIES-0001wx-Oy for submit@debbugs.gnu.org; Sun, 28 Feb 2021 04:19:21 -0500 Received: from mout01.posteo.de ([185.67.36.65]:47939) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGIEP-0001wh-Qk for 46806@debbugs.gnu.org; Sun, 28 Feb 2021 04:19:19 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 7674E16005F for <46806@debbugs.gnu.org>; Sun, 28 Feb 2021 10:19:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1614503951; bh=JN9rro50X/t9apj3fVlSUPANGFhVAdpOG59pJZe4mC8=; h=From:To:Cc:Subject:Date:From; b=IlmTA9uMhATh9DstsmOdvyEr1c3JYNjvx78gxN3srnveiSB0yUtNde215ZUguI6cH DvxS7+2zpQdAUfHHqrOV3nQRttwlWVnJVBDV8BkHeYCpTX0em5jkb35MnqJ9SYnXp0 dIrA6BeWzO0Nb/w3/xahnRflaaiJV7Jj+Vy5geMl2imNYU2/Zuc+Y1+zUgdEjd+9J+ s+qT2JRpmJrwFFxykhFO80z9kI26w7+7rGQoy+oHSRDe/4Cc9Aqblnd4fX77ROuOLp NshA9fe9sg+CQD2bRWMBGLZl9t6gHAszrU9w8tdqwsPFi+eVLNkcuDWR4ROilWOo5I Jjvr6WFC/6wYQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DpHrt3Kbnz6tmG; Sun, 28 Feb 2021 10:19:10 +0100 (CET) References: <20210227001244.17cc3833@tachikoma.lepiller.eu> User-agent: mu4e 1.4.14; emacs 27.1 From: pukkamustard In-reply-to: <20210227001244.17cc3833@tachikoma.lepiller.eu> Date: Sun, 28 Feb 2021 10:19:09 +0100 Message-ID: <86r1l0ft2q.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Fantastic! Thank you and thanks to the camlboot project! I will try and build this tonight. Julien Lepiller writes: > Hi Guix! > > This small series adds camlboot, a project to reimplement a > bootstrap > for OCaml, which lets us remove the pre-built boot/ocaml{c,lex} > :) > > The first patch builds the bootstraped ocamlc and ocamllex. This > takes > around 4 hours to build. The second patch rebuilds them using > the source > code for ocaml 4.07.1, instead of the modified sources used in > camlboot, and reuse them to run the main Makefile (make > world.opt). > > As a result, we have identical files for this bootstrap and the > unbootstrapped OCaml (up to output store paths and hash of some > files > that get embedded in native files, which differ because of the > different output path). From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Feb 2021 10:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: pukkamustard Cc: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.161450985016131 (code B ref 46806); Sun, 28 Feb 2021 10:58:01 +0000 Received: (at 46806) by debbugs.gnu.org; 28 Feb 2021 10:57:30 +0000 Received: from localhost ([127.0.0.1]:45907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGJlR-0004C7-Uk for submit@debbugs.gnu.org; Sun, 28 Feb 2021 05:57:30 -0500 Received: from lepiller.eu ([89.234.186.109]:58954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGJlP-0004Bw-IJ for 46806@debbugs.gnu.org; Sun, 28 Feb 2021 05:57:28 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id c4da58bf; Sun, 28 Feb 2021 10:57:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date :in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:to:cc:from:message-id; s= dkim; bh=amk4xpdZoe6S1yscINkI3sZhdPseU497akdeVfxp9CE=; b=Q4r5AyP xNooHJUBgHOcde+BpOC1mUaW5H9HeVkPU6BiwuPhdtzbc2nRkjgp/s9VC2xSCe0Q 5G1WpWlGeezfddff9NXs+vl0I/LakEYn9+h1KgUFdsR223jAjnCjK/jBDrn25FW/ GJqq1GziE+ya4byQsyvirdLyvv01Fcv4N1fBNtI+w4FNAgQjzIgxdJUTKNAbOM8y q0a+7015IPayX4StyNt1ICdmySWjBZNaKtq2M3+WDPi9i32h5Xsh7uWw/aCIo78A cuu0qhUWfcRGrznAfY0KBtmvNslRSaxoRCSGnxM5y1E5+hVlATeY8R7RjxYQznbL KIl+fiF5elXP0zQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 19ad4430 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Sun, 28 Feb 2021 10:57:24 +0000 (UTC) Date: Sun, 28 Feb 2021 05:57:10 -0500 User-Agent: K-9 Mail for Android In-Reply-To: <86r1l0ft2q.fsf@posteo.net> References: <20210227001244.17cc3833@tachikoma.lepiller.eu> <86r1l0ft2q.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----TNUJNQZ077YKTCL9UAOUDT8VRZ6AFG" Content-Transfer-Encoding: 7bit From: Julien Lepiller Message-ID: <66443FC4-A5EB-44F2-BCA3-E35962DC2FE0@lepiller.eu> X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ------TNUJNQZ077YKTCL9UAOUDT8VRZ6AFG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Would be fantastic if you could report build time for camlboot too :)=2E Th= e result should be almost identical to our current ocaml-4=2E07, though the= re are some due to different output directory being embedded=2E Le 28 f=C3=A9vrier 2021 04:19:09 GMT-05:00, pukkamustard a =C3=A9crit : > >Fantastic! Thank you and thanks to the camlboot project! I will=20 >try and >build this tonight=2E > >Julien Lepiller writes: > >> Hi Guix! >> >> This small series adds camlboot, a project to reimplement a=20 >> bootstrap >> for OCaml, which lets us remove the pre-built boot/ocaml{c,lex}=20 >> :) >> >> The first patch builds the bootstraped ocamlc and ocamllex=2E This=20 >> takes >> around 4 hours to build=2E The second patch rebuilds them using=20 >> the source >> code for ocaml 4=2E07=2E1, instead of the modified sources used in >> camlboot, and reuse them to run the main Makefile (make=20 >> world=2Eopt)=2E >> >> As a result, we have identical files for this bootstrap and the >> unbootstrapped OCaml (up to output store paths and hash of some=20 >> files >> that get embedded in native files, which differ because of the >> different output path)=2E ------TNUJNQZ077YKTCL9UAOUDT8VRZ6AFG Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Would be fantastic if you could report build time = for camlboot too :)=2E The result should be almost identical to our current= ocaml-4=2E07, though there are some due to different output directory bein= g embedded=2E

Le 28 f=C3=A9vrier 2021 04:= 19:09 GMT-05:00, pukkamustard <pukkamustard@posteo=2Enet> a =C3=A9cri= t :

Fantastic! Thank you and thanks to the camlboot = project! I will
try and
build this tonight=2E

Julien Lepiller= <julien@lepiller=2Eeu> writes:

Hi Guix!

This small series adds camlboot, a pro= ject to reimplement a
bootstrap
for OCaml, which lets us remove th= e pre-built boot/ocaml{c,lex}
:)

The first patch builds the bo= otstraped ocamlc and ocamllex=2E This
takes
around 4 hours to buil= d=2E The second patch rebuilds them using
the source
code for ocam= l 4=2E07=2E1, instead of the modified sources used in
camlboot, and reu= se them to run the main Makefile (make
world=2Eopt)=2E

As a re= sult, we have identical files for this bootstrap and the
unbootstrapped= OCaml (up to output store paths and hash of some
files
that get e= mbedded in native files, which differ because of the
different output p= ath)=2E

------TNUJNQZ077YKTCL9UAOUDT8VRZ6AFG-- From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: pukkamustard Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Mar 2021 09:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.161459018613034 (code B ref 46806); Mon, 01 Mar 2021 09:17:01 +0000 Received: (at 46806) by debbugs.gnu.org; 1 Mar 2021 09:16:26 +0000 Received: from localhost ([127.0.0.1]:48098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGefB-0003O8-GI for submit@debbugs.gnu.org; Mon, 01 Mar 2021 04:16:26 -0500 Received: from mout02.posteo.de ([185.67.36.66]:44983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGef9-0003Nq-DW for 46806@debbugs.gnu.org; Mon, 01 Mar 2021 04:16:24 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id ABC5F2400FC for <46806@debbugs.gnu.org>; Mon, 1 Mar 2021 10:16:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1614590176; bh=Yz8PoYk9s6ZoeJT6CKHtPVgRn7m/mROxcVIvBhx1eZo=; h=From:To:Cc:Subject:Date:From; b=Ifi1KYHWHwRbnUsL6Sy716BINmimId3+s/g/ZAPWjMwRe88Eki/w4RpdnhxiCBbH8 eqmpkfNjIvZK2Sx6Zhjtv4YhekCn9zX43EuAy8hD/cDLk8RZ3uETeVVdqjOFMpUgqA dRN9YwquDJdc78uOrNbKp9+8rORYrLqFTs9QsHfzmQIV+oVfeFPCt4AW6WP4alP0z9 ej+V2LiGQlXAIVrqNHEihXU7eiTKz8TQ2yPH43U50zYo6NuOT/y5C1wuchF5HgIJ+C AReTtNkPGC4CF08TJpfNl7OJpVA+kt3enVp28JAPvJc6+eaS+G3vBWPArB4Bhxa9gZ mX86BidWCl41w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Dpvl34J57z6tmc; Mon, 1 Mar 2021 10:16:15 +0100 (CET) References: <20210227001244.17cc3833@tachikoma.lepiller.eu> <86r1l0ft2q.fsf@posteo.net> <66443FC4-A5EB-44F2-BCA3-E35962DC2FE0@lepiller.eu> User-agent: mu4e 1.4.14; emacs 27.1 From: pukkamustard In-reply-to: <66443FC4-A5EB-44F2-BCA3-E35962DC2FE0@lepiller.eu> Date: Mon, 01 Mar 2021 10:16:14 +0100 Message-ID: <86lfb7fd41.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) I managed to build camlboot and ocaml@4.07 with your patches. > Would be fantastic if you could report build time for camlboot > too :). Build time (on a quad-core i7 laptop): ``` $ time ./pre-inst-env guix build camlboot --no-offload . . . successfully built /gnu/store/ddi5n28hsrgvb89r8vjs0rfvapxfbaj2-camlboot-0.0.0-0.506280c.drv /gnu/store/79bqayhrc6qfr2k7pfk7fn6lim0f8cfx-camlboot-0.0.0-0.506280c real 322m35.119s user 0m1.523s sys 0m0.140s ``` ocaml@4.07 with your patches applied: ``` $ time ./pre-inst-env guix build ocaml@4.07 --no-offload successfully built /gnu/store/sdxybpxzjhib5ijn3fx3r29ycp5vvafd-ocaml-4.07.1.drv /gnu/store/cniid9xi3dck7kdpfm77h56h1s0701fm-ocaml-4.07.1 real 17m52.923s user 0m9.268s sys 0m1.013s ``` ocaml@4.07 at master: ``` $ time ./pre-inst-env guix build ocaml@4.07 --no-offload --check successfully built /gnu/store/v599h0bhpyh2rq4nrnqqf56lwbsf0f71-ocaml-4.07.1.drv successfully built /gnu/store/v599h0bhpyh2rq4nrnqqf56lwbsf0f71-ocaml-4.07.1.drv /gnu/store/s7j0vl88zakkdcyvw1jw8cypfzi6ljnd-ocaml-4.07.1 real 21m44.000s user 0m14.546s sys 0m1.217s ``` > The result should be almost identical to our current ocaml-4.07, > though there are some due to different output directory being > embedded. Checked some random files in both ocaml's with diffoscope and can confirm that differences seem to be mostly different output directories. Haven't run diffoscope on everything as that would take quite some time... -pukkamustard >> >>Fantastic! Thank you and thanks to the camlboot project! I will >>try and >>build this tonight. >> >>Julien Lepiller writes: >> >>> Hi Guix! >>> >>> This small series adds camlboot, a project to reimplement a >>> bootstrap >>> for OCaml, which lets us remove the pre-built >>> boot/ocaml{c,lex} >>> :) >>> >>> The first patch builds the bootstraped ocamlc and ocamllex. >>> This >>> takes >>> around 4 hours to build. The second patch rebuilds them using >>> the source >>> code for ocaml 4.07.1, instead of the modified sources used in >>> camlboot, and reuse them to run the main Makefile (make >>> world.opt). >>> >>> As a result, we have identical files for this bootstrap and >>> the >>> unbootstrapped OCaml (up to output store paths and hash of >>> some >>> files >>> that get embedded in native files, which differ because of the >>> different output path). From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Mar 2021 11:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: pukkamustard Cc: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.16145991083586 (code B ref 46806); Mon, 01 Mar 2021 11:46:01 +0000 Received: (at 46806) by debbugs.gnu.org; 1 Mar 2021 11:45:08 +0000 Received: from localhost ([127.0.0.1]:48273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGgz6-0000vm-Db for submit@debbugs.gnu.org; Mon, 01 Mar 2021 06:45:08 -0500 Received: from lepiller.eu ([89.234.186.109]:59186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGgz4-0000vb-Pw for 46806@debbugs.gnu.org; Mon, 01 Mar 2021 06:45:07 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id c0f4ea86; Mon, 1 Mar 2021 11:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date :in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:to:cc:from:message-id; s= dkim; bh=GtfbaYvtO8HRcGPHJijnpdh3Z5ZUl23FvsZqMnRzlq0=; b=T6lGYsh D3LZLWCXlPPcthe8q2GiqJoG1uiIAn32s5L11oJd1Y1tYoB+IAJcAl+keWYnyDuv nn9EtUWWMifzQGZ0jMTn/dr1eUMfyoxlZlMyN/ZqINUSapb9sD9I52JRcvLWNxHp gAH8HRAIdA1ITPES3lolwGmDxPdRhqukDvueMonoHgDWSt/2N/IqHscVcojrPhsS j9ENTHY/85dP16G+sn4MZMVnwZZKIxP0Jh2Lu05bkk0o1qS9b8Y1SsC6im+q81g/ BU6lMRXW2oh7QEZjfF5TNwbZfOkLcanRpYBzh1paeo2L6Kk6DX8JSlIXhGqyYlkv 3Wd83YrDDuZ3BiA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 937a723f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 1 Mar 2021 11:45:03 +0000 (UTC) Date: Mon, 01 Mar 2021 06:44:32 -0500 User-Agent: K-9 Mail for Android In-Reply-To: <86lfb7fd41.fsf@posteo.net> References: <20210227001244.17cc3833@tachikoma.lepiller.eu> <86r1l0ft2q.fsf@posteo.net> <66443FC4-A5EB-44F2-BCA3-E35962DC2FE0@lepiller.eu> <86lfb7fd41.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----84AVDYUG4SYSZ76XWNS5GGUVHMFQHW" Content-Transfer-Encoding: 7bit From: Julien Lepiller Message-ID: X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ------84AVDYUG4SYSZ76XWNS5GGUVHMFQHW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thanks! OK to push? Le 1 mars 2021 04:16:14 GMT-05:00, pukkamustard a =C3=A9crit : > >I managed to build camlboot and ocaml@4=2E07 with your patches=2E > >> Would be fantastic if you could report build time for camlboot=20 >> too :)=2E > >Build time (on a quad-core i7 laptop): > >``` >$ time =2E/pre-inst-env guix build camlboot --no-offload >=2E >=2E >=2E >successfully built=20 >/gnu/store/ddi5n28hsrgvb89r8vjs0rfvapxfbaj2-camlboot-0=2E0=2E0-0=2E506280= c=2Edrv >/gnu/store/79bqayhrc6qfr2k7pfk7fn6lim0f8cfx-camlboot-0=2E0=2E0-0=2E506280= c > >real 322m35=2E119s >user 0m1=2E523s >sys 0m0=2E140s >``` > >ocaml@4=2E07 with your patches applied: > >``` >$ time =2E/pre-inst-env guix build ocaml@4=2E07 --no-offload >successfully built=20 >/gnu/store/sdxybpxzjhib5ijn3fx3r29ycp5vvafd-ocaml-4=2E07=2E1=2Edrv >/gnu/store/cniid9xi3dck7kdpfm77h56h1s0701fm-ocaml-4=2E07=2E1 > >real 17m52=2E923s >user 0m9=2E268s >sys 0m1=2E013s >``` > >ocaml@4=2E07 at master: > >``` >$ time =2E/pre-inst-env guix build ocaml@4=2E07 --no-offload --check >successfully built=20 >/gnu/store/v599h0bhpyh2rq4nrnqqf56lwbsf0f71-ocaml-4=2E07=2E1=2Edrv >successfully built=20 >/gnu/store/v599h0bhpyh2rq4nrnqqf56lwbsf0f71-ocaml-4=2E07=2E1=2Edrv >/gnu/store/s7j0vl88zakkdcyvw1jw8cypfzi6ljnd-ocaml-4=2E07=2E1 > >real 21m44=2E000s >user 0m14=2E546s >sys 0m1=2E217s >``` > >> The result should be almost identical to our current ocaml-4=2E07,=20 >> though there are some due to different output directory being=20 >> embedded=2E > >Checked some random files in both ocaml's with diffoscope and can=20 >confirm that differences seem to be mostly different output=20 >directories=2E > >Haven't run diffoscope on everything as that would take quite some=20 >time=2E=2E=2E > >-pukkamustard > > >>> >>>Fantastic! Thank you and thanks to the camlboot project! I will >>>try and >>>build this tonight=2E >>> >>>Julien Lepiller writes: >>> >>>> Hi Guix! >>>> >>>> This small series adds camlboot, a project to reimplement a >>>> bootstrap >>>> for OCaml, which lets us remove the pre-built=20 >>>> boot/ocaml{c,lex} >>>> :) >>>> >>>> The first patch builds the bootstraped ocamlc and ocamllex=2E=20 >>>> This >>>> takes >>>> around 4 hours to build=2E The second patch rebuilds them using >>>> the source >>>> code for ocaml 4=2E07=2E1, instead of the modified sources used in >>>> camlboot, and reuse them to run the main Makefile (make >>>> world=2Eopt)=2E >>>> >>>> As a result, we have identical files for this bootstrap and=20 >>>> the >>>> unbootstrapped OCaml (up to output store paths and hash of=20 >>>> some >>>> files >>>> that get embedded in native files, which differ because of the >>>> different output path)=2E ------84AVDYUG4SYSZ76XWNS5GGUVHMFQHW Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thanks! OK to push?

Le 1 mars 2021 04:16:14 GMT-05:00, pukkamustard <pukkamustard@posteo= =2Enet> a =C3=A9crit :

I managed to build camlboot and ocaml@4=2E07 wit= h your patches=2E

W= ould be fantastic if you could report build time for camlboot
too :)=2E=

Build time (on a quad-core i7 laptop):

```
$= time =2E/pre-inst-env guix build camlboot --no-offload
=2E
=2E
= =2E
successfully built
/gnu/store/ddi5n28hsrgvb89r8vjs0rfvapxfbaj2-c= amlboot-0=2E0=2E0-0=2E506280c=2Edrv
/gnu/store/79bqayhrc6qfr2k7pfk7fn6li= m0f8cfx-camlboot-0=2E0=2E0-0=2E506280c

real 322m35=2E119s
user 0m= 1=2E523s
sys 0m0=2E140s
```

ocaml@4=2E07 with your patches app= lied:

```
$ time =2E/pre-inst-env guix build ocaml@4=2E07 --no-of= fload
successfully built
/gnu/store/sdxybpxzjhib5ijn3fx3r29ycp5vvafd= -ocaml-4=2E07=2E1=2Edrv
/gnu/store/cniid9xi3dck7kdpfm77h56h1s0701fm-ocam= l-4=2E07=2E1

real 17m52=2E923s
user 0m9=2E268s
sys 0m1=2E013s<= br>```

ocaml@4=2E07 at master:

```
$ time =2E/pre-inst-env= guix build ocaml@4=2E07 --no-offload --check
successfully built
/gn= u/store/v599h0bhpyh2rq4nrnqqf56lwbsf0f71-ocaml-4=2E07=2E1=2Edrv
successf= ully built
/gnu/store/v599h0bhpyh2rq4nrnqqf56lwbsf0f71-ocaml-4=2E07=2E1= =2Edrv
/gnu/store/s7j0vl88zakkdcyvw1jw8cypfzi6ljnd-ocaml-4=2E07=2E1
<= br>real 21m44=2E000s
user 0m14=2E546s
sys 0m1=2E217s
```

The result should be almost = identical to our current ocaml-4=2E07,
though there are some due to dif= ferent output directory being
embedded=2E

Checked s= ome random files in both ocaml's with diffoscope and can
confirm that d= ifferences seem to be mostly different output
directories=2E

Hav= en't run diffoscope on everything as that would take quite some
time=2E= =2E=2E

-pukkamustard



Fantastic= ! Thank you and thanks to the camlboot project! I will
try and
build = this tonight=2E

Julien Lepiller <julien@lepiller=2Eeu> writes:=

Hi Guix!

= This small series adds camlboot, a project to reimplement a
bootstrap for OCaml, which lets us remove the pre-built
boot/ocaml{c,lex}
= :)

The first patch builds the bootstraped ocamlc and ocamllex=2E <= br> This
takes
around 4 hours to build=2E The second patch rebuilds= them using
the source
code for ocaml 4=2E07=2E1, instead of the mo= dified sources used in
camlboot, and reuse them to run the main Makefil= e (make
world=2Eopt)=2E

As a result, we have identical files fo= r this bootstrap and
the
unbootstrapped OCaml (up to output store = paths and hash of
some
files
that get embedded in native files= , which differ because of the
different output path)=2E

------84AVDYUG4SYSZ76XWNS5GGUVHMFQHW-- From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: pukkamustard Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Mar 2021 12:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.16146002645456 (code B ref 46806); Mon, 01 Mar 2021 12:05:01 +0000 Received: (at 46806) by debbugs.gnu.org; 1 Mar 2021 12:04:24 +0000 Received: from localhost ([127.0.0.1]:48296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGhHj-0001Pw-RK for submit@debbugs.gnu.org; Mon, 01 Mar 2021 07:04:24 -0500 Received: from mout02.posteo.de ([185.67.36.66]:41635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGhHg-0001Pe-Je for 46806@debbugs.gnu.org; Mon, 01 Mar 2021 07:04:22 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 19A5A240100 for <46806@debbugs.gnu.org>; Mon, 1 Mar 2021 13:04:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1614600254; bh=llFiTkkEA9gSAtL9wL9FvR115QAVtbUDj94his5ygh0=; h=From:To:Cc:Subject:Date:From; b=QhTu9z5po5nGUoqVRaB3XQsDP9aRgyxBci35OLPSItp6rp2XSFh4Z5i/VxseL8lYx CInsZKPpR2CY78sEnzVxqCDbZTMPjWks33L9mM7sjXBsFI2czNseb5KpIdiW4idH3I KYDLv3spfqvfvFO5I7eawGPmE17zMAMDPJC0P3QzieO42QwHnDApscPnveIHdi8jVZ GmbxJW72sjN43RJhtf5jXWBMRWO4nxL1AFQoLM6sEiswWZdAggqalzLTlhOqk1hUD6 LlC9XFBBLsbMNrJKSsU/uYsCKudn1u+O0Z3ynxY90FMdaUVMWmTd1VoFebqEbYxPBx R8m3xRXGyBEfg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DpzSr5Tj6z6tmc; Mon, 1 Mar 2021 13:04:12 +0100 (CET) References: <20210227001244.17cc3833@tachikoma.lepiller.eu> <86r1l0ft2q.fsf@posteo.net> <66443FC4-A5EB-44F2-BCA3-E35962DC2FE0@lepiller.eu> <86lfb7fd41.fsf@posteo.net> User-agent: mu4e 1.4.14; emacs 27.1 From: pukkamustard In-reply-to: Date: Mon, 01 Mar 2021 13:04:11 +0100 Message-ID: <86o8g39j2c.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Thanks! OK to push? Ok for me! > Le 1 mars 2021 04:16:14 GMT-05:00, pukkamustard=20 > a =C3=A9crit : >> >>I managed to build camlboot and ocaml@4.07 with your patches. >> >>> Would be fantastic if you could report build time for camlboot >>> too :). >> >>Build time (on a quad-core i7 laptop): >> >>``` >>$ time ./pre-inst-env guix build camlboot --no-offload >>. >>. >>. >>successfully built >>/gnu/store/ddi5n28hsrgvb89r8vjs0rfvapxfbaj2-camlboot-0.0.0-0.506280c.drv >>/gnu/store/79bqayhrc6qfr2k7pfk7fn6lim0f8cfx-camlboot-0.0.0-0.506280c >> >>real 322m35.119s >>user 0m1.523s >>sys 0m0.140s >>``` >> >>ocaml@4.07 with your patches applied: >> >>``` >>$ time ./pre-inst-env guix build ocaml@4.07 --no-offload >>successfully built >>/gnu/store/sdxybpxzjhib5ijn3fx3r29ycp5vvafd-ocaml-4.07.1.drv >>/gnu/store/cniid9xi3dck7kdpfm77h56h1s0701fm-ocaml-4.07.1 >> >>real 17m52.923s >>user 0m9.268s >>sys 0m1.013s >>``` >> >>ocaml@4.07 at master: >> >>``` >>$ time ./pre-inst-env guix build ocaml@4.07 --no-offload --check >>successfully built >>/gnu/store/v599h0bhpyh2rq4nrnqqf56lwbsf0f71-ocaml-4.07.1.drv >>successfully built >>/gnu/store/v599h0bhpyh2rq4nrnqqf56lwbsf0f71-ocaml-4.07.1.drv >>/gnu/store/s7j0vl88zakkdcyvw1jw8cypfzi6ljnd-ocaml-4.07.1 >> >>real 21m44.000s >>user 0m14.546s >>sys 0m1.217s >>``` >> >>> The result should be almost identical to our current=20 >>> ocaml-4.07, >>> though there are some due to different output directory being >>> embedded. >> >>Checked some random files in both ocaml's with diffoscope and=20 >>can >>confirm that differences seem to be mostly different output >>directories. >> >>Haven't run diffoscope on everything as that would take quite=20 >>some >>time... >> >>-pukkamustard >> >> >>>> >>>>Fantastic! Thank you and thanks to the camlboot project! I=20 >>>>will >>>>try and >>>>build this tonight. >>>> >>>>Julien Lepiller writes: >>>> >>>>> Hi Guix! >>>>> >>>>> This small series adds camlboot, a project to reimplement a >>>>> bootstrap >>>>> for OCaml, which lets us remove the pre-built >>>>> boot/ocaml{c,lex} >>>>> :) >>>>> >>>>> The first patch builds the bootstraped ocamlc and ocamllex. >>>>> This >>>>> takes >>>>> around 4 hours to build. The second patch rebuilds them=20 >>>>> using >>>>> the source >>>>> code for ocaml 4.07.1, instead of the modified sources used=20 >>>>> in >>>>> camlboot, and reuse them to run the main Makefile (make >>>>> world.opt). >>>>> >>>>> As a result, we have identical files for this bootstrap and >>>>> the >>>>> unbootstrapped OCaml (up to output store paths and hash of >>>>> some >>>>> files >>>>> that get embedded in native files, which differ because of=20 >>>>> the >>>>> different output path). From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Mar 2021 00:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.161473152515168 (code B ref 46806); Wed, 03 Mar 2021 00:33:02 +0000 Received: (at 46806) by debbugs.gnu.org; 3 Mar 2021 00:32:05 +0000 Received: from localhost ([127.0.0.1]:54558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHFQr-0003wP-6Q for submit@debbugs.gnu.org; Tue, 02 Mar 2021 19:32:05 -0500 Received: from mail-wm1-f44.google.com ([209.85.128.44]:35979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHFQo-0003un-8Z for 46806@debbugs.gnu.org; Tue, 02 Mar 2021 19:32:03 -0500 Received: by mail-wm1-f44.google.com with SMTP id k66so4484054wmf.1 for <46806@debbugs.gnu.org>; Tue, 02 Mar 2021 16:32:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4UFJ+SuZZKnQ9C2zXYy+GO/5rpy3MThWqqlKZBCY8Ss=; b=gwG0S6dC8DKUoR+FUgdvQ0eNh3FxBgKQj9XN5X6BnOS93jxKC3EPO2SMYPN6oqKgAv ZzganhDvaFR2k6+9Ye8Au5/ZjDB75luyuyR6WEUDt3ZeclYALEJJ5vshiWrE2ejqkCT4 4chxuhb1q6dTpqT+Gtw69H33gV619Pu9hTl2I1xAWeyervFFWUThBWvtYVQK13/sQIEV tnT5CLwWgrIVSZx/0lUJoMpiwpH9eR7SNIETpfSqyeRXQkbf4qgu+M3YiUP1wHtVsNgw LMBNf6MbKKF7sK0vlBwvXL81nYGT3QafJ4/MdMM3ET8IGv2gD0Eu75mhDoInATGuYxle 8GZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=4UFJ+SuZZKnQ9C2zXYy+GO/5rpy3MThWqqlKZBCY8Ss=; b=ipgEzooxhmcFO3BGdqbtmlK989q0wBtOP9NhfArzE5uQbcV75QDXHabCkaqFg6gu1N Ck2LgoD4kvKQAXWcObRpzoDt1oNKR+c9L0ZnZbla5iikWaTrjVMBf8/lAjiLw1w+NZbl rNpWPgtxzo5zk7lH7MIyZc9jqD3/XDKQP2L2U2aYYV4lODbl+wY1sBPt2gVaodyBhEhO O6LACPSHF/bhyTI4prPS+gnZGjiO4hLigbjV/vhAbSLePvbU5+yYigFUIIvFWge15HT8 Wbn9vpeTZ/qtvk6+hEkEyiPxMrwtUV7pJnfAHSom4uHIfrxiLFW5RPqeBo4eK23qgKMb AOrQ== X-Gm-Message-State: AOAM532j7IiUCZgS3p3k2LjDDku+Ig3seXRF8MKamkATTUwKAnOGBZXm tXHekHTuijepi7XKP5HGXntrOpGVFz4= X-Google-Smtp-Source: ABdhPJwe4FpR1sm8zh+577CC8lJiQXZhDeLCiIolMbnOmPyRFAVBqhYolTatgsOjsR/MgbrpC5WuOQ== X-Received: by 2002:a1c:f212:: with SMTP id s18mr6453560wmc.133.1614731516311; Tue, 02 Mar 2021 16:31:56 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id o14sm28310602wri.48.2021.03.02.16.31.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 16:31:55 -0800 (PST) From: zimoun References: <20210227001244.17cc3833@tachikoma.lepiller.eu> <20210228030905.78ccf557@tachikoma.lepiller.eu> <20210228032933.6f84c90a@tachikoma.lepiller.eu> Date: Wed, 03 Mar 2021 01:22:20 +0100 In-Reply-To: <20210228032933.6f84c90a@tachikoma.lepiller.eu> (Julien Lepiller's message of "Sun, 28 Feb 2021 03:29:33 +0100") Message-ID: <86wnuprsqr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Julien, On Sun, 28 Feb 2021 at 03:29, Julien Lepiller wrote: > Of course I forgot to attach the patches ^^' Awesome! > +(define-public camlboot > + (let ((commit "506280c6e0813e0e794988151a8e46be55373ebc") > + (revision "0")) > + (package > + (name "camlboot") > + (version (git-version "0.0.0" revision commit)) > + (source (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/Ekdohibs/camlboot") > + (commit commit) > + (recursive? #t))) Is the indentation right? Below with my config (which could be wrong). [...] > + (synopsis "OCaml bootstrap") I have no opinion but elsewhere it also appears =C2=ABBootstrap XXX=C2=BB. > + (description "OCaml is written in OCaml. Its sources contain a pre= -compiled > +bytecode version of ocamlc and ocamllex that are used to build the > next version Maybe @code{ocamlc} and @code{ocamlex} > +of the compiler. Camlboot implements a bootstrap for the OCaml > compiler and Missing double space after compiler. Camlboot=E2=80=A6 > +provides a bootstrapped equivalent to these files. > + > +It contains a compiler for a small subset of OCaml written in Guile Sche= me, > +an interpreter for OCaml written in that subset and a manually-written l= exer > +for OCaml. These elements eliminate the need for the binary bootstrap in > +OCaml and can effectively bootstrap OCaml 4.07. > + > +This package produces a native ocamlc and a bytecode ocamllex.") Maybe again @code. LGTM! Thanks again! Cheers, simon --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=indentation.diff Content-Description: indentation.diff diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index f2185aeb4e..b8b2f684df 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -115,9 +115,9 @@ (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/Ekdohibs/camlboot") - (commit commit) - (recursive? #t))) + (url "https://github.com/Ekdohibs/camlboot") + (commit commit) + (recursive? #t))) (file-name (git-file-name name version)) (sha256 (base32 @@ -132,13 +132,13 @@ (delete-file "ocaml-src/boot/ocamllex") ;; Ensure writable (for-each - (lambda (file) - (chmod file (logior (stat:mode (stat file)) #o200))) - (find-files "." ".")))))) + (lambda (file) + (chmod file (logior (stat:mode (stat file)) #o200))) + (find-files "." ".")))))) (build-system gnu-build-system) (arguments - `(#:make-flags (list "_boot/ocamlc"); build target - #:tests? #f; no tests + `(#:make-flags (list "_boot/ocamlc") ; build target + #:tests? #f ; no tests #:phases (modify-phases %standard-phases (delete 'configure) --=-=-=-- From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Mar 2021 13:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.16147782227361 (code B ref 46806); Wed, 03 Mar 2021 13:31:02 +0000 Received: (at 46806) by debbugs.gnu.org; 3 Mar 2021 13:30:22 +0000 Received: from localhost ([127.0.0.1]:55385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHRa1-0001uZ-Jg for submit@debbugs.gnu.org; Wed, 03 Mar 2021 08:30:21 -0500 Received: from mail-wr1-f54.google.com ([209.85.221.54]:35358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHRZt-0001tN-Gm for 46806@debbugs.gnu.org; Wed, 03 Mar 2021 08:30:13 -0500 Received: by mail-wr1-f54.google.com with SMTP id l12so23689145wry.2 for <46806@debbugs.gnu.org>; Wed, 03 Mar 2021 05:30:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=/crVOZ7pD8MHymv3cSwKLkB1+h7u0rB+Wcj0MJKFLZ8=; b=m1TpX48u3/beo+82P5EAPn/fzJ/oRQbLwdXLASur/EsicSiDZPBzxnlkG8q4VLY7gg UEey2vof7rwaUI6wU6wzu+noohtd4VVJ8A6Unluz87Ik+w/WiinUtbq9QonlNf1d92P3 /hCRwcIRCe2ifqZ+GVUoK1gFEqQI7lk7t/H+6l3Im5cfN82kCXnb7kJTQmkeK1arGBh7 R4stl4g96zDwwopUsxBWeBSZ56/vRFiZgssvcaq4wbj4ivZ0MAkJWYCON6gCWw3ww4Gy tVK2rxI9copYDz29ugLrRvsZcgprPSPjLQYnIQluMgwLK0Q/gEAPPFHrwbjLyc8GYAug dqyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=/crVOZ7pD8MHymv3cSwKLkB1+h7u0rB+Wcj0MJKFLZ8=; b=bGodT/lbKepki3V6rjPDKGNv4d5Pw7JYo4iRD1NdU8RH+H2mYKm7LCv9sC/YmebqAr 8mzpNXGsb6LqlqZBN1SxLy7dlm1/FMf1sNgndVDc32toHn8Wxw94JgjVv2BDteTvmbVx SchCwNKJXELMl1hq5riktpREubzjrK87IFf1A67u4kNw6vCtmXNjU48sanw1APqu8jbC pqyMZl9NTU5otZnGoQ5kUM9QvJlQk8A29XC4Oi3K7f5YYwgmkbExFvioGySf412s1wJo 3RxmvLvAyeH1I5WuLY/5BK8AmGBvjDJXuxFmp8TK591U5QgyS/x1rUvWzZQbYgHTdNv/ Nsmw== X-Gm-Message-State: AOAM533bNDHGilXCpIyQcVboL3/cBkljduwicfltiU1T0A6l8VekEBVp JGH17AfdsBkwHVwfzlmD10K+njyOI24= X-Google-Smtp-Source: ABdhPJwCMsUZkYRNajUqyi5XZ/oQp71XLawosXMo/+yh+pwRLbGOy2C658naTCJ8+buTQ1Flijimqg== X-Received: by 2002:adf:f587:: with SMTP id f7mr15984774wro.147.1614778207935; Wed, 03 Mar 2021 05:30:07 -0800 (PST) Received: from pfiuh02 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id a21sm7684412wmb.5.2021.03.03.05.30.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 05:30:07 -0800 (PST) From: zimoun References: <20210227001244.17cc3833@tachikoma.lepiller.eu> <20210228030905.78ccf557@tachikoma.lepiller.eu> <20210228032933.6f84c90a@tachikoma.lepiller.eu> Date: Wed, 03 Mar 2021 13:54:39 +0100 In-Reply-To: <20210228032933.6f84c90a@tachikoma.lepiller.eu> (Julien Lepiller's message of "Sun, 28 Feb 2021 03:29:33 +0100") Message-ID: <87im68cs8g.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Julien, >>>From ed2c4c1c221eb60ddc9e47b58c03d9194c6a2beb Mon Sep 17 00:00:00 2001 > From: Julien Lepiller > Date: Sat, 27 Feb 2021 00:07:30 +0100 > Subject: [PATCH 2/2] gnu: ocaml-4.07: Bootstrap. > > * gnu/packages/ocaml.scm (ocaml-4.07): Implement bootstrap via camlboot. > --- [...] > -(define-public ocaml-4.07 > +;; This package is a bootstrap package for ocaml-4.07. It builds from camlboot, > +;; using the upstream sources for ocaml 4.07. It installs a bytecode ocamllex > +;; and ocamlc, the bytecode interpreter ocamlrun, and generated .depend files > +;; that we otherwise remove for bootstrap purposes. > +(define ocaml-4.07-boot > (package > (inherit ocaml-4.09) > (version "4.07.1") > @@ -267,11 +271,149 @@ functional, imperative and object-oriented styles of programming.") > "/ocaml-" version ".tar.xz")) [...] > + (for-each > + (lambda (file) With my config (with could be wrong), it spots out an indentation issue here. > + (copy-file file (string-append "boot/" (basename file)))) > + (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo" "stdlib/camlheader" > + (find-files "stdlib" ".*.cmi$"))) > + (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a") > + (make "parsing/parser.mli"); required for ocamldoc/stdlib_non_prefixed It seems better to have extra space between the closing parenthesis and the semi colon. > + ;; required for dependencies > + (make "-C" "tools" > + "CAMLC=../boot/ocamlc -nostdlib -I ../boot -use-prims ../byterun/primitives -I .." > + "make_opcodes" "cvt_emit") > + ;; generate all remaining .depend files > + (make "alldepend" > + (string-append "ocamllex=" (getcwd) "/boot/ocamlrun " > + (getcwd) "/boot/ocamllex") > + (string-append "CAMLDEP=" (getcwd) "/boot/ocamlc -depend") > + (string-append "OCAMLDEP=" (getcwd) "/boot/ocamlc -depend") > + (string-append "ocamldep=" (getcwd) "/boot/ocamlc -depend")) Indentation issue? > + ;; Build ocamllex > + (make "CAMLC=boot/ocamlc -nostdlib -I boot -use-prims byterun/primitives" > + "ocamlc") Here too? > + ;; Build ocamlc > + (make "-C" "lex" > + "CAMLC=../boot/ocamlc -strict-sequence -nostdlib -I ../boot -use-prims ../byterun/primitives" > + "all"))) > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (bin (string-append out "/bin")) > + (depends (string-append out "/share/depends"))) > + (mkdir-p bin) > + (mkdir-p depends) > + (install-file "ocamlc" bin) > + (install-file "lex/ocamllex" bin) > + (for-each > + (lambda (file) > + (let ((dir (string-append depends "/" (dirname file)))) > + (mkdir-p dir) > + (install-file file dir))) > + (find-files "." "^\\.depend$")))))))) Maybe here too? Cheers, simon From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Mar 2021 13:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.16147782227369 (code B ref 46806); Wed, 03 Mar 2021 13:31:02 +0000 Received: (at 46806) by debbugs.gnu.org; 3 Mar 2021 13:30:22 +0000 Received: from localhost ([127.0.0.1]:55387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHRa1-0001ug-Ti for submit@debbugs.gnu.org; Wed, 03 Mar 2021 08:30:22 -0500 Received: from mail-wm1-f47.google.com ([209.85.128.47]:55757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHRZu-0001tW-Bn for 46806@debbugs.gnu.org; Wed, 03 Mar 2021 08:30:14 -0500 Received: by mail-wm1-f47.google.com with SMTP id w7so5173757wmb.5 for <46806@debbugs.gnu.org>; Wed, 03 Mar 2021 05:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=nPjqYfD2u8bFdWUONUWsz+pCMEDDktS6w2be9xK9hIk=; b=hrxv1Bw56IWK4FaU/o2Q2RF+nv20QTu3RVWpiSZhypwbZ0H4d1rqL+6diJ2GvugF0v FJrg9RiHmFGL3CPImDtqhF9okquTw1je8E3TSWzXrDH4rX2GoYyySHOuQJOzgOT9yow5 jg1qzpN0ehCMlcSY6PlZICMRzqNKaI4yYn+cOEv9jEPNDCNBW4q/aMBoZb28AGFlUF83 SVdJ2yR7WrbqjrCR2IWNeg091fKyL5z2gn5MTSa7McNjwyBeQI9scMszkJBBf2TREwrS qoZGdbLtjGK8mWiX7EnxWVshGqOPykWvpeHFvslu4QEw0vr5uVVE2WOAFzg6BgnewCXj 2TNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=nPjqYfD2u8bFdWUONUWsz+pCMEDDktS6w2be9xK9hIk=; b=CQGv9VmiUtAEF95gvTvQiU9vm4w3BA2++lcoKYotyi35fHnoV6DCM9wPdTNJqcV+sN piOM7AHyl/hP7K+KLjKgdDRdXKSxMV2Mu7niYr57FQ527jF0CA6aB1tj10Tk1TEVxYyZ c2urxN7ZP8pa1QcBihAz+3EGhvOdA98SK2jgIFiYS831T03+dqClS6rLrrHcDcCIL7sw tuLzqMQbC8MUX0hxGmHx9PVZeU4EaPiwRzOoKarkc8NFlJARjo2Nd+vVBDwP5vi/+PMf 1NxPvHd68lXMOM6XWyO8LAaaj3kCZHTWUoP3fkitXP3Ra7bQabX3q7SRJ8jge9QUmKm5 K6JQ== X-Gm-Message-State: AOAM531buRb5EKodtGIj7xUOzSMgx7Wzy/YLOOvu01sqcP9+YK2S7kRy GgKrr69YHTjhlMfM/uiFR9G+6+LHYJo= X-Google-Smtp-Source: ABdhPJx+DzxoFV14FOtInCp2IG6nJsMqUu3e6dtokYZkD8NNzfjHaDOcNszAh/kjJHPCu7H7Hr3fKA== X-Received: by 2002:a7b:c2aa:: with SMTP id c10mr9092988wmk.101.1614778208783; Wed, 03 Mar 2021 05:30:08 -0800 (PST) Received: from pfiuh02 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id k4sm41899127wrd.9.2021.03.03.05.30.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 05:30:08 -0800 (PST) From: zimoun References: <20210227001244.17cc3833@tachikoma.lepiller.eu> Date: Wed, 03 Mar 2021 14:27:54 +0100 In-Reply-To: <20210227001244.17cc3833@tachikoma.lepiller.eu> (Julien Lepiller's message of "Sat, 27 Feb 2021 00:13:39 +0100") Message-ID: <87eegwcqp1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Julien, On Sat, 27 Feb 2021 at 00:13, Julien Lepiller wrote: > The first patch builds the bootstraped ocamlc and ocamllex. This takes > around 4 hours to build. The second patch rebuilds them using the source > code for ocaml 4.07.1, instead of the modified sources used in > camlboot, and reuse them to run the main Makefile (make world.opt). On my machine, camlboot takes ~3h to build. Then ocaml-4.07-boot takes ~30s. Last there is no meaningful difference between building ocaml-4.07 using the embedded ocamlc and ocamlex binaries and using the binaries from ocaml-4.04-boot; both ~6m. I have check that camlboot, ocaml-4.07-boot and ocaml-4.07 build reproducibly with =E2=80=99--check=E2=80=99. They do. > As a result, we have identical files for this bootstrap and the > unbootstrapped OCaml (up to output store paths and hash of some files > that get embedded in native files, which differ because of the > different output path). At first look, yes. :-) Modulo the minor comments I made, patches LGTM! Thanks. Well, the next steps are to build ocaml-4.09 and ocaml-4.11 using the previous ocamlc and ocamlex version, right? Then, it implies rebuild all the OCaml packages, right? It could be done in this core-updates cycle, WDYT? Cheers, simon From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Mar 2021 13:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.161477918513661 (code B ref 46806); Wed, 03 Mar 2021 13:47:02 +0000 Received: (at 46806) by debbugs.gnu.org; 3 Mar 2021 13:46:25 +0000 Received: from localhost ([127.0.0.1]:55414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHRpY-0003Xs-TV for submit@debbugs.gnu.org; Wed, 03 Mar 2021 08:46:25 -0500 Received: from lepiller.eu ([89.234.186.109]:59406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHRpX-0003V8-FP for 46806@debbugs.gnu.org; Wed, 03 Mar 2021 08:46:24 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 586fdda9; Wed, 3 Mar 2021 13:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date :in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:to:cc:from:message-id; s= dkim; bh=mqAfXUyJbdweiM2dGoWC2795CAqCti39oTrRu1cCfUc=; b=JAMJUHe 28y41WwLy+T7HF3Rn4C4O5P8J7Jhk1zySmQ3pv8pG9NXHYkCwCdcp0pT+ngFBJBy YlYTbP/Kh/3cbp+DtfhaGEXOZL844sgMkhpOhDlKFK3GT54frc2GzXNxDsW970vf KbroMnKqkZCfUdgZ3F+qRCqmfBZa3rlKfGDkbzXKH5E/q8Mj31ajW70RBsChi1ir IgBIz4jTSDBt1SobmSi9c89GZGAy18MUmqOtcTNAXj1gouCQJaFplxlKQf23K4/8 6kVn1h0OLWS3dAUPojURMbD7TR0/tACq9q0cw0owbdm4mR7rWlA3oEjreeZlTi7k nNf/uTD1RpdPVOA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 66abcb9d (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Wed, 3 Mar 2021 13:46:20 +0000 (UTC) Date: Wed, 03 Mar 2021 08:46:08 -0500 User-Agent: K-9 Mail for Android In-Reply-To: <87eegwcqp1.fsf@gmail.com> References: <20210227001244.17cc3833@tachikoma.lepiller.eu> <87eegwcqp1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----FRVS9S3A2CU4N0CBB9RQRWHSR4NIE6" Content-Transfer-Encoding: 7bit From: Julien Lepiller Message-ID: <5366012A-8041-4277-B6B4-C6709EB2787B@lepiller.eu> X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ------FRVS9S3A2CU4N0CBB9RQRWHSR4NIE6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable We'd have to check we actually can build them=2E The plan was to build menh= ir with this ocaml4=2E07, since it's required to generate the parser for oc= aml >=3D 4=2E08, and improve camlboot to support more recent versions=2E We= would prevent the need for a chain of bootstraps that way=2E Anyway, I'll push that after fixing your comments, and we'll see what we c= an do for the following ocaml versions=2E Thanks for the review! I don't think ocaml has so many dependants that it requires core-updates= =2E Not even sure it needs staging=2E Le 3 mars 2021 08:27:54 GMT-05:00, zimoun a= =C3=A9crit : >Hi Julien, > >On Sat, 27 Feb 2021 at 00:13, Julien Lepiller >wrote: > >> The first patch builds the bootstraped ocamlc and ocamllex=2E This >takes >> around 4 hours to build=2E The second patch rebuilds them using the >source >> code for ocaml 4=2E07=2E1, instead of the modified sources used in >> camlboot, and reuse them to run the main Makefile (make world=2Eopt)=2E > >On my machine, camlboot takes ~3h to build=2E Then ocaml-4=2E07-boot tak= es >~30s=2E Last there is no meaningful difference between building >ocaml-4=2E07 using the embedded ocamlc and ocamlex binaries and using the >binaries from ocaml-4=2E04-boot; both ~6m=2E > >I have check that camlboot, ocaml-4=2E07-boot and ocaml-4=2E07 build >reproducibly with =E2=80=99--check=E2=80=99=2E They do=2E > > >> As a result, we have identical files for this bootstrap and the >> unbootstrapped OCaml (up to output store paths and hash of some files >> that get embedded in native files, which differ because of the >> different output path)=2E > >At first look, yes=2E :-) > > >Modulo the minor comments I made, patches LGTM! Thanks=2E > > >Well, the next steps are to build ocaml-4=2E09 and ocaml-4=2E11 using the >previous ocamlc and ocamlex version, right? > >Then, it implies rebuild all the OCaml packages, right? It could be >done in this core-updates cycle, WDYT? > >Cheers, >simon ------FRVS9S3A2CU4N0CBB9RQRWHSR4NIE6 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable We'd have to check we actually can build them=2E T= he plan was to build menhir with this ocaml4=2E07, since it's required to g= enerate the parser for ocaml >=3D 4=2E08, and improve camlboot to suppor= t more recent versions=2E We would prevent the need for a chain of bootstra= ps that way=2E

Anyway, I'll push that after fixing your comments, an= d we'll see what we can do for the following ocaml versions=2E Thanks for t= he review!

I don't think ocaml has so many dependants that it requir= es core-updates=2E Not even sure it needs staging=2E

Le 3 mars 2021 08:27:54 GMT-05:00, zimoun <zimon=2Etoutoune@= gmail=2Ecom> a =C3=A9crit :
Hi Julien,

On Sat, 27 Feb 2021 at 00:13, Juli= en Lepiller <julien@lepiller=2Eeu> wrote:

The first patch builds the bootstraped ocamlc = and ocamllex=2E This takes
around 4 hours to build=2E The second patch r= ebuilds them using the source
code for ocaml 4=2E07=2E1, instead of the = modified sources used in
camlboot, and reuse them to run the main Makefi= le (make world=2Eopt)=2E

On my machine, camlboot takes = ~3h to build=2E Then ocaml-4=2E07-boot takes
~30s=2E Last there is no = meaningful difference between building
ocaml-4=2E07 using the embedded o= camlc and ocamlex binaries and using the
binaries from ocaml-4=2E04-boot= ; both ~6m=2E

I have check that camlboot, ocaml-4=2E07-boot and ocam= l-4=2E07 build
reproducibly with =E2=80=99--check=E2=80=99=2E They do= =2E


As a result= , we have identical files for this bootstrap and the
unbootstrapped OCam= l (up to output store paths and hash of some files
that get embedded in = native files, which differ because of the
different output path)=2E
<= /blockquote>
At first look, yes=2E :-)


Modulo the minor comme= nts I made, patches LGTM! Thanks=2E


Well, the next steps are to= build ocaml-4=2E09 and ocaml-4=2E11 using the
previous ocamlc and ocaml= ex version, right?

Then, it implies rebuild all the OCaml packages, = right? It could be
done in this core-updates cycle, WDYT?

Cheers= ,
simon
------FRVS9S3A2CU4N0CBB9RQRWHSR4NIE6-- From unknown Sat Jun 14 05:01:32 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Mar 2021 14:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 46806@debbugs.gnu.org Received: via spool by 46806-submit@debbugs.gnu.org id=B46806.161478033719097 (code B ref 46806); Wed, 03 Mar 2021 14:06:02 +0000 Received: (at 46806) by debbugs.gnu.org; 3 Mar 2021 14:05:37 +0000 Received: from localhost ([127.0.0.1]:55444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHS89-0004xx-JF for submit@debbugs.gnu.org; Wed, 03 Mar 2021 09:05:37 -0500 Received: from mail-qv1-f53.google.com ([209.85.219.53]:39962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHS87-0004xh-VT for 46806@debbugs.gnu.org; Wed, 03 Mar 2021 09:05:36 -0500 Received: by mail-qv1-f53.google.com with SMTP id x13so5758472qvj.7 for <46806@debbugs.gnu.org>; Wed, 03 Mar 2021 06:05:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=vxp64/m6Vx1V8dPsOePhqVm2SXxUd6coO+jV1fYscp0=; b=H6kcUdkrhtAGlz+Uoo2wibDPIXglRR7Qo+1yJlj974S92BSIcbiBdSBklSuKADj3Qy C1mA0lz3BceRdp865pNRmDC6Zs/EYr0aFOg3EexvAsaZgxuwezDrY/M4pjgz7OooCopT omxgnU3Kzf5HN38ip6rEkE3IHC7nEKY/gKQGHCMIW6HHF+tioYAFOTExUP+HLRQ9wkf7 vDJOG5VZEh/jMzfm7sEQRV2/+P0ezXxusIxQQWlrh/1QAP8rTbbEIGtDsaUabjW1BciT ij4+uTd2QI3j7e55U2HzY5PtwjW1g4WXD7AgFCxGRyV/Ore5cacGK3/e9b01zBDEHdcb Wyhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=vxp64/m6Vx1V8dPsOePhqVm2SXxUd6coO+jV1fYscp0=; b=ufx55/WPvetL3dnecXWo9F4BrQvzTFJ5GcJR8nENIgPrOofg330uC8GBT5NuQdgoLO z3qUngM+wEIYUVbiz2TdsPSKA7Zaxga3COWyOgFyGvzFt0rEad+3DVdqECzIDX0hfVph nZQk9JTrT2VTqUPseou2ZGJBpfhmdNN9HzVosFRwpX8Jz/nbG2LoT1IjIIbuYmkuvVxm /Q7dPJc48Bjy7abxSDvep5B7paJuyH70S0smRtCM86AN571QcoMlJjwaCWdTRoMaRpQ4 23ldb0HSzN5hiY5dgxYh9bpy5ZtS8yQy2W7BSoNszWNOWv0NFqKfemcnBBNWUb6ti2S0 nqGg== X-Gm-Message-State: AOAM532Oay6gTNigxkOKam1dxela01nEZG1MJsAJ7j0T2P6JDSpZZW6o kn2oNHtcByxRW7u8fKIgI1ZBkz//cUOeYZ+ekfkmfs8E X-Google-Smtp-Source: ABdhPJwX83A9zjCIz7Cnwx6XzVZlEw3kv+0pbFRaQTJFa1xJ5rqf5CBreOa6KOoN0DpxB0YYXNEBnfkzPI5LVbAGplw= X-Received: by 2002:ad4:5ba3:: with SMTP id 3mr2683842qvq.43.1614780329226; Wed, 03 Mar 2021 06:05:29 -0800 (PST) MIME-Version: 1.0 References: <20210227001244.17cc3833@tachikoma.lepiller.eu> <87eegwcqp1.fsf@gmail.com> <5366012A-8041-4277-B6B4-C6709EB2787B@lepiller.eu> In-Reply-To: <5366012A-8041-4277-B6B4-C6709EB2787B@lepiller.eu> From: zimoun Date: Wed, 3 Mar 2021 15:05:18 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, 3 Mar 2021 at 14:46, Julien Lepiller wrote: > > We'd have to check we actually can build them. The plan was to build menh= ir with this ocaml4.07, since it's required to generate the parser for ocam= l >=3D 4.08, and improve camlboot to support more recent versions. We would= prevent the need for a chain of bootstraps that way. Thanks for the explanations. I have tried to replace gcc by clang for camlboot but it fails. And also tried other Scheme than Guile, obviously fails. :-) > I don't think ocaml has so many dependants that it requires core-updates.= Not even sure it needs staging. Oh right, I thought that more OCaml packages were in Guix. :-) Cheers, simon From unknown Sat Jun 14 05:01:32 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Julien Lepiller Subject: bug#46806: closed (Re: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap.) Message-ID: References: <20210303171143.60855475@tachikoma.lepiller.eu> <20210227001244.17cc3833@tachikoma.lepiller.eu> X-Gnu-PR-Message: they-closed 46806 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 46806@debbugs.gnu.org Date: Wed, 03 Mar 2021 16:15:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1614788103-16713-1" This is a multi-part message in MIME format... ------------=_1614788103-16713-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #46806: [PATCH] gnu: ocaml-4.07: Bootstrap. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 46806@debbugs.gnu.org. --=20 46806: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D46806 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1614788103-16713-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 46806-done) by debbugs.gnu.org; 3 Mar 2021 16:14:28 +0000 Received: from localhost ([127.0.0.1]:56729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHU8q-0004JT-7t for submit@debbugs.gnu.org; Wed, 03 Mar 2021 11:14:28 -0500 Received: from lepiller.eu ([89.234.186.109]:59430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHU8o-0004JH-5G for 46806-done@debbugs.gnu.org; Wed, 03 Mar 2021 11:14:27 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 3e139026; Wed, 3 Mar 2021 16:14:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=oGizsO9/dvmF Xj9QP3evMmH4ZarZvnypPBl9t3JAlXo=; b=IAXEpJaxGX/T9RGHet9Zt/JP8OaQ Whx/xVebMG7rDqJu+2BJ82DhYyCs7QGOAmFFWVbaKPoTfCOIozmO2IDnBpvHYrGT FEyN/MhO2uDFpkjpQHsnIG1j29dvr3frvXIFAGd+nYkB3NI9zg6plFQDiIpf/Eg7 CDonlxkIxmQYne9xg30KONWqU1DalsL8Viq/9R1Wbuvqcj6osZ6AaLfgN/Ek7JWQ cDJMELlTn8Wz8wvr2lKEviKIsByjp8jcygTF8/aXOtLPKn4KdQ5pxivOHCV0XQGQ dYNucNdZcotWpjancee8pwteWYuyk6A57tj7A9x5FdT8mzQa0aV3upjEeA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 4a1aacd4 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Wed, 3 Mar 2021 16:14:23 +0000 (UTC) Date: Wed, 3 Mar 2021 17:14:16 +0100 From: Julien Lepiller To: zimoun Subject: Re: [bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. Message-ID: <20210303171143.60855475@tachikoma.lepiller.eu> In-Reply-To: References: <20210227001244.17cc3833@tachikoma.lepiller.eu> <87eegwcqp1.fsf@gmail.com> <5366012A-8041-4277-B6B4-C6709EB2787B@lepiller.eu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46806-done Cc: 46806-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Le Wed, 3 Mar 2021 15:05:18 +0100, zimoun a =C3=A9crit : > On Wed, 3 Mar 2021 at 14:46, Julien Lepiller > wrote: > > > > We'd have to check we actually can build them. The plan was to > > build menhir with this ocaml4.07, since it's required to generate > > the parser for ocaml >=3D 4.08, and improve camlboot to support more > > recent versions. We would prevent the need for a chain of > > bootstraps that way. =20 >=20 > Thanks for the explanations. > I have tried to replace gcc by clang for camlboot but it fails. > And also tried other Scheme than Guile, obviously fails. :-) >=20 >=20 > > I don't think ocaml has so many dependants that it requires > > core-updates. Not even sure it needs staging. =20 >=20 > Oh right, I thought that more OCaml packages were in Guix. :-) >=20 > Cheers, > simon Pushed as 0bd58ae7ff0d5c3935b0d660819aca4a0493ef8a, thanks for the review! Yeah, we might need some work to support other schemes. There's no C in camlboot, but we reuse some of OCaml's sources, for the bytecode interpreter (camlrun) and parser generator (ocamlyacc). So that's a problem with OCaml. ------------=_1614788103-16713-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 26 Feb 2021 23:14:04 +0000 Received: from localhost ([127.0.0.1]:42780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFmJ9-0000kP-IL for submit@debbugs.gnu.org; Fri, 26 Feb 2021 18:14:04 -0500 Received: from lists.gnu.org ([209.51.188.17]:60926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFmJ7-0000k6-J0 for submit@debbugs.gnu.org; Fri, 26 Feb 2021 18:14:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFmJ7-0002ZO-Dr for guix-patches@gnu.org; Fri, 26 Feb 2021 18:14:01 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]:33066) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFmJ2-0002F6-JM for guix-patches@gnu.org; Fri, 26 Feb 2021 18:14:00 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 841a9365 for ; Fri, 26 Feb 2021 23:13:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type; s=dkim; bh=8Vz /nnhEHTS8ku46lfeRYHa7+EaaYpjC4MP4CbhW+zI=; b=BSEOCnBJBkAQALgGa+w wfcfu9TrRmr2AZxFmcl2C0a4kVVcFyLa5RhOrWQxp6i9m9Xxw5ZBHqLJP+AX+o+/ BCAdFiDNUrxWTdWMB149OIh9o4gTHjrv3NBfOw7fiZr0xkSjbziv0bYPCCrlXzhd VzO9IDdUfclOLd6cw2g4qektEzrvKvmvrLiS46KZiO+QjKCJ3/Kh1YpLG8zDwPJc hwYNRK5qqAfXBSjouhmlrycjegaIiqrQgOFqksvNWYzkrbzkOME3FWM+G5KekWl1 ybxOCkjnEFAhyVbaBY4GBnZQc0YgXkFOp/Gk9q7vPIFruhXYGgJ6BmaTvBX6ZjdF fCA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id a78db312 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Fri, 26 Feb 2021 23:13:45 +0000 (UTC) Date: Sat, 27 Feb 2021 00:13:39 +0100 From: Julien Lepiller To: guix-patches@gnu.org Subject: [PATCH] gnu: ocaml-4.07: Bootstrap. Message-ID: <20210227001244.17cc3833@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/w5x6PD+DE2QrzzUUd_Wu75L" Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --MP_/w5x6PD+DE2QrzzUUd_Wu75L Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Guix! This small series adds camlboot, a project to reimplement a bootstrap for OCaml, which lets us remove the pre-built boot/ocaml{c,lex} :) The first patch builds the bootstraped ocamlc and ocamllex. This takes around 4 hours to build. The second patch rebuilds them using the source code for ocaml 4.07.1, instead of the modified sources used in camlboot, and reuse them to run the main Makefile (make world.opt). As a result, we have identical files for this bootstrap and the unbootstrapped OCaml (up to output store paths and hash of some files that get embedded in native files, which differ because of the different output path). --MP_/w5x6PD+DE2QrzzUUd_Wu75L Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-gnu-Add-camlboot.patch >From 8fd06caa83e55d27dc5998f7548a7d45c55c6a91 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 27 Feb 2021 00:07:20 +0100 Subject: [PATCH 1/2] gnu: Add camlboot. * gnu/packages/ocaml.scm (camlboot): New variable. --- gnu/packages/ocaml.scm | 66 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 9e68359a42..01c14a0ba0 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -52,6 +52,7 @@ #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) + #:use-module (gnu packages guile) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) #:use-module (gnu packages llvm) @@ -105,6 +106,71 @@ ".tar.gz")) (sha256 (base32 hash)))) +(define-public camlboot + (let ((commit "506280c6e0813e0e794988151a8e46be55373ebc") + (revision "0")) + (package + (name "camlboot") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Ekdohibs/camlboot") + (commit commit) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0vimxl4karw9ih3npyc5rhxg85cjh6fqjbq3dzj7j2iymlhwfbkv")) + (modules '((guix build utils))) + (snippet + `(begin + ;; Remove bootstrap binaries and pre-generated source files, + ;; to ensure we actually bootstrap properly. + (for-each delete-file (find-files "ocaml-src" "^.depend$")) + (delete-file "ocaml-src/boot/ocamlc") + (delete-file "ocaml-src/boot/ocamllex") + ;; Ensure writable + (for-each + (lambda (file) + (chmod file (logior (stat:mode (stat file)) #o200))) + (find-files "." ".")))))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list "_boot/ocamlc"); build target + #:tests? #f; no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'no-autocompile + (lambda _ + ;; prevent a guile warning + (setenv "GUILE_AUTO_COMPILE" "0"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (install-file "_boot/ocamlc" bin) + (rename-file "miniml/interp/lex.byte" "ocamllex") + (install-file "ocamllex" bin))))))) + (native-inputs + `(("guile" ,guile-3.0))) + (home-page "https://github.com/Ekdohibs/camlboot") + (synopsis "OCaml bootstrap") + (description "OCaml is written in OCaml. Its sources contain a pre-compiled +bytecode version of ocamlc and ocamllex that are used to build the next version +of the compiler. Camlboot implements a bootstrap for the OCaml compiler and +provides a bootstrapped equivalent to these files. + +It contains a compiler for a small subset of OCaml written in Guile Scheme, +an interpreter for OCaml written in that subset and a manually-written lexer +for OCaml. These elements eliminate the need for the binary bootstrap in +OCaml and can effectively bootstrap OCaml 4.07. + +This package produces a native ocamlc and a bytecode ocamllex.") + (license license:expat)))) + (define-public ocaml-4.11 (package (name "ocaml") -- 2.30.0 --MP_/w5x6PD+DE2QrzzUUd_Wu75L Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0002-gnu-ocaml-4.07-Bootstrap.patch >From 8fa9e59c8d90339478d65e269b37cbb3b201232d Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 27 Feb 2021 00:07:30 +0100 Subject: [PATCH 2/2] gnu: ocaml-4.07: Bootstrap. * gnu/packages/ocaml.scm (ocaml-4.07): Implement bootstrap via camlboot. --- gnu/packages/ocaml.scm | 179 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 176 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 01c14a0ba0..272ed3a2d6 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -255,7 +255,7 @@ functional, imperative and object-oriented styles of programming.") (base32 "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj")))))) -(define-public ocaml-4.07 +(define ocaml-4.07-boot (package (inherit ocaml-4.09) (version "4.07.1") @@ -267,11 +267,102 @@ functional, imperative and object-oriented styles of programming.") "/ocaml-" version ".tar.xz")) (sha256 (base32 - "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z")))) + "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z")) + (modules '((guix build utils))) + (snippet + `(begin + ;; Remove bootstrap binaries and pre-generated source files, + ;; to ensure we actually bootstrap properly. + (for-each delete-file (find-files "." "^.depend$")) + (delete-file "boot/ocamlc") + (delete-file "boot/ocamllex"))))) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'configure 'copy-bootstrap + (lambda* (#:key inputs #:allow-other-keys) + (let ((camlboot (assoc-ref inputs "camlboot"))) + (copy-file (string-append camlboot "/bin/ocamllex") "boot/ocamllex") + (copy-file (string-append camlboot "/bin/ocamlc") "boot/ocamlc") + (chmod "boot/ocamllex" #o755) + (chmod "boot/ocamlc" #o755)))) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (mandir (string-append out "/share/man"))) + (invoke "./configure" + "--prefix" out + "--mandir" mandir)))) + (replace 'build + (lambda* (#:key parallel-build? #:allow-other-keys) + (define* (make . args) + (apply invoke "make" + (append (if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + args))) + (define (touch file) (invoke "touch" file)) + (touch "byterun/.depend") + (make "-C" "byterun" "depend") + (make "-C" "byterun" "all") + (copy-file "byterun/ocamlrun" "boot/ocamlrun") + (touch ".depend") + (make "ocamlyacc") + (copy-file "yacc/ocamlyacc" "boot/ocamlyacc") + (touch "stdlib/.depend") + (make "-C" "stdlib" "sys.ml") + (make "-C" "stdlib" "CAMLDEP=../boot/ocamlc -depend" "depend") + (make "-C" "stdlib" "COMPILER=" + "CAMLC=../boot/ocamlc -use-prims ../byterun/primitives" + "all") + (for-each + (lambda (file) + (copy-file file (string-append "boot/" (basename file)))) + (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo" "stdlib/camlheader" + (find-files "stdlib" ".*.cmi$"))) + (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a") + (touch "tools/.depend") + (make "-C" "tools" + "CAMLC=../boot/ocamlc -nostdlib -I ../boot -use-prims ../byterun/primitives -I .." + "make_opcodes" "cvt_emit") + (touch "lex/.depend") + (make "-C" "lex" "CAMLDEP=../boot/ocamlc -depend" "depend") + (make "CAMLDEP=boot/ocamlc -depend" "depend") + (make "CAMLC=boot/ocamlc -nostdlib -I boot -use-prims byterun/primitives" + "ocamlc") + (make "-C" "lex" + "CAMLC=../boot/ocamlc -strict-sequence -nostdlib -I ../boot -use-prims ../byterun/primitives" + "all"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (install-file "ocamlc" bin) + (install-file "lex/ocamllex" bin) + (install-file "byterun/ocamlrun" bin))))))) + (native-inputs + `(("camlboot" ,camlboot) + ("perl" ,perl) + ("pkg-config" ,pkg-config))))) + +(define-public ocaml-4.07 + (package + (inherit ocaml-4.07-boot) (arguments (substitute-keyword-arguments (package-arguments ocaml-4.09) ((#:phases phases) `(modify-phases ,phases + (add-before 'configure 'copy-bootstrap + (lambda* (#:key inputs #:allow-other-keys) + (let ((ocaml (assoc-ref inputs "ocaml"))) + (copy-file (string-append ocaml "/bin/ocamllex") "boot/ocamllex") + (copy-file (string-append ocaml "/bin/ocamlc") "boot/ocamlc") + (copy-file (string-append ocaml "/bin/ocamlrun") "boot/ocamlrun") + (chmod "boot/ocamlrun" #o755) + (chmod "boot/ocamllex" #o755) + (chmod "boot/ocamlc" #o755)))) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -280,7 +371,89 @@ functional, imperative and object-oriented styles of programming.") ;; --prefix= syntax (with equals sign). (invoke "./configure" "--prefix" out - "--mandir" mandir)))))))))) + "--mandir" mandir)))) + (add-before 'build 'generate-depend + (lambda* (#:key parallel-build? #:allow-other-keys) + (define* (make . args) + (apply invoke "make" + (append (if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + args))) + ;; These files were deleted in a snippet because they are + ;; pre-generated + (invoke "touch" ".depend" "stdlib/.depend" "byterun/.depend" + "tools/.depend" "lex/.depend" "asmrun/.depend" + "debugger/.depend" "ocamltest/.depend" "ocamldoc/.depend" + "ocamldoc/stdlib_non_prefixed/.depend" + "otherlibs/bigarray/.depend" + "otherlibs/graph/.depend" + "otherlibs/raw_spacetime_lib/.depend" + "otherlibs/str/.depend" + "otherlibs/systhreads/.depend" + "otherlibs/threads/.depend" + "otherlibs/unix/.depend" + "otherlibs/win32unix/.depend") + (make "-C" "byterun" "depend") + (make "-C" "asmrun" "depend") + (make "-C" "byterun" "all") + (copy-file "byterun/ocamlrun" "boot/ocamlrun") + (make "ocamlyacc") + (copy-file "yacc/ocamlyacc" "boot/ocamlyacc") + (make "-C" "stdlib" "sys.ml") + (make "-C" "stdlib" + "CAMLDEP=../boot/ocamlc -depend" + "depend") + (make "-C" "stdlib" "COMPILER=" + "CAMLC=../boot/ocamlc -use-prims ../byterun/primitives" + "all") + (for-each + (lambda (file) + (copy-file file (string-append "boot/" (basename file)))) + (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo" "stdlib/camlheader" + (find-files "stdlib" ".*.cmi$"))) + (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a") + (make "-C" "lex" "CAMLDEP=../boot/ocamlc -depend" "depend") + (make "-C" "lex" "all") + (substitute* "tools/Makefile" + (("\\$\\(CAMLRUN\\) ./ocamldep") "../boot/ocamlc -depend")) + (substitute* '("otherlibs/graph/Makefile" + "otherlibs/systhreads/Makefile" + "otherlibs/threads/Makefile" + "otherlibs/unix/Makefile") + (("\\$\\(CAMLRUN\\) ../../tools/ocamldep") + "../../boot/ocamlc -depend")) + (substitute* '("otherlibs/bigarray/Makefile" + "otherlibs/raw_spacetime_lib/Makefile" + "otherlibs/str/Makefile" + "otherlibs/win32unix/Makefile") + (("\\$\\(CAMLRUN\\) \\$\\(ROOTDIR\\)/tools/ocamldep") + "../../boot/ocamlc -depend")) + (make "-C" "tools" "depend") + (make "-C" "otherlibs/bigarray" "depend") + (make "-C" "otherlibs/graph" "depend") + (make "-C" "otherlibs/raw_spacetime_lib" "depend") + (make "-C" "otherlibs/str" "depend") + (make "-C" "otherlibs/systhreads" "depend") + (make "-C" "otherlibs/threads" "depend") + (make "-C" "otherlibs/unix" "depend") + (make "-C" "otherlibs/win32unix" "depend") + (make "-C" "debugger" "CAMLDEP=../boot/ocamlc -depend" "depend") + (make "-C" "ocamltest" "ocamldep=../boot/ocamlc -depend -slash" "depend") + (make "parsing/parser.mli") + (substitute* "ocamldoc/Makefile" + (("include Makefile.unprefix") + "include Makefile.unprefix +depend: $(STDLIB_MLIS) $(STDLIB_DEPS)")) + (make "-C" "ocamldoc" "OCAMLDEP=../boot/ocamlc -depend -slash" "depend") + (make "-C" "ocamldoc/stdlib_non_prefixed" + "OCAMLDEP=../../boot/ocamlc -depend -slash" "depend") + (make "CAMLDEP=boot/ocamlc -depend" "depend") + )))))) + (native-inputs + `(("ocaml" ,ocaml-4.07-boot) + ("perl" ,perl) + ("pkg-config" ,pkg-config))))) (define-public ocaml ocaml-4.11) -- 2.30.0 --MP_/w5x6PD+DE2QrzzUUd_Wu75L-- ------------=_1614788103-16713-1--