From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6GkXI11M3l4BUAAA0tVLHw (envelope-from ) for ; Mon, 08 Jun 2020 14:34:05 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2NXYHl1M3l7sUAAAbx9fmQ (envelope-from ) for ; Mon, 08 Jun 2020 14:34:05 +0000 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 E8A7C9403E9 for ; Mon, 8 Jun 2020 14:34:04 +0000 (UTC) Received: from localhost ([::1]:41996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiIqh-00041Q-HW for larch@yhetil.org; Mon, 08 Jun 2020 10:34:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiIh1-00020j-9T for bug-guix@gnu.org; Mon, 08 Jun 2020 10:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46046) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiIh0-0005PX-V3 for bug-guix@gnu.org; Mon, 08 Jun 2020 10:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jiIgz-0003vE-Pr for bug-guix@gnu.org; Mon, 08 Jun 2020 10:24:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#40406: python-matplotlib fails to build on i686-linux Resent-From: Diego Nicola Barbato Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 08 Jun 2020 14:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40406 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 40406@debbugs.gnu.org Received: via spool by 40406-submit@debbugs.gnu.org id=B40406.159162618515011 (code B ref 40406); Mon, 08 Jun 2020 14:24:01 +0000 Received: (at 40406) by debbugs.gnu.org; 8 Jun 2020 14:23:05 +0000 Received: from localhost ([127.0.0.1]:57592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiIg1-0003tz-Vp for submit@debbugs.gnu.org; Mon, 08 Jun 2020 10:23:05 -0400 Received: from mout01.posteo.de ([185.67.36.65]:33359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiIfz-0003tD-Uy for 40406@debbugs.gnu.org; Mon, 08 Jun 2020 10:23:00 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id A336916005F for <40406@debbugs.gnu.org>; Mon, 8 Jun 2020 16:22:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1591626173; bh=A2qQCj8TijuyOpQe0KGu3BGzk5pthThp5swE0fiEFGs=; h=From:To:Cc:Subject:Date:From; b=kvMHzOJ9GV7uuFmQRy+7lYskm/YiF8Rx4XsSSBIvipn7x+opHZJhf4oETaGcScFk5 Sd/W6h3zC2Ep4oDyIk5+mR3Z/w6r+xdrMA8cSHeNWy5R+uBEoPvb3R7sfExDCthrB3 kzRrdfn5/VOsLZGDPOHqKnUC9S1lYPt/aag7MoRi5knJbZM6Sffg67p3j5YKMRqZqV qAZw8Xoaeumcu8yu6nkTePKWTtIT4HfKoM3i187o4F5A+lFp7Rftw0042gAyvHGCaQ mElN+QiYawmaEHTbV3DPq0vdaRX3zjF17On15qlc71yq0JUqwltRfzgeAX7+fFGMFy 5M4pp2Wy1S5rA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49gb7c63Pyz6tmT; Mon, 8 Jun 2020 16:22:52 +0200 (CEST) From: Diego Nicola Barbato References: <87mu7s1tqv.fsf@GlaDOS.home> <20200403161802.GA3560@jasmine.lan> <878sh5a1bf.fsf@GlaDOS.home> Date: Mon, 08 Jun 2020 16:22:52 +0200 In-Reply-To: <878sh5a1bf.fsf@GlaDOS.home> (Diego Nicola Barbato's message of "Tue, 02 Jun 2020 18:18:28 +0200") Message-ID: <87zh9d8wn7.fsf@GlaDOS.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=posteo.de header.s=2017 header.b=kvMHzOJ9; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 1.59 X-TUID: u9UmoicJeE6m --=-=-= Content-Type: text/plain Hey, Diego Nicola Barbato writes: [...] > Apparently there is nothing wrong with the slider. Instead matrix > multiplication, which is used under the hood for transformations, seems > to sometimes produce incorrect results on i686-linux. I have reported > this as a separate bug (https://debbugs.gnu.org/41665). I got this wrong: This issue isn't caused by the Numpy bug, since Matplotlib doesn't use Numpy for transformations. Both bugs are caused by the excess precision of the x87 FPU's floating point registers. I've attached a patch which makes sure that the C and C++ extensions are compiled with -ffloat-store. This doesn't get rid of all possible rounding errors but it's enough for the slider test to pass. [...] Regards, Diego --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-python-matplotlib-Fix-rounding-errors-on-x86-CPU.patch Content-Transfer-Encoding: quoted-printable >From 7c60615e29a1aab7922139183d191cc8cedd5c7f Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Mon, 8 Jun 2020 02:31:17 +0200 Subject: [PATCH] gnu: python-matplotlib: Fix rounding errors on x86 CPUs. Fixes . Reported by Diego Nicola Barbato . * gnu/packages/python-xyz.scm (python-matplotlib)[arguments]: Set the environment variable CFLAGS to -ffloat-store. --- gnu/packages/python-xyz.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 94e63d1c74..f0b96c6fb0 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -81,6 +81,7 @@ ;;; Copyright =C2=A9 2020 Josh Holland ;;; Copyright =C2=A9 2020 Yuval Kogman ;;; Copyright =C2=A9 2020 Michael Rohleder +;;; Copyright =C2=A9 2020 Diego N. Barbato ;;; ;;; This file is part of GNU Guix. ;;; @@ -4744,6 +4745,10 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b= *, CIECAM02, CAM02-UCS, etc. ;; has not effect. (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib")) (setenv "HOME" (getcwd)) + ;; Fix rounding errors when using the x87 FPU. + ,@(if (string-prefix? "i686" (%current-system)) + '((setenv "CFLAGS" "-ffloat-store")) + '()) (call-with-output-file "setup.cfg" (lambda (port) (format port "[directories]~% --=20 2.26.2 --=-=-=--