* [bug#30603] Upgrade Racket to 6.12 @ 2018-02-25 5:42 Christopher Lemmer Webber 2018-02-26 1:19 ` Marius Bakke 2018-04-01 13:42 ` Christopher Lemmer Webber 0 siblings, 2 replies; 8+ messages in thread From: Christopher Lemmer Webber @ 2018-02-25 5:42 UTC (permalink / raw) To: 30603 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.1: 0001-gnu-racket-Update-to-6.12.patch --] [-- Type: text/x-patch, Size: 2356 bytes --] From e5244b9b0cabf9a4e30c3fb5bc144dbea10adc62 Mon Sep 17 00:00:00 2001 From: Christopher Lemmer Webber <cwebber@dustycloud.org> Date: Sat, 24 Feb 2018 18:36:13 -0600 Subject: [PATCH] gnu: racket: Update to 6.12. * gnu/packages/patches/racket-minus_zero_p-disable-xform.patch: New file. * gnu/packages/scheme.scm (racket): Update version and patch. --- gnu/packages/patches/racket-minus_zero_p-disable-xform.patch | 10 ++++++++++ gnu/packages/scheme.scm | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/racket-minus_zero_p-disable-xform.patch diff --git a/gnu/packages/patches/racket-minus_zero_p-disable-xform.patch b/gnu/packages/patches/racket-minus_zero_p-disable-xform.patch new file mode 100644 index 000000000..08887a616 --- /dev/null +++ b/gnu/packages/patches/racket-minus_zero_p-disable-xform.patch @@ -0,0 +1,10 @@ +--- a/src/racket/src/number.c 2018-02-24 18:16:32.031698079 -0600 ++++ b/src/racket/src/number.c 2018-02-24 18:15:41.055445301 -0600 +@@ -1775,6 +1775,7 @@ + } + + XFORM_NONGCING static MZ_INLINE int minus_zero_p(double d) ++ XFORM_SKIP_PROC + { + #ifdef MZ_IS_NEG_ZERO + return MZ_IS_NEG_ZERO(d); diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index d5286b312..b4cbb0a8a 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -404,7 +404,7 @@ implementation techniques and as an expository tool.") (define-public racket (package (name "racket") - (version "6.11") + (version "6.12") (source (origin (method url-fetch) (uri (list (string-append "http://mirror.racket-lang.org/installers/" @@ -414,7 +414,10 @@ implementation techniques and as an expository tool.") version "/racket-" version "-src.tgz"))) (sha256 (base32 - "1nk7705x24jjlbqqhj8yvbgqkfscxx3m81bry1g56kjxysjmf3sw")))) + "0cwcypzjfl9py1s695mhqkiapff7c1w29llsmdj7qgn58wl0apk5")) + (patches (search-patches + ;; See: https://github.com/racket/racket/issues/1962 + "racket-minus_zero_p-disable-xform.patch")))) (build-system gnu-build-system) (arguments '(#:phases -- 2.15.1 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#30603] Upgrade Racket to 6.12 2018-02-25 5:42 [bug#30603] Upgrade Racket to 6.12 Christopher Lemmer Webber @ 2018-02-26 1:19 ` Marius Bakke 2018-02-26 4:16 ` Danny Milosavljevic 2018-04-01 13:42 ` Christopher Lemmer Webber 1 sibling, 1 reply; 8+ messages in thread From: Marius Bakke @ 2018-02-26 1:19 UTC (permalink / raw) To: Christopher Lemmer Webber, 30603 [-- Attachment #1: Type: text/plain, Size: 437 bytes --] Christopher Lemmer Webber <cwebber@dustycloud.org> writes: > From e5244b9b0cabf9a4e30c3fb5bc144dbea10adc62 Mon Sep 17 00:00:00 2001 > From: Christopher Lemmer Webber <cwebber@dustycloud.org> > Date: Sat, 24 Feb 2018 18:36:13 -0600 > Subject: [PATCH] gnu: racket: Update to 6.12. > > * gnu/packages/patches/racket-minus_zero_p-disable-xform.patch: New file. > * gnu/packages/scheme.scm (racket): Update version and patch. LGTM, thanks! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#30603] Upgrade Racket to 6.12 2018-02-26 1:19 ` Marius Bakke @ 2018-02-26 4:16 ` Danny Milosavljevic 2018-02-26 16:33 ` Christopher Lemmer Webber 0 siblings, 1 reply; 8+ messages in thread From: Danny Milosavljevic @ 2018-02-26 4:16 UTC (permalink / raw) To: Christopher Lemmer Webber; +Cc: 30603 Hmmm... doesn't that break the GC? I would just remove MZ_IS_NEG_ZERO in the first place. There's a fallback in the caller... Or use a newer gcc so MZ_IS_NEG_ZERO expands to a builtin. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#30603] Upgrade Racket to 6.12 2018-02-26 4:16 ` Danny Milosavljevic @ 2018-02-26 16:33 ` Christopher Lemmer Webber 2018-03-05 17:54 ` Christopher Lemmer Webber 0 siblings, 1 reply; 8+ messages in thread From: Christopher Lemmer Webber @ 2018-02-26 16:33 UTC (permalink / raw) To: Danny Milosavljevic; +Cc: 30603 Danny Milosavljevic writes: > Hmmm... doesn't that break the GC? > > I would just remove MZ_IS_NEG_ZERO in the first place. There's a fallback in the caller... > > Or use a newer gcc so MZ_IS_NEG_ZERO expands to a builtin. Hm, maybe it does break the GC. I actually admittedly have no idea how the patch I applied "fixes" things... I was just miming the "solution" in: https://github.com/racket/racket/issues/464#issuecomment-26626089 I have filed my own issue but have not yet heard back: https://github.com/racket/racket/issues/1962 Danny, which of the suggestions you made do you think we should do? Maybe removing MZ_IS_NEG_ZERO is easier? I don't know what implications there are in bumping up gcc... ^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#30603] Upgrade Racket to 6.12 2018-02-26 16:33 ` Christopher Lemmer Webber @ 2018-03-05 17:54 ` Christopher Lemmer Webber 2018-03-06 9:07 ` Danny Milosavljevic 0 siblings, 1 reply; 8+ messages in thread From: Christopher Lemmer Webber @ 2018-03-05 17:54 UTC (permalink / raw) To: Danny Milosavljevic; +Cc: 30603 Christopher Lemmer Webber writes: > Danny Milosavljevic writes: > >> Hmmm... doesn't that break the GC? >> >> I would just remove MZ_IS_NEG_ZERO in the first place. There's a fallback in the caller... >> >> Or use a newer gcc so MZ_IS_NEG_ZERO expands to a builtin. > > Hm, maybe it does break the GC. I actually admittedly have no idea how > the patch I applied "fixes" things... I was just miming the "solution" > in: > > https://github.com/racket/racket/issues/464#issuecomment-26626089 > > I have filed my own issue but have not yet heard back: > > https://github.com/racket/racket/issues/1962 > > Danny, which of the suggestions you made do you think we should do? > Maybe removing MZ_IS_NEG_ZERO is easier? I don't know what implications > there are in bumping up gcc... I just discovered that this doesn't have to do with a new release of Racket, but some other dependency that Racket must be using (GCC?) that recently broke our ability to compile Racket, including Racket 6.11, the current Racket in Guix. I can't build it, and the error is the same kind of error as what I was getting with 6.12: Error [GCING] 1780 in ./../src/number.c: Function minus_zero_p declared __xform_nongcing__, but includes a function call at __signbitf128. Error [GCING] 1958 in ./../src/number.c: Function double_is_integer declared __xform_nongcing__, but includes a function call at __isinff128. Error [GCING] 4050 in ./../src/number.c: Function double_fits_fixnum declared __xform_nongcing__, but includes a function call at __isinff128. xform: Errors converting context...: /tmp/guix-build-racket-6.11.drv-0/racket-6.11/src/racket/gc2/xform-collects/compiler/private/xfor...:8:2: xform /tmp/guix-build-racket-6.11.drv-0/racket-6.11/src/racket/gc2/xform-collects/xform/xform-mod.rkt: [running body] /tmp/guix-build-racket-6.11.drv-0/racket-6.11/src/racket/gc2/xform.rkt: [running body] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#30603] Upgrade Racket to 6.12 2018-03-05 17:54 ` Christopher Lemmer Webber @ 2018-03-06 9:07 ` Danny Milosavljevic 0 siblings, 0 replies; 8+ messages in thread From: Danny Milosavljevic @ 2018-03-06 9:07 UTC (permalink / raw) To: Christopher Lemmer Webber; +Cc: 30603 [-- Attachment #1: Type: text/plain, Size: 1657 bytes --] Hi Christopher, I don't know how Racket does it but I wrote my own interpreters with GC and there, you have to know where references to objects can be found. In this case the references can be on the stack of the C functions as long as they are running. It turns out that in the version of gcc we use to compile racket, the sign checker for 128 bit floats (__signbitf128) is not a builtin (it's not emitting just an immediate assembly instruction) but rather is a C function - but the caller in Racket is marked as "don't bother looking for object references in there". As Racket supports arbitrary-precision numbers, a number might be an object and a part of that object might have been passed to __signbitf128. If the GC runs, it might be killing that object while it's still used inside __signbitf128 (in a loop or something). So the possible fixes are: (1) Do not use __signbitf128 (that is, "signbit") - there's a fallback which uses primitive operations that are guaranteed to be builtin (/). That's the non-invasive very safe change (s|MZ_IS_NEG_ZERO|MZ_IS_NEG_ZERO_DONOTUSE| at one place) - since from the outside the function would look exactly the same as if it used __signbitf128 - it's a leaf. (2) Remove the nogcing marker. That's the more invasive change which slightly changes how the GC root set looks - it should be safe enough anyway (if there are no bugs in the GC root set lookup :) ) (3) Use gcc-7. Given that Racket users probably use FFI to load other C libraries which aren't compiled with gcc-7, let's not do that. Please note that I didn't write Racket so take it with a grain of salt. [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#30603] Upgrade Racket to 6.12 2018-02-25 5:42 [bug#30603] Upgrade Racket to 6.12 Christopher Lemmer Webber 2018-02-26 1:19 ` Marius Bakke @ 2018-04-01 13:42 ` Christopher Lemmer Webber 2018-04-01 21:11 ` Danny Milosavljevic 1 sibling, 1 reply; 8+ messages in thread From: Christopher Lemmer Webber @ 2018-04-01 13:42 UTC (permalink / raw) To: 30603 [-- Attachment #1.1: Type: text/plain, Size: 372 bytes --] Okay... I worked upstream, and here's the upstream patch. If accepted this also closes out bug#30714. I've done this as two separate patches (one with my original patch and then one with the suggested update from upstream) because the patch doesn't apply automatically pre- 6.12 anyway, so it makes sense to patch with the minimalist patch, and then with the full fix. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.2: 0001-gnu-racket-Update-to-6.12.patch --] [-- Type: text/x-patch, Size: 2360 bytes --] From c4fca9eeb60ee4e2934e89e13054bf1338d1bb4a Mon Sep 17 00:00:00 2001 From: Christopher Lemmer Webber <cwebber@dustycloud.org> Date: Sat, 24 Feb 2018 18:36:13 -0600 Subject: [PATCH 1/2] gnu: racket: Update to 6.12. * gnu/packages/patches/racket-minus_zero_p-disable-xform.patch: New file. * gnu/packages/scheme.scm (racket): Update version and patch. --- gnu/packages/patches/racket-minus_zero_p-disable-xform.patch | 10 ++++++++++ gnu/packages/scheme.scm | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/racket-minus_zero_p-disable-xform.patch diff --git a/gnu/packages/patches/racket-minus_zero_p-disable-xform.patch b/gnu/packages/patches/racket-minus_zero_p-disable-xform.patch new file mode 100644 index 000000000..08887a616 --- /dev/null +++ b/gnu/packages/patches/racket-minus_zero_p-disable-xform.patch @@ -0,0 +1,10 @@ +--- a/src/racket/src/number.c 2018-02-24 18:16:32.031698079 -0600 ++++ b/src/racket/src/number.c 2018-02-24 18:15:41.055445301 -0600 +@@ -1775,6 +1775,7 @@ + } + + XFORM_NONGCING static MZ_INLINE int minus_zero_p(double d) ++ XFORM_SKIP_PROC + { + #ifdef MZ_IS_NEG_ZERO + return MZ_IS_NEG_ZERO(d); diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index 37593fe30..d89b123f1 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -405,7 +405,7 @@ implementation techniques and as an expository tool.") (define-public racket (package (name "racket") - (version "6.11") + (version "6.12") (source (origin (method url-fetch) (uri (list (string-append "http://mirror.racket-lang.org/installers/" @@ -415,7 +415,10 @@ implementation techniques and as an expository tool.") version "/racket-" version "-src.tgz"))) (sha256 (base32 - "1nk7705x24jjlbqqhj8yvbgqkfscxx3m81bry1g56kjxysjmf3sw")))) + "0cwcypzjfl9py1s695mhqkiapff7c1w29llsmdj7qgn58wl0apk5")) + (patches (search-patches + ;; See: https://github.com/racket/racket/issues/1962 + "racket-minus_zero_p-disable-xform.patch")))) (build-system gnu-build-system) (arguments '(#:phases -- 2.15.1 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.3: 0002-gnu-racket-Patch-xform-compilation-errors.patch --] [-- Type: text/x-patch, Size: 5184 bytes --] From 7b7ac7c3272aad8a9c56392ef6b62fcf47c1017b Mon Sep 17 00:00:00 2001 From: Christopher Lemmer Webber <cwebber@dustycloud.org> Date: Sun, 18 Mar 2018 14:41:04 -0500 Subject: [PATCH 2/2] gnu: racket: Patch xform compilation errors. * gnu/packages/patches/gnu/packages/patches/racket-fix-xform-issue.patch: Renamed from gnu/packages/patches/racket-minus_zero_p-disable-xform.patch. Switch to upstream patch in Racket. * gnu/packages/scheme.scm (racket): Update to renamed patch. --- gnu/packages/patches/racket-fix-xform-issue.patch | 63 ++++++++++++++++++++++ .../racket-minus_zero_p-disable-xform.patch | 10 ---- gnu/packages/scheme.scm | 3 +- 3 files changed, 65 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/racket-fix-xform-issue.patch delete mode 100644 gnu/packages/patches/racket-minus_zero_p-disable-xform.patch diff --git a/gnu/packages/patches/racket-fix-xform-issue.patch b/gnu/packages/patches/racket-fix-xform-issue.patch new file mode 100644 index 000000000..0a1640ee5 --- /dev/null +++ b/gnu/packages/patches/racket-fix-xform-issue.patch @@ -0,0 +1,63 @@ +050cdb59839896b41431791f8ee0ef2564231b8f +Author: Matthew Flatt <mflatt@racket-lang.org> +AuthorDate: Tue Mar 6 09:05:08 2018 -0700 +Commit: Matthew Flatt <mflatt@racket-lang.org> +CommitDate: Tue Mar 6 09:05:08 2018 -0700 + +Parent: efb9a919fc ffi docs: clarification on `unsafe-socket->port` +Containing: master +Follows: v5.0.1 (21612) + +xform: avoid problems with `__signbitf128` + +Closes #1962 and uses the suggested patch there, among other changes. + +2 files changed, 6 insertions(+), 3 deletions(-) +racket/collects/compiler/private/xform.rkt | 2 +- +racket/src/racket/src/number.c | 7 +++++-- + +diff --git a/racket/collects/compiler/private/xform.rkt b/racket/collects/compiler/private/xform.rkt +index 28a425c057..89ae848f9c 100644 +--- a/collects/compiler/private/xform.rkt ++++ b/collects/compiler/private/xform.rkt +@@ -904,7 +904,7 @@ + + strlen cos cosl sin sinl exp expl pow powl log logl sqrt sqrtl atan2 atan2l frexp + isnan isinf fpclass signbit _signbit _fpclass __fpclassify __fpclassifyf __fpclassifyl +- _isnan __isfinited __isnanl __isnan __signbit __signbitf __signbitd __signbitl ++ _isnan __isfinited __isnanl __isnan __signbit __signbitf __signbitd __signbitl __signbitf128 + __isinff __isinfl isnanf isinff __isinfd __isnanf __isnand __isinf __isinff128 + __inline_isnanl __inline_isnan __inline_signbit __inline_signbitf __inline_signbitd __inline_signbitl + __builtin_popcount __builtin_clz __builtin_isnan __builtin_isinf __builtin_signbit +diff --git a/racket/src/racket/src/number.c b/racket/src/racket/src/number.c +index 71f42aaf3c..3bbad3ba83 100644 +--- a/src/racket/src/number.c ++++ b/src/racket/src/number.c +@@ -1796,6 +1796,7 @@ double scheme_real_to_double(Scheme_Object *r) + } + + XFORM_NONGCING static MZ_INLINE int minus_zero_p(double d) ++ XFORM_SKIP_PROC + { + #ifdef MZ_IS_NEG_ZERO + return MZ_IS_NEG_ZERO(d); +@@ -1809,7 +1810,9 @@ int scheme_minus_zero_p(double d) + return minus_zero_p(d); + } + +-static int rational_dbl_p(double f) { ++XFORM_NONGCING static int rational_dbl_p(double f) ++ XFORM_SKIP_PROC ++{ + return !(MZ_IS_NAN(f) + || MZ_IS_INFINITY(f)); + } +@@ -1955,7 +1958,7 @@ real_p(int argc, Scheme_Object *argv[]) + return (SCHEME_REALP(o) ? scheme_true : scheme_false); + } + +-static int is_rational(const Scheme_Object *o) ++XFORM_NONGCING static int is_rational(const Scheme_Object *o) + { + if (SCHEME_FLOATP(o)) + return rational_dbl_p(SCHEME_FLOAT_VAL(o)); \ No newline at end of file diff --git a/gnu/packages/patches/racket-minus_zero_p-disable-xform.patch b/gnu/packages/patches/racket-minus_zero_p-disable-xform.patch deleted file mode 100644 index 08887a616..000000000 --- a/gnu/packages/patches/racket-minus_zero_p-disable-xform.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/racket/src/number.c 2018-02-24 18:16:32.031698079 -0600 -+++ b/src/racket/src/number.c 2018-02-24 18:15:41.055445301 -0600 -@@ -1775,6 +1775,7 @@ - } - - XFORM_NONGCING static MZ_INLINE int minus_zero_p(double d) -+ XFORM_SKIP_PROC - { - #ifdef MZ_IS_NEG_ZERO - return MZ_IS_NEG_ZERO(d); diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index d89b123f1..c9e1a1525 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -418,7 +418,8 @@ implementation techniques and as an expository tool.") "0cwcypzjfl9py1s695mhqkiapff7c1w29llsmdj7qgn58wl0apk5")) (patches (search-patches ;; See: https://github.com/racket/racket/issues/1962 - "racket-minus_zero_p-disable-xform.patch")))) + ;; This can be removed in whatever Racket release comes after 6.12 + "racket-fix-xform-issue.patch")))) (build-system gnu-build-system) (arguments '(#:phases -- 2.15.1 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#30603] Upgrade Racket to 6.12 2018-04-01 13:42 ` Christopher Lemmer Webber @ 2018-04-01 21:11 ` Danny Milosavljevic 0 siblings, 0 replies; 8+ messages in thread From: Danny Milosavljevic @ 2018-04-01 21:11 UTC (permalink / raw) To: Christopher Lemmer Webber; +Cc: 30603 [-- Attachment #1: Type: text/plain, Size: 18 bytes --] LGTM. Thanks! [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-04-01 21:12 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-02-25 5:42 [bug#30603] Upgrade Racket to 6.12 Christopher Lemmer Webber 2018-02-26 1:19 ` Marius Bakke 2018-02-26 4:16 ` Danny Milosavljevic 2018-02-26 16:33 ` Christopher Lemmer Webber 2018-03-05 17:54 ` Christopher Lemmer Webber 2018-03-06 9:07 ` Danny Milosavljevic 2018-04-01 13:42 ` Christopher Lemmer Webber 2018-04-01 21:11 ` Danny Milosavljevic
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.