From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Efraim Flashner Newsgroups: gmane.lisp.guile.bugs Subject: bug#45214: guile segfaults on 32-bit big-endian targets Date: Wed, 14 Apr 2021 17:18:36 +0300 Message-ID: References: <56553e87-ec27-d287-9e5b-fc501bc4b2dc@physik.fu-berlin.de> <1c389d72-cbb7-888f-f1c1-d33fa2a1248b@bell.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CWY2irFopi33MQ9x" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40932"; mail-complaints-to="usenet@ciao.gmane.io" Cc: deller@gmx.de, dave.anglin@bell.net, schwab@linux-m68k.org, 45214@debbugs.gnu.org, debian@mkarcher.dialup.fu-berlin.de To: John Paul Adrian Glaubitz Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Wed Apr 14 16:20:08 2021 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWgND-000AU1-Ow for guile-bugs@m.gmane-mx.org; Wed, 14 Apr 2021 16:20:07 +0200 Original-Received: from localhost ([::1]:60504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWgNC-0004Zo-NY for guile-bugs@m.gmane-mx.org; Wed, 14 Apr 2021 10:20:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWgN8-0004Zh-4K for bug-guile@gnu.org; Wed, 14 Apr 2021 10:20:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWgN8-0007kq-1D for bug-guile@gnu.org; Wed, 14 Apr 2021 10:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWgN7-0001Nq-Tb for bug-guile@gnu.org; Wed, 14 Apr 2021 10:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 14 Apr 2021 14:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45214 X-GNU-PR-Package: guile X-Debbugs-Original-Cc: bug-guile@gnu.org, Helge Deller , John David Anglin , Andreas Schwab , Michael Karcher Original-Received: via spool by submit@debbugs.gnu.org id=B.16184099775277 (code B ref -1); Wed, 14 Apr 2021 14:20:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Apr 2021 14:19:37 +0000 Original-Received: from localhost ([127.0.0.1]:35434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWgMe-0001Mx-Kh for submit@debbugs.gnu.org; Wed, 14 Apr 2021 10:19:37 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWgMc-0001Mp-J7 for submit@debbugs.gnu.org; Wed, 14 Apr 2021 10:19:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWgMc-0004Xy-9c for bug-guile@gnu.org; Wed, 14 Apr 2021 10:19:30 -0400 Original-Received: from flashner.co.il ([178.62.234.194]:57324) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWgMW-0007P4-15 for bug-guile@gnu.org; Wed, 14 Apr 2021 10:19:30 -0400 Original-Received: from localhost (unknown [31.210.177.71]) by flashner.co.il (Postfix) with ESMTPSA id 20BF14027B; Wed, 14 Apr 2021 14:19:22 +0000 (UTC) Mail-Followup-To: Efraim Flashner , John Paul Adrian Glaubitz , bug-guile@gnu.org, Helge Deller , John David Anglin , Andreas Schwab , Michael Karcher Content-Disposition: inline In-Reply-To: X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:10013 Archived-At: --CWY2irFopi33MQ9x Content-Type: multipart/mixed; boundary="R4Yxeg9Ii6E9Ek5G" Content-Disposition: inline --R4Yxeg9Ii6E9Ek5G Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 25, 2021 at 05:24:04PM +0200, Efraim Flashner wrote: > On Sat, Dec 12, 2020 at 11:02:47PM +0100, John Paul Adrian Glaubitz wrote: > > Hi! > >=20 > > On 12/12/20 11:00 PM, John David Anglin wrote: > > > Trying to bisect. > >=20 > > Bisecting lead me to this which I guess is just painting over the real > > problem: > >=20 > > (sid_powerpc-dchroot)glaubitz@perotto:~/guile-git$ git bisect good > > a68c80c747a2a8ec92fa84684ebd60b4ecb7ffa0 is the first bad commit > > commit a68c80c747a2a8ec92fa84684ebd60b4ecb7ffa0 > > Author: Andy Wingo > > Date: Mon May 11 15:22:29 2020 +0200 > >=20 > > Switch to baseline compiler for bootstrap/ > >=20 > > * bootstrap/Makefile.am (GUILE_OPTIMIZATIONS): Add -Ono-cps so that= we > > use the baseline compiler when bootstrapping. > >=20 > > bootstrap/Makefile.am | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > (sid_powerpc-dchroot)glaubitz@perotto:~/guile-git$ > >=20 >=20 > I came to the same conclusion when I tried to bisect the git repo > between 3.0.2 and 3.0.3 on my powerpc machine. By reverting that commit > I was able to build 44ad8fbde55df452ac1c88427662403e7af5b9bb (3.0.2-70, > 6 commit later) but wasn't able to build 3.0.3. I started the build > without any precompiled bootstrap .go files. >=20 I spent some more time bisecting guile so I could create a diff against 3.0.5 and then spent another two weeks or so bootstrapping Guix from my custom bootstrap binaries out to mesa. I've attached the patch that's likely to go into Guix to add powerpc support. Other than the mysterious failing test I've changed the GUILE_OPTIMIZATIONS in bootstrap/Makefile.in to '-O1 -Oresolve-primitives -Ocps' on powerpc and it seems to be working fine. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --R4Yxeg9Ii6E9Ek5G Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0002-gnu-guile-3.0-Fix-building-on-powerpc-linux.patch" Content-Transfer-Encoding: quoted-printable =46rom c11ad7faa3690b2dfef924a31137f6ced5aab23f Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: =46rom: Efraim Flashner Date: Mon, 8 Mar 2021 22:13:56 +0200 Subject: [PATCH 2/9] gnu: guile-3.0: Fix building on powerpc-linux. * gnu/packages/guile.scm (guile-3.0)[arguments]: On powerpc add two phases to adjust for 32-bit big-endian systems. --- gnu/packages/guile.scm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index f63322794d..dca1b1c16f 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -305,7 +305,26 @@ without requiring the source code to be rewritten.") (substitute-keyword-arguments (package-arguments guile-2.2) ((#:configure-flags flags ''()) `(cons "--disable-jit" ,flags))) - (package-arguments guile-2.2))) + (if (string-prefix? "powerpc-" (%current-system)) + (substitute-keyword-arguments (package-arguments guile-2.2) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'adjust-bootstrap-flags + (lambda _ + ;; Upstream not yet notified about suggested solution. + ;; See existing bug reports: + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D45= 214 + ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug= =3D977223 + (substitute* "bootstrap/Makefile.in" + (("^GUILE_OPTIMIZATIONS.*") + "GUILE_OPTIMIZATIONS =3D -O1 -Oresolve-primitives = -Ocps\n")) + #t)) + (add-after 'unpack 'remove-failing-tests + (lambda _ + ;; TODO: Discover why this test fails on powerpc-linux + (delete-file "test-suite/standalone/test-out-of-memor= y") + #t))))) + (package-arguments guile-2.2)))) (native-search-paths (list (search-path-specification (variable "GUILE_LOAD_PATH") --=20 2.31.1 --R4Yxeg9Ii6E9Ek5G-- --CWY2irFopi33MQ9x Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmB2+bwACgkQQarn3Mo9 g1FljQ//Y+wGjBmpvPGRkCQ3o0o+ql5TLyyvhMd0nj4ZEpM0iRvo4Bc/2xZzwMFl Wu1+4BFqEffFPVLF2VH/NQS2/4Tugn39AtIlnyTBdpnEBYgVTLuUeIBD/mlNR8ip wYAtXARpcXvReWDkq7IswsDQHuZGsyJYQgEASs4WtvWe1UZKylqDxsw7uniE713j N4mbsK9rQOGmgdrJ68WYaLe+8R+Jbn1zx5FlczPUWKl858YT0BfZgrrXslJMV8lJ erU81mkM3C77VkSoL89CdKECe9+i7E3b0f6IFi0k0c7STz6kAXFuCOEA91raQDBk SRgvqtYbIMlEoIM4K6w4ITenR64yeQRgHzjqzm6NAv2S2UusmxDoMLM99KET2A0W 5TQXi3pXwp4mFFnkMVVN8T4EpXQNR3RBU7tiisfXH0pG1EQIfea/4QrQdccAOMhb VGjd5gnTg1Z6UzHTMqUFCErebbiTZ4ZPhLsnT0QoFRGiCNK/xE52X5K4xdQRTGQb 8+rZWUCQIAqDfctR/XT14PEGFiNlHXNQC3utd2NP0BfgrUhvrWrtWbsofGU3M0gW Ven+Ddq9ylinQWiqXYSHmLnPlqCv4wlD7KX2jzgKK2Ak1cMBAYsS9QrixsdfEDC+ 2vE9mXoAsKh8GUxOYLfG17Sn/+iFR676bdrxBo6qitn6Q485n7k= =KxII -----END PGP SIGNATURE----- --CWY2irFopi33MQ9x--