unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10.
@ 2023-08-24  0:05 Philip McGrath
  2023-08-24  0:08 ` [bug#65482] [PATCH 1/3] " Philip McGrath
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Philip McGrath @ 2023-08-24  0:05 UTC (permalink / raw)
  To: 65482; +Cc: Philip McGrath, Efraim Flashner, Tim Johann

Hi,

In addition to updating Racket to 8.10, this patch series backports fixes
merged upstream for rktboot on architectures other than x86_64 and removes
a corresponding workaround from the Guix packaging.

Efraim and Tim, I'm CC'ing you because of your recent patches for rktboot on
aarch64 and riscv64: it would be great if you could confirm that this series
works on those architectures. It would also be useful to test powerpc64le,
especially since it is supported via 'pbarch', which takes some different
branches.

 -Philip

Philip McGrath (3):
  gnu: racket: Update to 8.10.
  gnu: racket: Declare OpenSSL search paths.
  gnu: chez-scheme-for-racket-bootstrap-bootfiles: Remove workaround.

 gnu/local.mk                                  |   2 +-
 gnu/packages/chez.scm                         |  10 +-
 .../racket-backport-8.10-rktboot.patch        | 130 ++++++++++++++++++
 .../racket-rktboot-riscv64-support.patch      |  15 --
 gnu/packages/racket.scm                       |  44 +++---
 5 files changed, 156 insertions(+), 45 deletions(-)
 create mode 100644 gnu/packages/patches/racket-backport-8.10-rktboot.patch
 delete mode 100644 gnu/packages/patches/racket-rktboot-riscv64-support.patch


base-commit: 3ce3466311953cc5f00a4fb34ff094a9a3501399
-- 
2.41.0





^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#65482] [PATCH 1/3] gnu: racket: Update to 8.10.
  2023-08-24  0:05 [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10 Philip McGrath
@ 2023-08-24  0:08 ` Philip McGrath
  2023-08-24  0:08 ` [bug#65482] [PATCH 2/3] gnu: racket: Declare OpenSSL search paths Philip McGrath
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Philip McGrath @ 2023-08-24  0:08 UTC (permalink / raw)
  To: 65482; +Cc: Tim Johann, Efraim Flashner, Philip McGrath

* gnu/packages/patches/racket-rktboot-riscv64-support.patch: Move to ...
* gnu/packages/patches/racket-backport-8.10-rktboot.patch: ... this
file, together with a related upstreamed patch.
* gnu/local.mk (dist_patch_DATA): Update accordingly.
* gnu/packages/racket/scm (%racket-origin)[patches]: Likewise.
(%racket-version): Update to 8.10.
(racket)[inputs]<data, deinprogramm, drracket, gui, htdp, math>
<net-cookies, pict, plot, racklog, redex, scribble, slideshow, snip>
<typed-racket, string-constants, syntax-color, web-server>: Update
hashes.
* gnu/packages/chez.scm (chez-scheme-for-racket): Update to
9.9.9-pre-release.17.
---
 gnu/local.mk                                  |   2 +-
 gnu/packages/chez.scm                         |   2 +-
 .../racket-backport-8.10-rktboot.patch        | 130 ++++++++++++++++++
 .../racket-rktboot-riscv64-support.patch      |  15 --
 gnu/packages/racket.scm                       |  42 +++---
 5 files changed, 153 insertions(+), 38 deletions(-)
 create mode 100644 gnu/packages/patches/racket-backport-8.10-rktboot.patch
 delete mode 100644 gnu/packages/patches/racket-rktboot-riscv64-support.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ee4567c857..f222762411 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1898,7 +1898,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/rpcbind-CVE-2017-8779.patch		\
   %D%/packages/patches/rtags-separate-rct.patch			\
   %D%/packages/patches/racket-chez-scheme-bin-sh.patch		\
-  %D%/packages/patches/racket-rktboot-riscv64-support.patch	\
+  %D%/packages/patches/racket-backport-8.10-rktboot.patch	\
   %D%/packages/patches/racket-rktio-bin-sh.patch		\
   %D%/packages/patches/racket-zuo-bin-sh.patch			\
   %D%/packages/patches/remake-impure-dirs.patch			\
diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index a5cb5a2e06..e5694ec1cf 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -466,7 +466,7 @@ (define-public chez-scheme-for-racket
   (package
     (inherit chez-scheme)
     (name "chez-scheme-for-racket")
-    (version "9.9.9-pre-release.16")
+    (version "9.9.9-pre-release.17")
     ;; The version should match `scheme-version`.
     ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360.
     ;; It will always be different than the upstream version!
diff --git a/gnu/packages/patches/racket-backport-8.10-rktboot.patch b/gnu/packages/patches/racket-backport-8.10-rktboot.patch
new file mode 100644
index 0000000000..834001bd83
--- /dev/null
+++ b/gnu/packages/patches/racket-backport-8.10-rktboot.patch
@@ -0,0 +1,130 @@
+From 5446e36e0685ec5c7b4f812dec5bf7959db4f906 Mon Sep 17 00:00:00 2001
+From: Efraim Flashner <efraim@flashner.co.il>
+Date: Thu, 20 Jul 2023 15:56:21 +0300
+Subject: [PATCH 1/2] rktboot: Add support for riscv64.
+
+(cherry picked from commit f80c5d001d5235556ae9cde617b1e3a1322d0505)
+---
+ racket/src/rktboot/machine-def.rkt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/racket/src/rktboot/machine-def.rkt b/racket/src/rktboot/machine-def.rkt
+index 8ff0688652..59ebfc88d8 100644
+--- a/racket/src/rktboot/machine-def.rkt
++++ b/racket/src/rktboot/machine-def.rkt
+@@ -25,6 +25,7 @@
+                                      [(regexp-match? #rx"^t?arm32" target-machine) "arm32"]
+                                      [(regexp-match? #rx"^t?arm64" target-machine) "arm64"]
+                                      [(regexp-match? #rx"^t?ppc32" target-machine) "ppc32"]
++                                     [(regexp-match? #rx"^t?rv64" target-machine) "rv64"]
+                                      [(regexp-match? #rx"^t?pb" target-machine) "pb"]
+                                      [else (error "machine.def: cannot infer architecture")]))]
+                [s (regexp-replace* #rx"[$][(]Mend[)]" s
+
+base-commit: b10ecfb8311fca2d42636eea2ca12aff0b76b208
+-- 
+2.41.0
+
+
+From 6261c3582c386e770d654ca6a36f112834f35aef Mon Sep 17 00:00:00 2001
+From: Philip McGrath <philip@philipmcgrath.com>
+Date: Sun, 16 Jul 2023 15:47:14 -0400
+Subject: [PATCH 2/2] rktboot: improve machene type inference
+
+Related to https://issues.guix.gnu.org/62231
+Related to https://github.com/racket/racket/issues/3948
+
+(cherry picked from commit 005488491cee89e7db38109de4c9dcf2d8d5aef0)
+---
+ racket/src/rktboot/config.rkt | 73 +++++++++++++++++++++++++++++------
+ 1 file changed, 61 insertions(+), 12 deletions(-)
+
+diff --git a/racket/src/rktboot/config.rkt b/racket/src/rktboot/config.rkt
+index 7a969017ed..2b411e002c 100644
+--- a/racket/src/rktboot/config.rkt
++++ b/racket/src/rktboot/config.rkt
+@@ -15,20 +15,69 @@
+                                (path->complete-path scheme-dir))))))
+ (hash-set! ht 'make-boot-scheme-dir scheme-dir)
+ 
++(define (infer-target-machine)
++  ;; Compute a native or pbarch machine string for the current platform.
++  ;; Some caveats:
++  ;;  1. A pbarch Racket will always infer a pbarch machine,
++  ;;     even if a native machine exists. Hopefully this is an
++  ;;     unlikely scenario: if you're running Racket CS, you've
++  ;;     bootstrapped Chez somehow, so you could use `re.boot`.
++  ;;  2. A `tpb` or `pb` Racket on a 32-bit platform would still return
++  ;;     64 from `(system-type 'word)`, but, in addition to the above,
++  ;;     it is not currently possible or desired to build Racket as
++  ;;     `tpb` or `pb` (as opposed to pbarch variants):
++  ;;     see <https://github.com/racket/racket/issues/4692>.
++  ;;  3. On a hypothetical platform where Chez supported both the
++  ;;     architecture and the OS, but not the combination of the two,
++  ;;     (e.g. riscv64 Windows) this code would currently return a
++  ;;     non-existent native machine (e.g. trv64nt) instead of a
++  ;;     working pbarch machine. Presumably this could be fixed if
++  ;;     such a platform came into existence.
++  (define s (path->string (system-library-subpath #f)))
++  (define arch+os
++    (cond
++      [(regexp-match #rx"^([^\\]+)\\\\([^\\]+)$" s)
++       => (λ (m)
++            (reverse (cdr m)))]
++      [(regexp-match #rx"^([^-]+)-(.+)$" s)
++       => cdr]
++      [else
++       (error 'infer-target-machine "unknown format for system library subpath"
++              "produced" (system-library-subpath #f))]))
++  (define arch
++    (case (car arch+os)
++      [("x86_64" "amd64") "a6"] ; https://github.com/racket/racket/issues/4691
++      [("i386") "i3"]
++      [("aarch64") "arm64"]
++      [("arm") "arm32"]
++      [("ppc") "ppc32"]
++      [("riscv64") "rv64"]
++      [("unknown") #f] ; pb machine types
++      [else #f]))
++  (define os
++    (case (cadr arch+os)
++      [("macosx" "darwin" "ios") "osx"]
++      [("win32" "cygwin") "nt"]
++      [("linux" "android") "le"]
++      [("gnu-hurd") "gnu"]
++      [("freebsd") "fb"]
++      [("openbsd") "ob"]
++      [("netbsd") "nb"]
++      [("solaris") "s2"] ; NOT "sunos4" (I think)
++      [("qnx") "qnx"]
++      [("unknown") #f] ; pb machine types
++      [else #f]))
++  (if (and arch os)
++      (string-append "t" arch os)
++      (format "tpb~a~a"
++              (system-type 'word)
++              (if (system-big-endian?)
++                  "b"
++                  "l"))))
++
+ (define target-machine (or (hash-ref ht 'make-boot-targate-machine #f)
+                            (getenv "MACH")
+-                           (case (system-type)
+-                             [(macosx) (if (eqv? 64 (system-type 'word))
+-                                           "ta6osx"
+-                                           "ti3osx")]
+-                             [(windows) (if (eqv? 64 (system-type 'word))
+-                                           "ta6nt"
+-                                           "ti3nt")]
+-                             [else
+-                              (case (path->string (system-library-subpath #f))
+-                                [("x86_64-linux") "ta6le"]
+-                                [("i386-linux") "ti3le"]
+-                                [else #f])])))
++                           (infer-target-machine)))
+ (hash-set! ht 'make-boot-targate-machine target-machine)
+ 
+ (define optimize-level-init 3)
+-- 
+2.41.0
+
diff --git a/gnu/packages/patches/racket-rktboot-riscv64-support.patch b/gnu/packages/patches/racket-rktboot-riscv64-support.patch
deleted file mode 100644
index f268b1e7f8..0000000000
--- a/gnu/packages/patches/racket-rktboot-riscv64-support.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Submitted upstream:
-https://github.com/racket/racket/pull/4703
-
-diff --git a/racket/src/rktboot/machine-def.rkt b/racket/src/rktboot/machine-def.rkt
-index 8ff0688..59ebfc8 100644
---- a/racket/src/rktboot/machine-def.rkt
-+++ b/racket/src/rktboot/machine-def.rkt
-@@ -25,6 +25,7 @@
-                                      [(regexp-match? #rx"^t?arm32" target-machine) "arm32"]
-                                      [(regexp-match? #rx"^t?arm64" target-machine) "arm64"]
-                                      [(regexp-match? #rx"^t?ppc32" target-machine) "ppc32"]
-+                                     [(regexp-match? #rx"^t?rv64" target-machine) "rv64"]
-                                      [(regexp-match? #rx"^t?pb" target-machine) "pb"]
-                                      [else (error "machine.def: cannot infer architecture")]))]
-                [s (regexp-replace* #rx"[$][(]Mend[)]" s
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 03abd7cc41..b6ab687a21 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -190,7 +190,7 @@ (define-module (gnu packages racket)
 ;;
 ;; CODE:
 
-(define %racket-version "8.9") ; Remember to update chez-scheme-for-racket!
+(define %racket-version "8.10") ; Remember to update chez-scheme-for-racket!
 (define %zuo-version "1.6") ; defined in racket/src/zuo/zuo.c
 (define %racket-commit
   (string-append "v" %racket-version))
@@ -201,10 +201,10 @@ (define %racket-origin
           (url "https://github.com/racket/racket")
           (commit %racket-commit)))
     (sha256
-     (base32 "120djvscm2x1nv46is0kzwahd22rcc8gc0ssf12jnj7w290dpmra"))
+     (base32 "0xhra47lnz5aq2shvsil4vcravai4n86r4v1lza7r07n6s1pb9s5"))
     (file-name (git-file-name "racket" %racket-version))
     (patches (search-patches "racket-chez-scheme-bin-sh.patch"
-                             "racket-rktboot-riscv64-support.patch"
+                             "racket-backport-8.10-rktboot.patch"
                              "racket-rktio-bin-sh.patch"
                              "racket-zuo-bin-sh.patch"))
     (modules '((guix build utils)))
@@ -699,7 +699,7 @@ (define-public racket
        "contract-profile" (base32 "1xm2z8g0dpv5d9h2sg680vx1a8ix9gbsdpxxb8qv1w7akp73paj3")
        '(("contract-profile" ".")))
       (simple-racket-origin
-       "data" (base32 "08sj4m0g0cp7gwb0nq90m770f0c21b7ydif7nljc8rxmcdprfisc")
+       "data" (base32 "1pml8g3zgvnaiqb659psh99m70v96m6nh9zash2vfgir46j4rjnh")
        '("data" "data-doc" "data-enumerate-lib" "data-lib"))
       (simple-racket-origin
        "datalog" (base32 "0nf6cy4djpyhfvgpa6yn72apbz9s83gp0qg95pzjd0az4v6qwq1s")
@@ -708,7 +708,7 @@ (define-public racket
        "db" (base32 "0xx0k8yw2vb9b4vk2dwjfbpixnmriqsv7kpv3fvfxbwyg42y0db5")
        '("db" "db-doc" "db-lib"))
       (simple-racket-origin
-       "deinprogramm" (base32 "0iv14kig8w6kwxxmcfsxskk6x7a4kgzppzgyznzgy1mk6p5rxbjg")
+       "deinprogramm" (base32 "0889154ssw56aq6iqxnzgjram9x6c64sscjzrhr4077vnv4h1c93")
        '("deinprogramm" "deinprogramm-signature"))
       (simple-racket-origin
        "distributed-places" (base32 "1dajpkj9balqcpv6cdk9hwjz592h1vq8rrx5vncariiac4vbdpa0")
@@ -717,7 +717,7 @@ (define-public racket
        "draw" (base32 "0vf40hp6h14zgs0gx40jzdzxm4ai1vxwpmg65y00lwmdxc97b2ji")
        '("draw" "draw-doc" "draw-lib"))
       (simple-racket-origin
-       "drracket" (base32 "1b2fammrkb01kglf0n1rzdq2ngay4adnjh3gdmnza7mxz09y35m2")
+       "drracket" (base32 "0haban4fysr8i2w071nra9s97zkrrx5f5c874r9pr2k9bhqcp4jq")
        '("drracket"
          "drracket-plugin-lib"
          "drracket-tool"
@@ -751,13 +751,13 @@ (define-public racket
        "games" (base32 "0kpn3izlx1ccd0pj0dnvmnrhny51b85xy418a7psj70lz8j8415d")
        '(("games" ".")))
       (simple-racket-origin
-       "gui" (base32 "01ydlr10gkdm66x1gx3im5lwiap0ssiph8nmaisv0xrnrirbnp51")
+       "gui" (base32 "1s2a8qgm7dqpxyi9plshdbaxzd8klc80i8ppjpc5i5xyhcfmzyvf")
        '("gui" "gui-doc" "gui-lib" "tex-table"))
       (simple-racket-origin
        "gui-pkg-manager" (base32 "1ji9448d723nklqvycwdswj0ni28sabrncag14f9mx47did5myb5")
        '("gui-pkg-manager-lib"))
       (simple-racket-origin
-       "htdp" (base32 "1qnnnh9d9kjzlaasql7gi0h8z893bzb9kffay00mwg2j0bfzsf2s")
+       "htdp" (base32 "0kd92rg8m8my11pq1dxvv6dyban77j6kvs368xsl6fr52jd7zbkl")
        '("htdp" "htdp-doc" "htdp-lib"))
       (simple-racket-origin
        "html" (base32 "18n1jnjgzfknc8nv8dppi85nb8q08gqdwkg6hfjk08x0p00anx2x")
@@ -781,7 +781,7 @@ (define-public racket
        "make" (base32 "10852fj30bz5r46c3d99s37fkgy5yh44gb01j29sf3kxnhi0g2sa")
        '(("make" ".")))
       (simple-racket-origin
-       "math" (base32 "1qz4k6iwbrf9l7dhivrznghrpbqhxx14yczkgqpkz6yqawi642x9")
+       "math" (base32 "1l0r4xpbbjz0b2s6v3kn490zgs2q1dnj3ga95y1505jmcwgb2hl9")
        '("math" "math-doc" "math-lib"))
       (simple-racket-origin
        "mysterx" (base32 "11p9jzrafw0hizhl0cs4sxx7rv281185q8hryic2rpk0kzjdyr48")
@@ -799,7 +799,7 @@ (define-public racket
                              (url "https://github.com/RenaissanceBug/racket-cookies")
                              (commit %racket-commit)))
                        (sha256 (base32
-                                "0k0hifxhywl5c3hjcaiizc098dpyk001d981p572gly116yvjxc1"))
+                                "05lnml9nszcq72k8bi4iwdyplp2iv23ywb2gmrs2hr8837fqi65y"))
                        (file-name
                         (git-file-name "RenaissanceBug-racket-cookies" %racket-version)))
        '("net-cookies" "net-cookies-doc" "net-cookies-lib"))
@@ -825,7 +825,7 @@ (define-public racket
        "pconvert" (base32 "00czi0p399mmyrvxyrs5kniizpkqfxyz2ncxqi2jy79a7wk79pb1")
        '("pconvert-lib"))
       (simple-racket-origin
-       "pict" (base32 "0j6m95pq523pz526d7my8b3cg8a3jssag2mafxcq531prlnzq9sq")
+       "pict" (base32 "1vsn91r167wssaflzz080nsrcf0jfhl2a48zcj9hvdb77arbj8kc")
        '("pict" "pict-doc" "pict-lib"))
       (simple-racket-origin
        "pict-snip" (base32 "081nwiy4a0n4f7xws16hqbhf0j3kz5alizndi3nnyr3chm4kng6x")
@@ -840,7 +840,7 @@ (define-public racket
        "planet" (base32 "0r2yqrzrmdjjyr14k6hhlzc5kzrcx3583m1s02mhrcmpfw0s85w9")
        '("planet" "planet-doc" "planet-lib"))
       (simple-racket-origin
-       "plot" (base32 "13i6cwkscb4j6zmdc122iidmykwpxfk8xjmq09c6gv77slfynivl")
+       "plot" (base32 "1p0jxrwdwkb7z6ppp2ccpdzmizjimfpkdgilvbgv8x6mmqf0bf6q")
        '("plot" "plot-compat" "plot-doc" "plot-gui-lib" "plot-lib"))
       (simple-racket-origin
        "preprocessor" (base32 "1p5aid58ifnjy4xl0ysh85cq39k25661v975jrpk182z3k5621mg")
@@ -876,7 +876,7 @@ (define-public racket
                          (git-file-name "jeapostrophe-racket-cheat" %racket-version)))
        '(("racket-cheat" ".")))
       (simple-racket-origin
-       "racklog" (base32 "0fbq0fpfb3l6h7h772dvkmlzlk2dnq5f8296xx1qxhhwypibqzr9")
+       "racklog" (base32 "0fr8xij0sssfnmwn6dfdi4jj3l62f2yj3jrjljv13kaycrfls032")
        '(("racklog" ".")))
       (simple-racket-origin
        "rackunit" (base32 "03v1yvqgk3f65caqiwnadq00sjbg813ic949hys29f4c8mxz6gic")
@@ -895,7 +895,7 @@ (define-public racket
        "realm" (base32 "0rlvwyd6rpyl0zda4a5p8dp346fvqzc8555dgfnrhliymkxb6x4g")
        '(("realm" ".")))
       (simple-racket-origin
-       "redex" (base32 "16kyi4nxxi4a05gjarb9dayysg032vsad5mmwn1j6d6yxxhbw9jr")
+       "redex" (base32 "00pm0pj3h19a9dar4pzdn8q5l7bvl92q9gkh04k1ddlcx4af1m10")
        '("redex"
          "redex-benchmark"
          "redex-doc"
@@ -910,7 +910,7 @@ (define-public racket
        "scheme-lib" (base32 "0pcf0y8rp4qyjhaz5ww5sr5diq0wpcdfrrnask7zapyklzx1jx8x")
        '(("scheme-lib" ".")))
       (simple-racket-origin
-       "scribble" (base32 "06q5jhfblps47ly9fv5pkcz3nk8akfgad9ank32dh1svagq9plzf")
+       "scribble" (base32 "1jnbvl98yn8dhblcx411jybd879g4aj6d136xi23i4zwwrbsiy6m")
        '("scribble"
          "scribble-doc"
          "scribble-html-lib"
@@ -936,13 +936,13 @@ (define-public racket
        "slatex" (base32 "0pkm2isbbdk63slrbsxcql7rr0wdrw5kapw1xq4ps5k8dhlzv8x0")
        '(("slatex" ".")))
       (simple-racket-origin
-       "slideshow" (base32 "0phq0mvy0dh8hhbhxhmsini286dyggy6cgxq7mcwj4n2sbw38sas")
+       "slideshow" (base32 "0hmg5184cpxjb0ni6v2zkf4l29j8yyzm9pzv1gvmw2fm1rlrry4f")
        '("slideshow" "slideshow-doc" "slideshow-exe" "slideshow-lib" "slideshow-plugin"))
       (simple-racket-origin
-       "snip" (base32 "1j7sk364w2cggr4i5my1p2ibyvslrnj45xwxhihx6zypkbk59c3m")
+       "snip" (base32 "1b90ccqilnyszbphms3svm3c7dbk7870ifybjjipss5srb32mj2d")
        '("snip" "snip-lib"))
       (simple-racket-origin
-       "typed-racket" (base32 "0iz62xy2grkwyi4krz0chi3fswg74zd5s5jpdqyhxhdqq3gcscp0")
+       "typed-racket" (base32 "1721qgk1fplzwcgidg342anvykr88prvl1jag4vg8qxz8m28wi08")
        '("source-syntax"
          "typed-racket"
          "typed-racket-compatibility"
@@ -953,13 +953,13 @@ (define-public racket
        "srfi" (base32 "0rvx49ni1v8ikbx1a6qg97pprpkxmy7cgl918f52hq7jlx91b71x")
        '("srfi" "srfi-doc" "srfi-lib" "srfi-lite-lib"))
       (simple-racket-origin
-       "string-constants" (base32 "1lxab9323xmxqs4mxbgr504xgcgsf9dvx2xsb4p92fjzsif0d64y")
+       "string-constants" (base32 "1jxbh91x1r65lahjlix61rmkjikcam2k5w97xj8r7p7z05240dih")
        '("string-constants" "string-constants-doc" "string-constants-lib"))
       (simple-racket-origin
        "swindle" (base32 "1q8vdxpzczzwdw2mys2caab45yvadmqkixsr29k8pl03n8dsg8j9")
        '(("swindle" ".")))
       (simple-racket-origin
-       "syntax-color" (base32 "03fjmpww2958sryicrrcrpqwq6ibslfxd86ckl1mgafm3kr02qhp")
+       "syntax-color" (base32 "0lcv6glhsx27lkz7wwalzgfr0nb0hdqjic54z3rcfxhag4p6sg8i")
        '("syntax-color" "syntax-color-doc" "syntax-color-lib"))
       (simple-racket-origin
        "trace" (base32 "070ihla5j796hdarn5wxdwn4xj0xnkm50shgh49jy994mribvhia")
@@ -968,7 +968,7 @@ (define-public racket
        "unix-socket" (base32 "02dfwas5ynbpyz74w9kwb4wgb37y5wys7svrlmir8k0n9ph9vq0y")
        '("unix-socket" "unix-socket-doc" "unix-socket-lib"))
       (simple-racket-origin
-       "web-server" (base32 "0xfg0n0rg1g5rbqq4mm0qjgqkkrgm3ilzkffga2bjx253jrrrcai")
+       "web-server" (base32 "0sizb50rbnqmdx8igpqshj0hzsqyg30faf7wb9fs08sjs0lqkgsf")
        '("web-server" "web-server-doc" "web-server-lib"))
       (simple-racket-origin
        "wxme" (base32 "1qp5gr9gqsakiq3alw6m4yyv5vw4i3hp4y4nhq8vl2nkjmirvn0b")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#65482] [PATCH 2/3] gnu: racket: Declare OpenSSL search paths.
  2023-08-24  0:05 [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10 Philip McGrath
  2023-08-24  0:08 ` [bug#65482] [PATCH 1/3] " Philip McGrath
@ 2023-08-24  0:08 ` Philip McGrath
  2023-08-24  0:08 ` [bug#65482] [PATCH 3/3] gnu: chez-scheme-for-racket-bootstrap-bootfiles: Remove workaround Philip McGrath
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Philip McGrath @ 2023-08-24  0:08 UTC (permalink / raw)
  To: 65482; +Cc: Tim Johann, Efraim Flashner, Philip McGrath

Otherwise, OpenSSL used via Racket fails to find certificates, e.g. when
attempting to run 'raco pkg install'.

Fixes <https://racket.discourse.group/t/2206/8>.

* gnu/packages/racket.scm (racket-minimal)[native-search-paths]: Add
$SSL_CERT_DIR and $SSL_CERT_FILE.
---
 gnu/packages/racket.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index b6ab687a21..1e97f19dbb 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -29,6 +29,7 @@ (define-module (gnu packages racket)
   #:use-module (guix build-system gnu)
   #:use-module (guix diagnostics)
   #:use-module (guix i18n)
+  #:use-module ((guix search-paths) #:select ($SSL_CERT_DIR $SSL_CERT_FILE))
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
@@ -553,6 +554,7 @@ (define-public racket-minimal
             "base" %racket-origin
             '(("base" "pkgs/base")
               ("racket-lib" "pkgs/racket-lib")))))
+    (native-search-paths (list $SSL_CERT_DIR $SSL_CERT_FILE))
     (build-system gnu-build-system)
     (arguments
      ;; Here and for the `racket` package, we're using #:configure-flags
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#65482] [PATCH 3/3] gnu: chez-scheme-for-racket-bootstrap-bootfiles: Remove workaround.
  2023-08-24  0:05 [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10 Philip McGrath
  2023-08-24  0:08 ` [bug#65482] [PATCH 1/3] " Philip McGrath
  2023-08-24  0:08 ` [bug#65482] [PATCH 2/3] gnu: racket: Declare OpenSSL search paths Philip McGrath
@ 2023-08-24  0:08 ` Philip McGrath
  2023-08-31 19:16 ` [bug#65482] Racket 8.10 on aarch64 Tim Johann
  2023-09-03  1:59 ` [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10 Philip McGrath
  4 siblings, 0 replies; 10+ messages in thread
From: Philip McGrath @ 2023-08-24  0:08 UTC (permalink / raw)
  To: 65482; +Cc: Tim Johann, Efraim Flashner, Philip McGrath

Architecture autodetection in rktboot was fixed upstream, and the fix is
included in racket-backport-8.10-rktboot.patch for Guix. This commit
goes beyond reverting b4fbeae3d90a5d0f8146441772436df2eb471491: the
upstream fix also supports 'pbarch' machine types, so we never need to
supply a '--machine' argument to rktboot.

* gnu/packages/chez.scm (chez-scheme-for-racket-bootstrap-bootfiles)
[arguments]: Change 'build' phase to never use '--machine' for rktboot.
---
 gnu/packages/chez.scm | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index e5694ec1cf..3f53beac1a 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -691,13 +691,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles
                       #~(invoke
                          (search-input-file (or native-inputs inputs)
                                             "/opt/racket-vm/bin/racket")
-                         "../rktboot/main.rkt"
-                         ;; Temporary handling of builds on non-x86 architectures,
-                         ;; see https://github.com/racket/racket/issues/3948
-                         ;; Autodetect in rktboot only addresses x86 archs, so far.
-                         #$@(let ((m (or (racket-cs-native-supported-system?)
-                                         (nix-system->pbarch-machine-type))))
-                              #~("--machine" #$m))))))))))))
+                         "../rktboot/main.rkt"))))))))))
     (supported-systems
      (package-supported-systems chez-scheme-for-racket))
     (home-page "https://github.com/racket/ChezScheme")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#65482] Racket 8.10 on aarch64
  2023-08-24  0:05 [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10 Philip McGrath
                   ` (2 preceding siblings ...)
  2023-08-24  0:08 ` [bug#65482] [PATCH 3/3] gnu: chez-scheme-for-racket-bootstrap-bootfiles: Remove workaround Philip McGrath
@ 2023-08-31 19:16 ` Tim Johann
  2023-09-03  1:59 ` [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10 Philip McGrath
  4 siblings, 0 replies; 10+ messages in thread
From: Tim Johann @ 2023-08-31 19:16 UTC (permalink / raw)
  To: 65482


[-- Attachment #1.1: Type: text/plain, Size: 291 bytes --]

Hi Philip,

Sorry for the late reply.

I can confirm that Racket 8.10 builds flawlessly on aarch64 (tested on a
Raspberry Pi 4B+ 8GB, took quite a while to build).  I rebased the patches on
commit b51e45d3aa, i.e. I refreshed the Guix sources yesterday.

Thank you for all your work.

- Tim

[-- Attachment #1.2: Type: text/html, Size: 1420 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10.
  2023-08-24  0:05 [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10 Philip McGrath
                   ` (3 preceding siblings ...)
  2023-08-31 19:16 ` [bug#65482] Racket 8.10 on aarch64 Tim Johann
@ 2023-09-03  1:59 ` Philip McGrath
  2023-09-04 14:17   ` Efraim Flashner
  4 siblings, 1 reply; 10+ messages in thread
From: Philip McGrath @ 2023-09-03  1:59 UTC (permalink / raw)
  To: 65482; +Cc: Tim Johann, Efraim Flashner

tags 65482 + security
quit

On 8/23/23 20:05, Philip McGrath wrote:
> Hi,
> 
> In addition to updating Racket to 8.10, this patch series backports fixes
> merged upstream for rktboot on architectures other than x86_64 and removes
> a corresponding workaround from the Guix packaging.
> 
> Efraim and Tim, I'm CC'ing you because of your recent patches for rktboot on
> aarch64 and riscv64: it would be great if you could confirm that this series
> works on those architectures. It would also be useful to test powerpc64le,
> especially since it is supported via 'pbarch', which takes some different
> branches.
> 

Apparently Racket 8.10 fixes a notable security vulnerability related to 
module path parsing. There's an initial post at 
<https://github.com/racket/racket/issues/4731>, but they're not 
publishing the details of how to exploit the vulnerability until more 
people have had a chance to upgrade. (I don't think I fully understand 
the implications of the issue myself.)

Also, Tim, thanks for testing! I seem not to have gotten your mail, but 
I saw it on the tracker just now.

Philip

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10.
  2023-09-03  1:59 ` [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10 Philip McGrath
@ 2023-09-04 14:17   ` Efraim Flashner
  2023-09-04 21:21     ` Philip McGrath
  0 siblings, 1 reply; 10+ messages in thread
From: Efraim Flashner @ 2023-09-04 14:17 UTC (permalink / raw)
  To: Philip McGrath; +Cc: Tim Johann, 65482

[-- Attachment #1: Type: text/plain, Size: 2920 bytes --]

On Sat, Sep 02, 2023 at 09:59:23PM -0400, Philip McGrath wrote:
> tags 65482 + security
> quit
> 
> On 8/23/23 20:05, Philip McGrath wrote:
> > Hi,
> > 
> > In addition to updating Racket to 8.10, this patch series backports fixes
> > merged upstream for rktboot on architectures other than x86_64 and removes
> > a corresponding workaround from the Guix packaging.
> > 
> > Efraim and Tim, I'm CC'ing you because of your recent patches for rktboot on
> > aarch64 and riscv64: it would be great if you could confirm that this series
> > works on those architectures. It would also be useful to test powerpc64le,
> > especially since it is supported via 'pbarch', which takes some different
> > branches.
> > 
> 
> Apparently Racket 8.10 fixes a notable security vulnerability related to
> module path parsing. There's an initial post at
> <https://github.com/racket/racket/issues/4731>, but they're not publishing
> the details of how to exploit the vulnerability until more people have had a
> chance to upgrade. (I don't think I fully understand the implications of the
> issue myself.)
> 
> Also, Tim, thanks for testing! I seem not to have gotten your mail, but I
> saw it on the tracker just now.

Sorry for just getting to this now. As far as it working on riscv64, the
test suite for racket didn't pass before, so there's no real possibility
of regression on Guix's end. Currently it fails while building
chez-scheme-for-racket-9.9.9-pre-release.17, but if upstream didn't
notice then that's something else.

starting phase `configure'
source directory: "/tmp/guix-build-chez-scheme-for-racket-9.9.9-pre-release.17.drv-0/source/racket/src/ChezScheme" (relative from build: "../ChezScheme")
build directory: "/tmp/guix-build-chez-scheme-for-racket-9.9.9-pre-release.17.drv-0/source/racket/src/build"
configure flags: ("--disable-x11" "--threads" "-m=trv64le" "--installcsug=/gnu/store/c66pkyb1kvbi0jn1shanxrzbjvfqjmqf-chez-scheme-for-racket-9.9.9-pre-release.17-doc/share/doc/chez-scheme-for-racket-9.9.9-pre-release.17/csug" "--installreleasenotes=/gnu/store/c66pkyb1kvbi0jn1shanxrzbjvfqjmqf-chez-scheme-for-racket-9.9.9-pre-release.17-doc/share/doc/chez-scheme-for-racket-9.9.9-pre-release.17/release_notes" "--installprefix=/gnu/store/bqjwn04ix8xd9bwdni861244yza75qrf-chez-scheme-for-racket-9.9.9-pre-release.17" "ZLIB=-lz" "LZ4=-llz4" "--libkernel" "--nogzip-man-pages")
No suitable machine type found in "../ChezScheme/boot".

Available machine types:
  tpb64l

See "../ChezScheme/BUILDING" for ways of getting boot files.

I'll see about fixing the missing files or configure options. Don't let
it not building on riscv64 delay this update though.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10.
  2023-09-04 14:17   ` Efraim Flashner
@ 2023-09-04 21:21     ` Philip McGrath
  2023-09-08  6:12       ` bug#65482: " Efraim Flashner
  0 siblings, 1 reply; 10+ messages in thread
From: Philip McGrath @ 2023-09-04 21:21 UTC (permalink / raw)
  To: Efraim Flashner, 65482, Tim Johann

Hi,

On 9/4/23 10:17, Efraim Flashner wrote:
> On Sat, Sep 02, 2023 at 09:59:23PM -0400, Philip McGrath wrote:
>> tags 65482 + security
>> quit
>>
>> On 8/23/23 20:05, Philip McGrath wrote:
>>> Hi,
>>>
>>> In addition to updating Racket to 8.10, this patch series backports fixes
>>> merged upstream for rktboot on architectures other than x86_64 and removes
>>> a corresponding workaround from the Guix packaging.
>>>
>>> [...]
> 
> Sorry for just getting to this now. As far as it working on riscv64, the
> test suite for racket didn't pass before, so there's no real possibility
> of regression on Guix's end. Currently it fails while building
> chez-scheme-for-racket-9.9.9-pre-release.17, but if upstream didn't
> notice then that's something else.
> 
> starting phase `configure'
> source directory: "/tmp/guix-build-chez-scheme-for-racket-9.9.9-pre-release.17.drv-0/source/racket/src/ChezScheme" (relative from build: "../ChezScheme")
> build directory: "/tmp/guix-build-chez-scheme-for-racket-9.9.9-pre-release.17.drv-0/source/racket/src/build"
> configure flags: ("--disable-x11" "--threads" "-m=trv64le" "--installcsug=/gnu/store/c66pkyb1kvbi0jn1shanxrzbjvfqjmqf-chez-scheme-for-racket-9.9.9-pre-release.17-doc/share/doc/chez-scheme-for-racket-9.9.9-pre-release.17/csug" "--installreleasenotes=/gnu/store/c66pkyb1kvbi0jn1shanxrzbjvfqjmqf-chez-scheme-for-racket-9.9.9-pre-release.17-doc/share/doc/chez-scheme-for-racket-9.9.9-pre-release.17/release_notes" "--installprefix=/gnu/store/bqjwn04ix8xd9bwdni861244yza75qrf-chez-scheme-for-racket-9.9.9-pre-release.17" "ZLIB=-lz" "LZ4=-llz4" "--libkernel" "--nogzip-man-pages")
> No suitable machine type found in "../ChezScheme/boot".
> 
> Available machine types:
>    tpb64l
> 
> See "../ChezScheme/BUILDING" for ways of getting boot files.
> 
> I'll see about fixing the missing files or configure options. Don't let
> it not building on riscv64 delay this update though.
> 

Thanks for this report! I would have expected that to work, and it's 
tricky to test without hardware.

Before getting into the weeds, I agree with you that it shouldn't block 
the update, especially if it was already broken. I'm not a Guix 
committer, but as far as I'm concerned this series is ready to merge.

As far as riscv64, it looks like 
chez-scheme-for-racket-bootstrap-bootfiles created "portable bytecode" 
bootfiles ("tpb64l") instead of native riscv64 ones. You can confirm if 
that is the problem (or at least *a* problem) by checking if the 
lib/chez-scheme-bootfiles directory in the bootstrap package's output 
contains a directory named "tpb64l" instead of "trv64le".

If that is indeed the problem, most likely either there is a bug in my 
change to rktboot's auto-detection or there were additional 
auto-detection bugs I didn't find.

One way things could have gone wrong is if Racket BC returned something 
unexpected from (system-library-subpath #f). It would help to confirm 
the results of that, (system-type 'os*), and (system-type 'arch).

In principle, if the problem is only with rktboot's auto-detection, it 
should work to just keep supplying the explicit --machine flag for now, 
i.e. drop patch 3/3 from this series.

Racket doesn't have CI on riscv64 or distribute builds for it, but 
Matthew Flatt did share a nice screenshot earlier this summer of 
DrRacket running on a STAR64 :)

Philip




^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#65482: [PATCH 0/3] gnu: racket: Update to 8.10.
  2023-09-04 21:21     ` Philip McGrath
@ 2023-09-08  6:12       ` Efraim Flashner
  2023-09-11  4:32         ` [bug#65482] " Philip McGrath
  0 siblings, 1 reply; 10+ messages in thread
From: Efraim Flashner @ 2023-09-08  6:12 UTC (permalink / raw)
  To: Philip McGrath; +Cc: Tim Johann, 65482-done

[-- Attachment #1: Type: text/plain, Size: 4439 bytes --]

On Mon, Sep 04, 2023 at 05:21:54PM -0400, Philip McGrath wrote:
> Hi,
> 
> On 9/4/23 10:17, Efraim Flashner wrote:
> > On Sat, Sep 02, 2023 at 09:59:23PM -0400, Philip McGrath wrote:
> > > tags 65482 + security
> > > quit
> > > 
> > > On 8/23/23 20:05, Philip McGrath wrote:
> > > > Hi,
> > > > 
> > > > In addition to updating Racket to 8.10, this patch series backports fixes
> > > > merged upstream for rktboot on architectures other than x86_64 and removes
> > > > a corresponding workaround from the Guix packaging.
> > > > 
> > > > [...]
> > 
> > Sorry for just getting to this now. As far as it working on riscv64, the
> > test suite for racket didn't pass before, so there's no real possibility
> > of regression on Guix's end. Currently it fails while building
> > chez-scheme-for-racket-9.9.9-pre-release.17, but if upstream didn't
> > notice then that's something else.
> > 
> > starting phase `configure'
> > source directory: "/tmp/guix-build-chez-scheme-for-racket-9.9.9-pre-release.17.drv-0/source/racket/src/ChezScheme" (relative from build: "../ChezScheme")
> > build directory: "/tmp/guix-build-chez-scheme-for-racket-9.9.9-pre-release.17.drv-0/source/racket/src/build"
> > configure flags: ("--disable-x11" "--threads" "-m=trv64le" "--installcsug=/gnu/store/c66pkyb1kvbi0jn1shanxrzbjvfqjmqf-chez-scheme-for-racket-9.9.9-pre-release.17-doc/share/doc/chez-scheme-for-racket-9.9.9-pre-release.17/csug" "--installreleasenotes=/gnu/store/c66pkyb1kvbi0jn1shanxrzbjvfqjmqf-chez-scheme-for-racket-9.9.9-pre-release.17-doc/share/doc/chez-scheme-for-racket-9.9.9-pre-release.17/release_notes" "--installprefix=/gnu/store/bqjwn04ix8xd9bwdni861244yza75qrf-chez-scheme-for-racket-9.9.9-pre-release.17" "ZLIB=-lz" "LZ4=-llz4" "--libkernel" "--nogzip-man-pages")
> > No suitable machine type found in "../ChezScheme/boot".
> > 
> > Available machine types:
> >    tpb64l
> > 
> > See "../ChezScheme/BUILDING" for ways of getting boot files.
> > 
> > I'll see about fixing the missing files or configure options. Don't let
> > it not building on riscv64 delay this update though.
> > 
> 
> Thanks for this report! I would have expected that to work, and it's tricky
> to test without hardware.

Ah, yeah, QEMU is really good but there are definitely times it isn't
enough, and without real hardware it definitely falls into a "you want
it, you keep it working" category.

> Before getting into the weeds, I agree with you that it shouldn't block the
> update, especially if it was already broken. I'm not a Guix committer, but
> as far as I'm concerned this series is ready to merge.
> 
> As far as riscv64, it looks like chez-scheme-for-racket-bootstrap-bootfiles
> created "portable bytecode" bootfiles ("tpb64l") instead of native riscv64
> ones. You can confirm if that is the problem (or at least *a* problem) by
> checking if the lib/chez-scheme-bootfiles directory in the bootstrap
> package's output contains a directory named "tpb64l" instead of "trv64le".

That's what I saw when I looked. I've been poking a bunch of packages
recently so I don't remember exactly, but I think I tried building with
the tpb64l bytecode and there were some issues later on which made that
not work.

> If that is indeed the problem, most likely either there is a bug in my
> change to rktboot's auto-detection or there were additional auto-detection
> bugs I didn't find.
> 
> One way things could have gone wrong is if Racket BC returned something
> unexpected from (system-library-subpath #f). It would help to confirm the
> results of that, (system-type 'os*), and (system-type 'arch).
> 
> In principle, if the problem is only with rktboot's auto-detection, it
> should work to just keep supplying the explicit --machine flag for now, i.e.
> drop patch 3/3 from this series.

I've thought about it both ways, and since all the testing has been with
the third patch included I'm going to push all three patches and then
continue working on the riscv64 build.

> Racket doesn't have CI on riscv64 or distribute builds for it, but Matthew
> Flatt did share a nice screenshot earlier this summer of DrRacket running on
> a STAR64 :)

Patches pushed!

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10.
  2023-09-08  6:12       ` bug#65482: " Efraim Flashner
@ 2023-09-11  4:32         ` Philip McGrath
  0 siblings, 0 replies; 10+ messages in thread
From: Philip McGrath @ 2023-09-11  4:32 UTC (permalink / raw)
  To: Efraim Flashner, 65482

Hi,

On 9/8/23 02:12, Efraim Flashner wrote:
>>> build directory: "/tmp/guix-build-chez-scheme-for-racket-9.9.9-pre-release.17.drv-0/source/racket/src/build"
>>> configure flags: ("--disable-x11" "--threads" "-m=trv64le" "--installcsug=/gnu/store/c66pkyb1kvbi0jn1shanxrzbjvfqjmqf-chez-scheme-for-racket-9.9.9-pre-release.17-doc/share/doc/chez-scheme-for-racket-9.9.9-pre-release.17/csug" "--installreleasenotes=/gnu/store/c66pkyb1kvbi0jn1shanxrzbjvfqjmqf-chez-scheme-for-racket-9.9.9-pre-release.17-doc/share/doc/chez-scheme-for-racket-9.9.9-pre-release.17/release_notes" "--installprefix=/gnu/store/bqjwn04ix8xd9bwdni861244yza75qrf-chez-scheme-for-racket-9.9.9-pre-release.17" "ZLIB=-lz" "LZ4=-llz4" "--libkernel" "--nogzip-man-pages")
>>> No suitable machine type found in "../ChezScheme/boot".
>>>
>>> Available machine types:
>>>     tpb64l
>>>
>>> See "../ChezScheme/BUILDING" for ways of getting boot files.
>>>
>>> I'll see about fixing the missing files or configure options. Don't let
>>> it not building on riscv64 delay this update though.
>>>
>>
>> Thanks for this report! I would have expected that to work, and it's tricky
>> to test without hardware.
> 
> Ah, yeah, QEMU is really good but there are definitely times it isn't
> enough, and without real hardware it definitely falls into a "you want
> it, you keep it working" category.
> 

In one of my early attempts to test for ppc64, I thought everything was 
working, but I'd actually just been producing x64 binaries. Then QEMU 
was crashing when running Racket BC, perhaps because of some complicated 
tricks it plays with the stack.

>> Before getting into the weeds, I agree with you that it shouldn't block the
>> update, especially if it was already broken. I'm not a Guix committer, but
>> as far as I'm concerned this series is ready to merge.
>>
>> As far as riscv64, it looks like chez-scheme-for-racket-bootstrap-bootfiles
>> created "portable bytecode" bootfiles ("tpb64l") instead of native riscv64
>> ones. You can confirm if that is the problem (or at least *a* problem) by
>> checking if the lib/chez-scheme-bootfiles directory in the bootstrap
>> package's output contains a directory named "tpb64l" instead of "trv64le".
> 
> That's what I saw when I looked.

Ok, at least it's clear why this state doesn't work, even if still I 
don't know why we fall into this state. (Note the "-m=trv64le" in 
#:configure-flags for chez-scheme-for-racket, which correctly specifies 
that we want the native backend, even though rktboot produced the wrong 
set of bootfiles.

> I've been poking a bunch of packages
> recently so I don't remember exactly, but I think I tried building with
> the tpb64l bytecode and there were some issues later on which made that
> not work.
> 

A tpb64l build is supposed to work, but there are probably some rough 
edges. (In contrast, plain pb and tpb are not enough to be able to run 
Racket.) One thing I remember hearing is that the C compiler tends to 
take a long time on bootfiles compiled from bytecode to C, I guess 
because the C is large and strange-looking. Overall, I think you will 
have a better time getting the native backend to build.

>> If that is indeed the problem, most likely either there is a bug in my
>> change to rktboot's auto-detection or there were additional auto-detection
>> bugs I didn't find.
>>
>> One way things could have gone wrong is if Racket BC returned something
>> unexpected from (system-library-subpath #f). It would help to confirm the
>> results of that, (system-type 'os*), and (system-type 'arch).
>>

Here's a way to test that in one long line:

guix shell -e "(@ (gnu packages racket) racket-vm-bc)" -- sh -c 
"\${GUIX_ENVIRONMENT}/opt/racket-vm/bin/racket -e \"(list (path->string 
(system-library-subpath #f)) (system-type 'arch) (system-type 'os*))\""

On my machine, this prints '("x86_64-linux" x86_64 linux). On riscv64, I 
would expect it to produce '("riscv64-linux" riscv64 linux).

If it produces something else, then my part of 
racket-backport-8.10-rktboot.patch definitely wouldn't work. On the 
other hand, if the result is as expected, then presumably there's some 
other bug elsewhere in rktboot to be patched.

>> In principle, if the problem is only with rktboot's auto-detection, it
>> should work to just keep supplying the explicit --machine flag for now, i.e.
>> drop patch 3/3 from this series.
> 
> I've thought about it both ways, and since all the testing has been with
> the third patch included I'm going to push all three patches and then
> continue working on the riscv64 build.
> 
>> Racket doesn't have CI on riscv64 or distribute builds for it, but Matthew
>> Flatt did share a nice screenshot earlier this summer of DrRacket running on
>> a STAR64 :)
> 
> Patches pushed!
> 

Thanks!

Philip




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-09-11  4:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-24  0:05 [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10 Philip McGrath
2023-08-24  0:08 ` [bug#65482] [PATCH 1/3] " Philip McGrath
2023-08-24  0:08 ` [bug#65482] [PATCH 2/3] gnu: racket: Declare OpenSSL search paths Philip McGrath
2023-08-24  0:08 ` [bug#65482] [PATCH 3/3] gnu: chez-scheme-for-racket-bootstrap-bootfiles: Remove workaround Philip McGrath
2023-08-31 19:16 ` [bug#65482] Racket 8.10 on aarch64 Tim Johann
2023-09-03  1:59 ` [bug#65482] [PATCH 0/3] gnu: racket: Update to 8.10 Philip McGrath
2023-09-04 14:17   ` Efraim Flashner
2023-09-04 21:21     ` Philip McGrath
2023-09-08  6:12       ` bug#65482: " Efraim Flashner
2023-09-11  4:32         ` [bug#65482] " Philip McGrath

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).