From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iOdpNTBND2LLRAEAgWs5BA (envelope-from ) for ; Fri, 18 Feb 2022 08:39:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CE6fMjBND2IePAAA9RJhRA (envelope-from ) for ; Fri, 18 Feb 2022 08:39:28 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 41CD51B2FC for ; Fri, 18 Feb 2022 08:39:28 +0100 (CET) Received: from localhost ([::1]:41660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nKxrS-0006jy-HH for larch@yhetil.org; Fri, 18 Feb 2022 02:39:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKxr5-0006jh-7Q for guix-patches@gnu.org; Fri, 18 Feb 2022 02:39:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59429) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nKxr4-0002rG-Og for guix-patches@gnu.org; Fri, 18 Feb 2022 02:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nKxr4-0001V2-G0 for guix-patches@gnu.org; Fri, 18 Feb 2022 02:39:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v2 15/15] gnu: racket: Update to 8.4. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Feb 2022 07:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Philip McGrath , 53878@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Attila Lendvai , Malte Gerdes , zimoun Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.16451699405756 (code B ref 53878); Fri, 18 Feb 2022 07:39:02 +0000 Received: (at 53878) by debbugs.gnu.org; 18 Feb 2022 07:39:00 +0000 Received: from localhost ([127.0.0.1]:53326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKxr1-0001Ul-Lu for submit@debbugs.gnu.org; Fri, 18 Feb 2022 02:39:00 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:20833) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKxqz-0001Uc-Ev for 53878@debbugs.gnu.org; Fri, 18 Feb 2022 02:38:59 -0500 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4K0NqK3yfwz1LXsR; Fri, 18 Feb 2022 08:38:53 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4K0NqK3yfwz1LXsR DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1645169933; bh=ktT9QU4MzIYwm3BSlw5R2d5OGAhC2u5IxOnB86EnEyE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=kBN7FmiK26/6ofeQtLRT8cdpKDZRhD74ZT1brtrGg3hvtEcTYAmqmGeScL4HUVzSE DJra2yde4rF0Uz51xLWWSeEjcLKOsnUL6u1BdW7Rj7jlHoJn+M8+WKpEDxC043lodR +js/SL33y0dgZeac04tx5giYsb87qHoGM76NJd4Y= Message-ID: From: Liliana Marie Prikler Date: Fri, 18 Feb 2022 08:38:52 +0100 In-Reply-To: <20220217205048.967383-16-philip@philipmcgrath.com> References: <97f8916ae5bd8d8459bdfd507864f2f55cc217a1.camel@ist.tugraz.at> <20220217205048.967383-1-philip@philipmcgrath.com> <20220217205048.967383-16-philip@philipmcgrath.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645169968; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ktT9QU4MzIYwm3BSlw5R2d5OGAhC2u5IxOnB86EnEyE=; b=Tza9JrSsyI5EvKUV2Vuu7u488aN3iQ3RSjTJ5YSSWcSgxMa34kfqFqQVUsfXocnbvy1Hvg 0r/lX3StKI+W9xmyjq/Qslvs2kiDMvx/m1y6po6xaWvZRSToYTXUIH6bh9JJV2VB/4tDpt ZnCVOVXWSkEo1Tq1Eaum0V6pSQWooz1VXQT/l2gxYW8VDfWQ8BbzLdOvltO8YLXSjCCLO/ FgAFcIhOO6Outq3gzXDjLHX/oNyw1F6F9gb/9+/zRSd5N6pCfhGOF08whTSlraPO//M9hQ BLmuYAYWGwlx/lLMFGl8cGmp+FNRK8qS9YM5Sh84dQhEG8XzStvE2h4XAUTbbw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645169968; a=rsa-sha256; cv=none; b=jBIRKs0DhtOsdRvFzDng+ECsIJ1oZvDKYwKf8pd7wqmHSg5XuydF2wOoOp98U0QL+44KYE J6M3y8kG3CVZ9BlhRIGMk9g+b6Qps+iJ8JPRLqCdxIeQYlQBRRnPsh4g9ONpoFvizvXUlE En84mf85Qm8YTtIyLBUQYppvMiy9w+aU/qmLi2alavAXnl/GpbKZtiqsoKnPmnUZ7FsXP5 WZKxPHZgh3M2EmMAdxf+kv203leKkwKgRkCyBzQwb5AtEcrb+bwxIi5Ta+xt5jFevHEOkb Q+N9uD0XByXectKSVzbRWlYopKoxiAx4d9r47bWMX6opeSjghFvTq1jJwbX0AA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=kBN7FmiK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.73 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=kBN7FmiK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 41CD51B2FC X-Spam-Score: -0.73 X-Migadu-Scanner: scn1.migadu.com X-TUID: DOHwE8um4IFG Hi, Am Donnerstag, dem 17.02.2022 um 15:50 -0500 schrieb Philip McGrath: > -;; Commentary: > -;; > -;; Here's how bootstrapping minimal Racket works: > -;; > -;;   - Racket BC [CGC] can be built with only a C compiler (except > for > -;;     one caveat discussed below). > -;;   - Racket BC [3M] needs an existing Racket to run "xform", > -;;     which transforms its own C source code to add additional > annotations > -;;     for the precise garbage collector. > -;;   - Racket CS needs (bootfiles for) Racket's fork of Chez Scheme. > -;;     It also needs an existing Racket to compile Racket- > implemented > -;;     parts of the runtime system to R6RS libraries. > -;;   - Chez Scheme also needs bootfiles for itself, but Racket can > simulate > -;;     enough of Chez Scheme to load Racket's fork of the Chez > Scheme compiler > -;;     purely from source into Racket and apply the compiler to > itself, > -;;     producing the needed bootfiles (albeit very slowly). > -;;     Any variant of Racket since version 7.1 can run the > simulation. > -;; > -;; So, we build CGC to build 3M to build bootfiles and CS. > -;; > -;; One remaining bootstrapping limitation is that Racket's reader, > module > -;; system, and macro expander are implemented in Racket. For Racket > CS, > -;; they are compiled to R6RS libraries as discussed above. This note > from the > -;; README file applies to all such subsystems: > -;; > -;;     The Racket version must be practically the same as the > current Racket > -;;     verson, although it can be the Racket BC implementation > (instead of > -;;     the Racket CS implementation). > -;; > -;;     Unlike Chez Scheme boot files, the files generated in > "schemified" > -;;     are human-readable and -editable Scheme code. That provides a > way > -;;     out of bootstrapping black holes, even without BC. > -;; > -;; However, other Racket subsystems implemented in Racket for Racket > CS > -;; use older C implementations for Racket BC, whereas the reader, > expander, > -;; and module system were completely replaced with the Racket > implementation > -;; as of Racket 7.0. > -;; > -;; For Racket BC, the compiled "linklet" s-expressions (primitive > modules) > -;; are embeded in C as a static string constant. Eventually, they > are further > -;; compiled by the C-implemented Racket BC bytecode and JIT > compilers. > -;; (On platforms where Racket BC's JIT is not supported, yet another > compiler > -;; instead compiles the linklets to C code, but this is not a > bootstrapping > -;; issue.) I think it'd be clearer if this commentary was moved along with the bootstrapping code. Is there a reason why we can't use (racket-vm-for- system) before updating Racket to 8.4? This looks like another of those "two things at once" patches.   >  (define-public racket-minimal >    (package >      (name "racket-minimal") > -    (version "8.3")            ; note: remember to also update > racket! > -    (source > -     (origin > -       (method git-fetch) > -       (uri (git-reference > -             (url "https://github.com/racket/racket") > -             (commit (string-append "v" version)))) > -       (sha256 > -        "1i1jnv1wb0kanfg47hniafx2vhwjc33qqx66lq7wkf5hbmgsyws3") > -       (file-name (git-file-name name version)) > -       (patches (search-patches "racket-minimal-sh-via- > rktio.patch")) > -       (modules '((guix build utils))) > -       (snippet > -        (with-imported-modules '((guix build utils)) > -          #~(begin > -              ;; Unbundle Chez submodules. > -              (with-directory-excursion "racket/src/ChezScheme" > -                ;; Remove bundled libraries (copied from 'chez- > scheme'). > -                (for-each delete-file-recursively > -                          '("stex" > -                            "nanopass" > -                            "lz4" > -                            "zlib"))) > -              ;; Unbundle libffi. > -              (delete-file-recursively > "racket/src/bc/foreign/libffi")))))) > -    (inputs > -     `(;; common to all racket-minimal variants: > -       ("openssl" ,openssl) > -       ("sqlite" ,sqlite) > -       ("sh" ,bash-minimal) > -       ;; only for CS > -       ("zlib" ,zlib) > -       ("zlib:static" ,zlib "static") > -       ("lz4" ,lz4) > -       ("lz4:static" ,lz4 "static"))) > -    (native-inputs > -     `(("bootfiles" ,racket-bootstrap-chez-bootfiles) > -       ,@(package-native-inputs racket-bootstrap-chez-bootfiles))) > +    (version (package-version (racket-vm-for-system))) > +    (source (package-source (racket-vm-for-system))) > +    ;; For cross-compilation, Matthew Flatt recommends reusing > +    ;; as much of `raco cross` as possible. So, put that off until > +    ;; we have a build system for Racket packages. > +    (inputs (list openssl sqlite (racket-vm-for-system))) As outlined earlier, I believe Racket should define its version, not racket-vm-for-system. > [...] > (define-public racket >    (package >      (inherit racket-minimal) >      (name "racket") > -    (version (package-version racket-minimal)) ; needed for origin > uri to work > -    (source > -     (origin > -       (method url-fetch) > -       (uri (map (lambda (base) > -                   (string-append base version "/racket-src.tgz")) > -                 %installer-mirrors)) > -       (sha256 > -        (base32 > -         "0jdr0y7scvv2a3sq456ifrgq0yfsbiwavdf2m86zmrapp481mby4")) > -       (snippet > -        #~(begin > -            (use-modules (guix build utils) > -                         (ice-9 match) > -                         (ice-9 regex)) > -            ;; unbundle minimal Racket > -            (for-each delete-file-recursively > -                      '("collects" > -                        "doc" > -                        "etc" > -                        "README" > -                        "src")) > -            ;; unbundle package sources included elsewhere > -            (with-directory-excursion "share/pkgs" > -              (for-each delete-file-recursively > -                        '#+%main-repo-main-distribution-pkgs)) > -            #t)))) > +    (source #f) Why? >      (inputs > -     `(("cairo" ,cairo) > -       ("fontconfig" ,fontconfig) > -       ("glib" ,glib) > -       ("glu" ,glu) > -       ("gmp" ,gmp) > -       ("gtk+" ,gtk+)                   ; propagates gdk-pixbuf+svg > -       ("libjpeg" ,libjpeg-turbo) > -       ("libpng" ,libpng) > -       ("libx11" ,libx11) > -       ("mesa" ,mesa) > -       ("mpfr" ,mpfr) > -       ("pango" ,pango) > -       ("unixodbc" ,unixodbc) > -       ("libedit" ,libedit))) > -    (native-inputs > -     `(("racket" ,racket-minimal) > -       ("extend-layer" ,extend-layer) > -       ("main-repo" ,(package-source racket-minimal)))) > +     (list cairo > +           fontconfig > +           glib > +           glu > +           gmp > +           gtk+ ;; propagates gdk-pixbuf+svg > +           libjpeg-turbo > +           libpng > +           libx11 ;; ?? wayland ?? > +           mesa > +           mpfr > +           pango > +           unixodbc > +           libedit ;; TODO reconsider in light of expeditor and > readline-gpl > +           racket-minimal ;; <-- TODO non-tethered layer > +           (racket-vm-for-system))) >      (arguments > -     `(#:phases > -       (modify-phases %standard-phases > -         (add-before 'configure 'unpack-packages > -           (let ((unpack (assoc-ref %standard-phases 'unpack))) > -             (lambda* (#:key  native-inputs inputs outputs #:allow- > other-keys) > -               (let* ((racket (assoc-ref (or native-inputs inputs) > "racket")) > -                      (prefix (assoc-ref outputs "out")) > -                      (pkgs-dir (string-append prefix > "/share/racket/pkgs"))) > -                 (mkdir-p pkgs-dir) > -                 (copy-recursively > -                  "share/links.rktd" > -                  (string-append prefix "/share/racket/links.rktd")) > -                 (copy-recursively "share/pkgs" pkgs-dir) > -                 ;; NOTE: unpack changes the working directory > -                 (unpack #:source (assoc-ref (or native-inputs > inputs) > -                                             "main-repo")) > -                 (for-each (lambda (pkg) > -                             (define dest (string-append pkgs-dir > "/" pkg)) > -                             (mkdir-p dest) > -                             (copy-recursively (string-append > "pkgs/" pkg) > -                                               dest)) > -                           ',%main-repo-main-distribution-pkgs) > -                 #t)))) > -         (replace 'configure > -           (lambda* (#:key native-inputs inputs outputs #:allow- > other-keys) > -             (let ((racket (assoc-ref (or native-inputs inputs) > "racket")) > -                   (prefix (assoc-ref outputs "out"))) > -               (apply invoke > -                      (string-append racket "/bin/racket") > -                      (assoc-ref inputs "extend-layer") > -                      racket > -                      prefix > -                      (map > -                       (lambda (lib) > -                         (string-append (assoc-ref inputs lib) > "/lib")) > -                       '("cairo" > -                         "fontconfig" > -                         "glib" > -                         "glu" > -                         "gmp" > -                         "gtk+" > -                         "libjpeg" > -                         "libpng" > -                         "libx11" > -                         "mesa" > -                         "mpfr" > -                         "pango" > -                         "unixodbc" > -                         "libedit"))) > -               #t))) > -         (replace 'build > -           (lambda* (#:key native-inputs inputs outputs #:allow- > other-keys) > -             (invoke (string-append (assoc-ref (or native-inputs > inputs) > -                                               "racket") > -                                    "/bin/racket") > -                     "--config" > -                     (string-append (assoc-ref outputs "out") > -                                    "/etc/racket") > -                     "-l" > -                     "raco" > -                     "setup") > -             #t)) > -         (delete 'install)) > -       ;; we still don't have these: > -       #:tests? #f)) > +     (substitute-keyword-arguments (package-arguments racket- > minimal) > +       ((#:configure-flags _ '()) > +        #~`("--tethered" > +            "--extra-foreign-lib-search-dirs" > +            ,(format #f "~s" > +                     '(#$@(map (lambda (name) > +                                 (cond > +                                  ((this-package-input name) > +                                   => (cut file-append <> "/lib")) > +                                  (else > +                                   (raise-exception > +                                    (make-exception > +                                     (make-assertion-failure) > +                                     (make-exception-with-message > +                                      "missing input to the 'racket' > package") > +                                     (make-exception-with-irritants > +                                      (list name))))))) > +                               '("cairo" > +                                 "fontconfig-minimal" ;; aka > fontconfig > +                                 "glib" > +                                 "glu" > +                                 "gmp" > +                                 "gtk+" > +                                 "libjpeg-turbo" > +                                 "libpng" > +                                 "libx11" > +                                 "mesa" > +                                 "mpfr" > +                                 "pango" > +                                 "unixodbc" > +                                 "libedit")))))) > +       ((#:make-flags _ '()) > +        #~`("main-distribution")) > +       ((#:phases parent-phases #~%standard-phases) > +        #~(modify-phases #$parent-phases > +            (delete 'unpack) > +            (replace 'build > +              (lambda args > +                (mkdir-p (string-append #$output > "/lib/racket/pkgs")) > +                (for-each > +                 (match-lambda > +                   ((name src) > +                    (copy-recursively > +                     src > +                     (string-append #$output "/lib/racket/pkgs/" > name)))) > +                 '(#$@main-distribution-packages)))))))) >      (synopsis "Programmable programming language in the Scheme > family") >      (description >       "Racket is a general-purpose programming language in the Scheme > family, > @@ -539,82 +224,899 @@ (define dest (string-append pkgs-dir "/" pkg)) >  DrRacket IDE, libraries for GUI and web programming, and > implementations of >  languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and > Datalog."))) This looks like a very weird way of phrasing union-build. Is there a reason to do this rather than union-build? Cheers