From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4JCDH6zj/mL6TgEAbAwnHQ (envelope-from ) for ; Fri, 19 Aug 2022 03:13:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6FmFH6zj/mKLlQAA9RJhRA (envelope-from ) for ; Fri, 19 Aug 2022 03:13:16 +0200 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 A68D01767A for ; Fri, 19 Aug 2022 03:13:15 +0200 (CEST) Received: from localhost ([::1]:53068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOqZW-00053f-QX for larch@yhetil.org; Thu, 18 Aug 2022 21:13:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOqZK-00053U-Rh for guix-patches@gnu.org; Thu, 18 Aug 2022 21:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38930) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOqZK-00032U-Iv for guix-patches@gnu.org; Thu, 18 Aug 2022 21:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oOqZK-00082u-2n for guix-patches@gnu.org; Thu, 18 Aug 2022 21:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [RFC PATCH v2] gnu: racket: Backport fix for powerpc64le. Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 Aug 2022 01:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Philip McGrath Cc: 57050@debbugs.gnu.org, Liliana Marie Prikler , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166087154830885 (code B ref 57050); Fri, 19 Aug 2022 01:13:02 +0000 Received: (at 57050) by debbugs.gnu.org; 19 Aug 2022 01:12:28 +0000 Received: from localhost ([127.0.0.1]:56912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOqYk-000822-Vr for submit@debbugs.gnu.org; Thu, 18 Aug 2022 21:12:27 -0400 Received: from mx.kolabnow.com ([212.103.80.155]:23974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOqYg-00081l-DI for 57050@debbugs.gnu.org; Thu, 18 Aug 2022 21:12:24 -0400 Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 3169A1142; Fri, 19 Aug 2022 03:12:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:in-reply-to:date:date:subject:subject:from:from :references:received:received:received; s=dkim20160331; t= 1660871533; x=1662685934; bh=g33Qix8cTiSKQsXKvQK7GOvDcZQ17LHyQwm TVg7eNFc=; b=2zCXIAS2hvi17lOnASvoz5HcELGtFJaNOTtkgonWe9n4EHVEBW7 pumzP/V5FB33hPP2uGzKK1beHDDodHmBGmq6+LLcYWGk0wQi/dIO1tVDLSXFtuKf ccduusneoQLF6QLtoNEfn8X80rJaQAb5Lum2sAAkhYA76LNzLtEjIS0aEz0i96Fn +4IslTVHxFopV2bDT3pyTEmeKw6jDT95Kmnhe2y53n//RnTdwnhB2lG/2Mxyy5Ur 2LH2ggoXqJiXZsLKvkhXkzorsA6wP6nr4CMufgdW5t4xJRAtANf65wEdCJneKUaY HsbIhFG41Kcq8WJ6vv8ama/4IFsLc1y6xae0nVfqJt3laZvwDBoG+SLPkS5AQ36X IH1swNZqlSZh6ElciB9QqiK2E9FKiIZDCp7nmtwfwoTngHQNDbABaQ8R8vst+MIz r4byO0LVwc1nFASpZJ+IS13whR9OaOn9DYlbIrCBIjsxcrUUrWg/qJrQZJZi3t/y E29r/Yqqhu9JlV/cDan/KgwJ/CLG1yBI3zJHgeIyYkuVFBMq/7IcG91JaX3pUMzX mJwMim92PyH25udERRnrjbDBGyf3zKspFhQAkof50dt3ej9M7j19dPfr5IG/tD2V lDgJ4bqrU+rNYxJktdMbCWDtrdrMP64CCGuUqWitzuLG6uACo1eYF85k= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KkTW9Zduc9Df; Fri, 19 Aug 2022 03:12:13 +0200 (CEST) Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by mx.kolabnow.com (Postfix) with ESMTPS id E86DCA16; Fri, 19 Aug 2022 03:12:12 +0200 (CEST) Received: from ext-subm001.mykolab.com (unknown [10.9.6.1]) by int-mx002.mykolab.com (Postfix) with ESMTPS id 7476B3828; Fri, 19 Aug 2022 03:12:12 +0200 (CEST) References: <64be5566c119d5b4ab83d5fb44d01aa1ecaed599.1660541551.git.philip@philipmcgrath.com> <875yiwxc6o.fsf@kolabnow.com> <87ilmzk04q.fsf@kolabnow.com> <2ef11386-5362-40af-981a-39f9562242c0@www.fastmail.com> Date: Thu, 18 Aug 2022 21:51:31 -0300 In-reply-to: Message-ID: <875yipqboa.fsf@kolabnow.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches From: Thiago Jung Bauermann via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660871596; h=from:from:sender:sender:reply-to: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=g33Qix8cTiSKQsXKvQK7GOvDcZQ17LHyQwmTVg7eNFc=; b=u4oIReEvG9PYvQWyHlFtDAQrBRO5o/XFkrFe3ZlQt7pGQ0/9YV43BGXUKjNhPAxHxGQNFl B977xfgs6UpPMaOU+RcsWPA2wa6khLOPoB3qmlcdIgNFsZlzQtd/Ze1VxSVSIVSBwMQ11f lpNbBdpJAwzN2Eh3gNNwXmmwYWyrE9hPkmRAKjCboguBq/rmwtsEBVWi/lRoPeJCuZSn26 rK/q+CebQ3xYNZtUO8MJjZyPnVCT++/E+1YyRvsCGuCGvABC5kCETqgSoPrTISOVpQiOnP 8WSiuvDeFAxArpJEHF5R/rEDB1m1Wf6ocpkvXbDns5WJAYxaSToINsLOKx7isQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660871596; a=rsa-sha256; cv=none; b=Ry/rCXnl0n2SZwrFejQry4zydWsGpmQP3+Ac3rRktoF2WUfuk/hup/A6oFt2szg8xwBTRv WdPC3XN+DzFt4O+qefhOzDj3doWLxSFVWgd25Zk1NC2e/ikH3zsLNeq9ZSp2wW5vak6T92 WIENk42rN19X0kJORU26FBMYgwmf1BUghvIFnJwkNd3NK5PzDDCmdHcJg/WzGi2/ZKlBoz dYKyREUTgFYhRnEo0w2lBQJ/KdHdnWcY0JPpFpcqLzSWmYnP6iGNddPL0K+ZZFYpqWbTiA jqgH/OZXvFNbmoVgWdyppXqcobV+L8IvJlle7H+plypDvwUQ0o/jB828QyYuWQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=2zCXIAS2; dmarc=pass (policy=none) header.from=gnu.org; 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: -1.86 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=2zCXIAS2; dmarc=pass (policy=none) header.from=gnu.org; 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: A68D01767A X-Spam-Score: -1.86 X-Migadu-Scanner: scn1.migadu.com X-TUID: XDFDIUh0ne4U Hello Philip, Philip McGrath writes: > Hi Thiago, > >> > Nice! thanks for the quick fix. I tested guix-issue-57050-v2 and now >> > chez-scheme-for-racket-bootstrap-bootfiles builds successfully! > >> > Unfortunately there's still a holdup: the install phase of >> > racket-vm-cs-8.6 > fails: >> > >> > [...] >> > >> > Apparently some part of the racket-vm-cs build system thinks that it's >> > cross-compiling when it's not. I'm still trying to figure out where th= is > >> > =E2=80=9C--cross-compiler=E2=80=9D argument is being added but thought= I'd provide an >> > early > report. > >> >> Thanks for trying this! I think I've found what's going wrong in the >> 'configure' script is going wrong, but I'm not sure yet what's the right= way >> to fix it. >> > > Matthew Flatt fixed our use-case in 'configure' upstream, and I've > cherry-picked it for Guix in the patch below. Can you try this instead? Great! > I've updated the 'zuo' branch at https://gitlab.com/philip1/guix-patches = to > point to this (commit ddc94a778b196e9425f0057cbd21404e7ecf6605) and tagge= d it > as guix-issue-57050-v2-rfc2; I also tagged the previous attempt as > guix-issue-57050-v2-rfc1. I tried it but ran into two problems: 1. For some reason I didn't understand, the problem I first reported about rktboot/main.rkt failing during the build of chez-scheme-for-racket-bootstrap-bootfiles came back. I had to increase STACK_SAFETY_MARGIN again. I simply increased it 10x to make sure it would work. If you want I can experiment with different values to find an appropriate one. 2. I could be wrong, but I don't think Guix supports having more than one patch per file. After I moved the new patch to its own file, the racket packet was built! > I will send a clean v3 of this series once this and other remaining quest= ions > are resolved. Nice. Below are the changes are made on top of guix-issue-57050-v2-rfc2. --=20 Thanks Thiago Fix cross-install patches and increase STACK_SAFETY_MARGIN. Also, add the patches to gnu/local.mk. --- gnu/local.mk | 2 + .../racket-backport-8.6-cross-install-2.patch | 92 ++++++++++++++++++ .../racket-backport-8.6-cross-install.patch | 93 ------------------- gnu/packages/racket.scm | 3 +- 4 files changed, 96 insertions(+), 94 deletions(-) create mode 100644 gnu/packages/patches/racket-backport-8.6-cross-install-= 2.patch diff --git a/gnu/local.mk b/gnu/local.mk index 4a873803506a..412968ef3066 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1774,6 +1774,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ %D%/packages/patches/rtags-separate-rct.patch \ + %D%/packages/patches/racket-backport-8.6-cross-install.patch \ + %D%/packages/patches/racket-backport-8.6-cross-install-2.patch \ %D%/packages/patches/racket-backport-8.6-zuo.patch \ %D%/packages/patches/racket-chez-scheme-bin-sh.patch \ %D%/packages/patches/racket-rktio-bin-sh.patch \ diff --git a/gnu/packages/patches/racket-backport-8.6-cross-install-2.patch= b/gnu/packages/patches/racket-backport-8.6-cross-install-2.patch new file mode 100644 index 000000000000..f3317e39b10c --- /dev/null +++ b/gnu/packages/patches/racket-backport-8.6-cross-install-2.patch @@ -0,0 +1,92 @@ +From 85802f4d515e310e657928707800ad709a676e2a Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Mon, 15 Aug 2022 10:37:01 +0800 +Subject: [PATCH 2/2] configure: adjust cross-build assumption for a pb bui= ld + +Don't assume a cross build for a pb target on a platform that's only +supported via pb. + +(cherry picked from commit 70e484e885637c495be5481983dae2207fdd67bb) + +(Edited to remove unrelated tweak to comments in +"racket/src/expander/expand/require+provide.rkt".) +--- + racket/src/cs/c/configure | 15 +++++++++++---- + racket/src/cs/c/configure.ac | 15 +++++++++++---- + 2 files changed, 22 insertions(+), 8 deletions(-) + +diff --git a/racket/src/cs/c/configure b/racket/src/cs/c/configure +index 454d79e11a..7e0fa5600d 100755 +--- a/racket/src/cs/c/configure ++++ b/racket/src/cs/c/configure +@@ -4679,6 +4679,11 @@ case "$MACH_HOST_CPU" in + ;; + esac +=20 ++if test "${MACH}" =3D "" ; then ++ default_mach_was_empty=3Dyes ++else ++ default_mach_was_empty=3Dno ++fi +=20 + if test "${enable_mach}" !=3D "" ; then + MACH=3D"${enable_mach}" +@@ -4701,13 +4706,15 @@ elif test "$MACH" =3D "" -o "$MACH_OS" =3D "" ; th= en + exit 1 + fi +=20 +-# For a pb build where Racket is supplied, force cross-build +-# mode on the assumption that the host is not a pb build +-# (because it should be created with default configure options) ++# For a pb build where Racket is supplied and MACH was not originally ++# empty, force cross-build mode on the assumption that the host is not ++# a pb build (because it should be created with default configure options) + if test "${enable_pb}" =3D "yes" ; then + if test "${enable_racket}" !=3D "" ; then + if test "${enable_target}" =3D "" ; then +- enable_target=3D"${MACH}" ++ if test "${default_mach_was_empty}" =3D "no" ; then ++ enable_target=3D"${MACH}" ++ fi + fi + fi + fi +diff --git a/racket/src/cs/c/configure.ac b/racket/src/cs/c/configure.ac +index 5bce979c92..734c1e8feb 100644 +--- a/racket/src/cs/c/configure.ac ++++ b/racket/src/cs/c/configure.ac +@@ -415,6 +415,11 @@ case "$MACH_HOST_CPU" in + ;; + esac +=20 ++if test "${MACH}" =3D "" ; then ++ default_mach_was_empty=3Dyes ++else ++ default_mach_was_empty=3Dno ++fi +=20 + if test "${enable_mach}" !=3D "" ; then + MACH=3D"${enable_mach}" +@@ -437,13 +442,15 @@ elif test "$MACH" =3D "" -o "$MACH_OS" =3D "" ; then + exit 1 + fi +=20 +-# For a pb build where Racket is supplied, force cross-build +-# mode on the assumption that the host is not a pb build +-# (because it should be created with default configure options) ++# For a pb build where Racket is supplied and MACH was not originally ++# empty, force cross-build mode on the assumption that the host is not ++# a pb build (because it should be created with default configure options) + if test "${enable_pb}" =3D "yes" ; then + if test "${enable_racket}" !=3D "" ; then + if test "${enable_target}" =3D "" ; then +- enable_target=3D"${MACH}" ++ if test "${default_mach_was_empty}" =3D "no" ; then ++ enable_target=3D"${MACH}" ++ fi + fi + fi + fi +--=20 +2.32.0 + diff --git a/gnu/packages/patches/racket-backport-8.6-cross-install.patch b= /gnu/packages/patches/racket-backport-8.6-cross-install.patch index 2c4d8924ed5b..81cd4d2b225f 100644 --- a/gnu/packages/patches/racket-backport-8.6-cross-install.patch +++ b/gnu/packages/patches/racket-backport-8.6-cross-install.patch @@ -31,96 +31,3 @@ index 8d3950bb27..d8b74c509d 100644 --=20 2.32.0 =20 - -From 85802f4d515e310e657928707800ad709a676e2a Mon Sep 17 00:00:00 2001 -From: Matthew Flatt -Date: Mon, 15 Aug 2022 10:37:01 +0800 -Subject: [PATCH 2/2] configure: adjust cross-build assumption for a pb bui= ld - -Don't assume a cross build for a pb target on a platform that's only -supported via pb. - -(cherry picked from commit 70e484e885637c495be5481983dae2207fdd67bb) - -(Edited to remove unrelated tweak to comments in -"racket/src/expander/expand/require+provide.rkt".) ---- - racket/src/cs/c/configure | 15 +++++++++++---- - racket/src/cs/c/configure.ac | 15 +++++++++++---- - 2 files changed, 22 insertions(+), 8 deletions(-) - -diff --git a/racket/src/cs/c/configure b/racket/src/cs/c/configure -index 454d79e11a..7e0fa5600d 100755 ---- a/racket/src/cs/c/configure -+++ b/racket/src/cs/c/configure -@@ -4679,6 +4679,11 @@ case "$MACH_HOST_CPU" in - ;; - esac -=20 -+if test "${MACH}" =3D "" ; then -+ default_mach_was_empty=3Dyes -+else -+ default_mach_was_empty=3Dno -+fi -=20 - if test "${enable_mach}" !=3D "" ; then - MACH=3D"${enable_mach}" -@@ -4701,13 +4706,15 @@ elif test "$MACH" =3D "" -o "$MACH_OS" =3D "" ; th= en - exit 1 - fi -=20 --# For a pb build where Racket is supplied, force cross-build --# mode on the assumption that the host is not a pb build --# (because it should be created with default configure options) -+# For a pb build where Racket is supplied and MACH was not originally -+# empty, force cross-build mode on the assumption that the host is not -+# a pb build (because it should be created with default configure options) - if test "${enable_pb}" =3D "yes" ; then - if test "${enable_racket}" !=3D "" ; then - if test "${enable_target}" =3D "" ; then -- enable_target=3D"${MACH}" -+ if test "${default_mach_was_empty}" =3D "no" ; then -+ enable_target=3D"${MACH}" -+ fi - fi - fi - fi -diff --git a/racket/src/cs/c/configure.ac b/racket/src/cs/c/configure.ac -index 5bce979c92..734c1e8feb 100644 ---- a/racket/src/cs/c/configure.ac -+++ b/racket/src/cs/c/configure.ac -@@ -415,6 +415,11 @@ case "$MACH_HOST_CPU" in - ;; - esac -=20 -+if test "${MACH}" =3D "" ; then -+ default_mach_was_empty=3Dyes -+else -+ default_mach_was_empty=3Dno -+fi -=20 - if test "${enable_mach}" !=3D "" ; then - MACH=3D"${enable_mach}" -@@ -437,13 +442,15 @@ elif test "$MACH" =3D "" -o "$MACH_OS" =3D "" ; then - exit 1 - fi -=20 --# For a pb build where Racket is supplied, force cross-build --# mode on the assumption that the host is not a pb build --# (because it should be created with default configure options) -+# For a pb build where Racket is supplied and MACH was not originally -+# empty, force cross-build mode on the assumption that the host is not -+# a pb build (because it should be created with default configure options) - if test "${enable_pb}" =3D "yes" ; then - if test "${enable_racket}" !=3D "" ; then - if test "${enable_target}" =3D "" ; then -- enable_target=3D"${MACH}" -+ if test "${default_mach_was_empty}" =3D "no" ; then -+ enable_target=3D"${MACH}" -+ fi - fi - fi - fi ---=20 -2.32.0 - diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index b1de6cf88519..a38aeb08b503 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -206,6 +206,7 @@ (define %racket-origin (base32 "1yi36nr7zrdwrnvpmliirxxjz4pyfyhkar6yvk3rapvmg4q2vmnk")) (file-name (git-file-name "racket" %racket-version)) (patches (search-patches "racket-backport-8.6-cross-install.patch" + "racket-backport-8.6-cross-install-2.patch" "racket-backport-8.6-docindex-write.patch" "racket-backport-8.6-hurd.patch" "racket-backport-8.6-zuo.patch" @@ -429,7 +430,7 @@ (define-public racket-vm-bc (lambda (flag) (if (string-prefix? "CPPFLAGS=3D" flag) (string-append flag - " -DSTACK_SAFETY_MARGIN=3D2000= 00") + " -DSTACK_SAFETY_MARGIN=3D2000= 000") flag)) #$(racket-vm-common-configure-flags))) (else