From patchwork Wed Aug 4 18:34:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31824 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AE6A727BC78; Wed, 4 Aug 2021 19:36:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A956827BC6B for ; Wed, 4 Aug 2021 19:36:12 +0100 (BST) Received: from localhost ([::1]:55064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBLkR-0004hq-In for patchwork@mira.cbaines.net; Wed, 04 Aug 2021 14:36:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBLkI-0004d2-OS for guix-patches@gnu.org; Wed, 04 Aug 2021 14:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33567) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBLkI-0007hk-HA for guix-patches@gnu.org; Wed, 04 Aug 2021 14:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBLkI-0004rF-B4 for guix-patches@gnu.org; Wed, 04 Aug 2021 14:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49880] [PATCH 1/2] gnu: gmp-boot: Fix build on powerpc64le-linux Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Aug 2021 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49880 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49880@debbugs.gnu.org Cc: Thiago Jung Bauermann X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162810212418603 (code B ref -1); Wed, 04 Aug 2021 18:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Aug 2021 18:35:24 +0000 Received: from localhost ([127.0.0.1]:45108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBLjf-0004pz-LJ for submit@debbugs.gnu.org; Wed, 04 Aug 2021 14:35:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:41736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBLjd-0004pq-BQ for submit@debbugs.gnu.org; Wed, 04 Aug 2021 14:35:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBLjc-00045u-2p for guix-patches@gnu.org; Wed, 04 Aug 2021 14:35:20 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:38576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBLjY-0006zY-8g for guix-patches@gnu.org; Wed, 04 Aug 2021 14:35:19 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 01D7C874 for ; Wed, 4 Aug 2021 20:35:10 +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:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1628102110; x=1629916511; bh=OWm3E8mo57bxrWVNvTtfxAjxx4dbrL0Giv57No/c5mE=; b=OIiqvdmJLSFI LbaAdQ2dShngEc7H5MSThDb50TU84Ut9JALxUtc8c0vDnaLxei0eh0k92D7R0bil 7TPRADco1Og9WqLUv/KOMkpcUKJctxnNQWRl3CzosL/l9mJQlnLEiqSFZ/2IyjgU nIuFaLcFAdBfBm+Oss3+FbsOjFTelq/FAmkgauzRbXjS2onbfkGjvYiO+acz2toj c6vAFWm6Pbt0rsp8c1pLigpRu8cwqyHlA4vbl2XQSiNeaX4QM2jYCiqcEPozOPNQ apqT6pa+bj7ms+HRR0JrNq41U4hmFxocs4vnqbYSJ/sq9+H1QCpQXd1U3CzJZVLw ZpeqL75b+cELWrlL4MsD9qxVhgNNWY4sLYb0uR3hm2znX0ihRIEJkAiceFcdZ7XG eVItftSvP+I3p99Gzch+6R9sAcRXKNLmhfaGBvY0Q650VYjUWHOguTOCY0iUpnvw 9XTbUW+c7vxDxioTYl/tDcHh97DRt2jcGCMk+HVpb8w0XPr0rso21DJKeZ8LcaIN Af9wL2TQfUHo6hsMaEroSvkbNyamL/lnjCLapIfbnf4N6WeANPHYlc5r+WwNXjtr 0A8YKjRHBNHhGcj77bbSJ9IuqhCsl6Lz9p9LDKJGV3P1m7CXaxsRc9qLL10eRXn6 dfsx117U7PzpC6/5lEYf2Vx/fr6MChY= 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 zFHF0-1TSCRm for ; Wed, 4 Aug 2021 20:35:10 +0200 (CEST) Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id 6B96A49A for ; Wed, 4 Aug 2021 20:35:09 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx002.mykolab.com (Postfix) with ESMTPS id 71A6657F4; Wed, 4 Aug 2021 20:35:08 +0200 (CEST) Date: Wed, 4 Aug 2021 15:34:54 -0300 Message-Id: <20210804183454.153783-1-bauermann@kolabnow.com> MIME-Version: 1.0 Received-SPF: pass client-ip=95.128.36.41; envelope-from=bauermann@kolabnow.com; helo=mx.kolabnow.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches Linux on powerpc64 used to run in big-endian mode only. When support for little-endian mode was added around 2014, they took the opportunity to update the ELF ABI. The new ABI is known as ELF ABI v2, and the old one retroactively called ELF ABI v1. GMP 4.3.2 was released in 2010, so its hand-optimized assembly code for powerpc64 only support ELF ABI v1. This causes a build failure on powerpc64le-linux, which can be fixed by passing a host triplet with the “none” CPU type. This tells the configure script to use generic C code for the build. * gnu/packages/commencement.scm (gmp-boot)[arguments]{#:configure-flags}: Add “--host=none-unknown-linux-gnu” for powerpc64le targets. --- Hello, This patch fixes the following build error on powerpc64le-linux (shown below for one file, but happens on several): ld: mpn/.libs/add_n.o: ABI version 1 is not compatible with ABI version 2 output ld: failed to merge target specific data of file mpn/.libs/add_n.o I started investigating the problem in core-udpates-frozen but the same issue happens in master as well so I suggest comitting it there instead. The patch applies cleanly to both branches. Thanks, Thiago gnu/packages/commencement.scm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index e7bd6cf002c7..ae3f07bc59ef 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -1840,7 +1840,23 @@ ac_cv_c_float_format='IEEE (little-endian)' (uri (string-append "mirror://gnu/gmp/gmp-" version ".tar.gz")) (sha256 (base32 - "15rwq54fi3s11izas6g985y9jklm3xprfsmym3v1g6xr84bavqvv")))))) + "15rwq54fi3s11izas6g985y9jklm3xprfsmym3v1g6xr84bavqvv")))) + (arguments + (substitute-keyword-arguments (package-arguments gmp) + ((#:configure-flags gmp-configure-flags) + `(cons* ,@(if (string-prefix? "powerpc64le-" (or (%current-target-system) + (%current-system))) + ;; The powerpc64 assembly code in this version of GMP + ;; only supports the ELF ABI v1 but powerpc64le uses ELF + ;; ABI v2, so use the generic C code instead. This is + ;; done by specifying the CPU type as “none”. + ;; + ;; According to the manual, “this will run quite slowly, + ;; but it should be portable and should at least make it + ;; possible to get something running if all else fails.” + '("--host=none-unknown-linux-gnu") + '()) + ,gmp-configure-flags)))))) (define mpfr-boot (package From patchwork Wed Aug 4 18:41:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31826 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BD63627BC78; Wed, 4 Aug 2021 19:42:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 532A427BC6B for ; Wed, 4 Aug 2021 19:42:12 +0100 (BST) Received: from localhost ([::1]:36878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBLqF-0003PF-5t for patchwork@mira.cbaines.net; Wed, 04 Aug 2021 14:42:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBLq6-0003Mn-2D for guix-patches@gnu.org; Wed, 04 Aug 2021 14:42:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBLq5-0003m4-Rr for guix-patches@gnu.org; Wed, 04 Aug 2021 14:42:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBLq5-00050d-P4 for guix-patches@gnu.org; Wed, 04 Aug 2021 14:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49880] [PATCH 2/2] gnu: gmp-boot: Fix t-scan test crash References: <20210804183454.153783-1-bauermann@kolabnow.com> In-Reply-To: <20210804183454.153783-1-bauermann@kolabnow.com> Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Aug 2021 18:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49880 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49880@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49880-submit@debbugs.gnu.org id=B49880.162810251319239 (code B ref 49880); Wed, 04 Aug 2021 18:42:01 +0000 Received: (at 49880) by debbugs.gnu.org; 4 Aug 2021 18:41:53 +0000 Received: from localhost ([127.0.0.1]:45132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBLpx-00050F-2r for submit@debbugs.gnu.org; Wed, 04 Aug 2021 14:41:53 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:9972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBLpv-000501-5u for 49880@debbugs.gnu.org; Wed, 04 Aug 2021 14:41:51 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id E85F3CFD for <49880@debbugs.gnu.org>; Wed, 4 Aug 2021 20:41:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:mime-version:message-id:date:date :subject:subject:from:from:received:received:received; s= dkim20160331; t=1628102504; x=1629916905; bh=nfUtC4vWFPESexmRaiK Dcag3wXSk6yr4/ZYNzmfmAUM=; b=n3K5PzU4SXGGdgKnHBI1ispqZK0RQ2vCeSo SaSulF765WX6OloeXB6QmjxzyaDxWy10ZgBPR/IPgRpR5+CilAJPMgRVkZbtsXxM ncGVwgYYm0F0eEgpNJ1YkVKYt1Hj0I07NPx/U0Wg+GWNzri6NOdXlfddIzpW/NPm 6tEpTciGr+j3L1frAgRBv1dhdMAUBS3N/sD8dEnm7nHMEIsksLqLaJZIU5M5TyZ+ qoIM834iIu6rlVrUAcvE5b9vTDTct9TF8DYio/M43r3hXujRH69NlZ27s/H6xpRO XJUW5DaKxwrfhJYavtWNZ7Jf08Op0s7LRkum3DQ1sqHrVvRE5dMN1xJ8VRkE6Nag jC6BuaUeUbQZF7Ia6NiZnOv8EGrHf9K5tAFmi0wZLQNjZZsviu28lgjLbPqNOViY uUTSPArB7nkHXWfkV7opNvcbVjHRA/2MAF7H+7MTFJ0eId3mplzuQWcETgy8grkh gUi1/TETlH1yRwVmtgw95S7+vFJxMlnwGkjH8lMqkUZX9a3IdLjiwjFhu4nvea3+ pxfWixsqAXl5ORYZlEpxgsNGNR7LEL1i3mSdBnPTN6WrrhSAAWVzxuJulOUa8+f1 VR7XxFR32NsB/EAUo/4XvDwF30497Qi4zhgQ2IcbIY55HDFdFrISflSO3EDrfIT+ NOgq6wRg= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P461NOlnJL4Q for <49880@debbugs.gnu.org>; Wed, 4 Aug 2021 20:41:44 +0200 (CEST) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 03786A2F for <49880@debbugs.gnu.org>; Wed, 4 Aug 2021 20:41:43 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx003.mykolab.com (Postfix) with ESMTPS id 90DF0514D; Wed, 4 Aug 2021 20:41:43 +0200 (CEST) Date: Wed, 4 Aug 2021 15:41:28 -0300 Message-Id: <20210804184128.153984-1-bauermann@kolabnow.com> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches GMP 4.3 was released with a bug in the t-scan test which causes it to crash with a segmentation fault. Backport fix from upstream. * gnu/packages/commencement.scm (gmp-boot): Apply gmp-4.3-fix-t-scan-test.patch. * gnu/packages/patches/gmp-4.3-fix-t-scan-test.patch: New file. --- Hello, With this and the previous patch applied, gmp-boot builds successfully on powerpc64le-linux both in master and core-updates-frozen. It should also fix the same problem in i686-linux: https://ci.guix.gnu.org/build/699347/details gnu/packages/commencement.scm | 4 +++- .../patches/gmp-4.3-fix-t-scan-test.patch | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gmp-4.3-fix-t-scan-test.patch diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index ae3f07bc59ef..16eb46d44d77 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -1840,7 +1840,9 @@ ac_cv_c_float_format='IEEE (little-endian)' (uri (string-append "mirror://gnu/gmp/gmp-" version ".tar.gz")) (sha256 (base32 - "15rwq54fi3s11izas6g985y9jklm3xprfsmym3v1g6xr84bavqvv")))) + "15rwq54fi3s11izas6g985y9jklm3xprfsmym3v1g6xr84bavqvv")) + ;; See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60933#c11 + (patches (search-patches "gmp-4.3-fix-t-scan-test.patch")))) (arguments (substitute-keyword-arguments (package-arguments gmp) ((#:configure-flags gmp-configure-flags) diff --git a/gnu/packages/patches/gmp-4.3-fix-t-scan-test.patch b/gnu/packages/patches/gmp-4.3-fix-t-scan-test.patch new file mode 100644 index 000000000000..85b4b666215a --- /dev/null +++ b/gnu/packages/patches/gmp-4.3-fix-t-scan-test.patch @@ -0,0 +1,24 @@ +Testcase fix obtained from upstream at: + +https://gmplib.org/repo/gmp/raw-rev/966737bd91ed + +# HG changeset patch +# User Torbjorn Granlund +# Date 1318259187 -7200 +# Node ID 966737bd91ed4cd158ca9730167f70db47442fc1 +# Parent 27913f466a23776215bd9341866e10a50cf61c01 +(check_ref): Fix loop end bound. + +diff -r 27913f466a23 -r 966737bd91ed tests/mpz/t-scan.c +--- a/tests/mpz/t-scan.c Mon Oct 10 12:06:39 2011 +0200 ++++ b/tests/mpz/t-scan.c Mon Oct 10 17:06:27 2011 +0200 +@@ -79,7 +79,7 @@ + + for (isize = 0; isize <= size; isize++) + { +- for (oindex = 0; oindex <= numberof (offset); oindex++) ++ for (oindex = 0; oindex < numberof (offset); oindex++) + { + o = offset[oindex]; + if ((int) isize*GMP_NUMB_BITS < -o) +