From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2B/aACF81l7XTgAA0tVLHw (envelope-from ) for ; Tue, 02 Jun 2020 16:19:45 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id AIFQOCB81l5QNAAAB5/wlQ (envelope-from ) for ; Tue, 02 Jun 2020 16:19:44 +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 821EB940276 for ; Tue, 2 Jun 2020 16:19:44 +0000 (UTC) Received: from localhost ([::1]:51650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg9df-0006LS-Ek for larch@yhetil.org; Tue, 02 Jun 2020 12:19:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg9d0-0005ck-NM for bug-guix@gnu.org; Tue, 02 Jun 2020 12:19:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg9d0-0006xO-ER for bug-guix@gnu.org; Tue, 02 Jun 2020 12:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jg9d0-0001JI-AQ for bug-guix@gnu.org; Tue, 02 Jun 2020 12:19:02 -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: Tue, 02 Jun 2020 16:19:02 +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: Leo Famulari Received: via spool by 40406-submit@debbugs.gnu.org id=B40406.15911147174999 (code B ref 40406); Tue, 02 Jun 2020 16:19:02 +0000 Received: (at 40406) by debbugs.gnu.org; 2 Jun 2020 16:18:37 +0000 Received: from localhost ([127.0.0.1]:40737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg9cb-0001IZ-1V for submit@debbugs.gnu.org; Tue, 02 Jun 2020 12:18:37 -0400 Received: from mout02.posteo.de ([185.67.36.66]:56057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg9ca-0001IN-2L for 40406@debbugs.gnu.org; Tue, 02 Jun 2020 12:18:36 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id A3EFF2400FC for <40406@debbugs.gnu.org>; Tue, 2 Jun 2020 18:18:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1591114709; bh=KbE07kq9Cmp9Gq1BYAqaW2sEH5ycHhtRvAgpLfAb3Ks=; h=From:To:Cc:Subject:Date:From; b=memyWeZWHnomWpNBIYIX11N1Bt0gIbcoYia1pGmLT4W9g97Guw368sTja2TzDMsfd gutLlrdInxMmvhZyE5ehfqcP08txxsmuh4zTYQnX/vCEiT8X5iqQbQqpuSiNzK+abp spiVUlMj9OKI424YocoQ6vRNcfWQiVwqrEKFG7OA+0N93altOoisKyrzj7ozYfzgnJ Ls8ug7Tsf9wQsP6PhWwZOIImruNOA2OizcbLrLNyd56wqY87NhCjQjGkseZt7mCplu kF1x1diMokqm6mMuugs6EQ5GPsqgnSwFOuMriMMEytcWu19pZYZ39Y0ciu3WNOYzau OtbtIsU24jEgg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49bxzm6vSFz9rxc; Tue, 2 Jun 2020 18:18:28 +0200 (CEST) From: Diego Nicola Barbato References: <87mu7s1tqv.fsf@GlaDOS.home> <20200403161802.GA3560@jasmine.lan> Date: Tue, 02 Jun 2020 18:18:28 +0200 In-Reply-To: <20200403161802.GA3560@jasmine.lan> (Leo Famulari's message of "Fri, 3 Apr 2020 12:18:02 -0400") Message-ID: <878sh5a1bf.fsf@GlaDOS.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: , Cc: 40406@debbugs.gnu.org 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=memyWeZW; 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: 0.09 X-TUID: mS86c8VDUdBn Hi, Leo Famulari writes: > On Fri, Apr 03, 2020 at 05:20:08PM +0200, Diego Nicola Barbato wrote: >> The package python-matplotlib fails to build during the check phase on >> i686-linux. The test failure appears to be deterministic: I've taken a closer look at the failing test (on x86_64-linux, commit: ebbf915) by keeping the build tree ... --8<---------------cut here---------------start------------->8--- guix build --no-grafts -s i686-linux --keep-failed python-matplotlib --8<---------------cut here---------------end--------------->8--- ... and running python inside of it. --8<---------------cut here---------------start------------->8--- cd /tmp/guix-build-python-matplotlib-3.1.2.drv-0/matplotlib-3.1.2/ . ../environment-variables export PYTHONPATH="${PYTHONPATH}:build/lib.linux-i686-3.8" python3 --8<---------------cut here---------------end--------------->8--- I retraced the steps of the failing test ... --8<---------------cut here---------------start------------->8--- import matplotlib.pyplot as plt import matplotlib.widgets as widgets from numpy.testing import assert_allclose fig, ax = plt.subplots() slider = widgets.Slider(ax=ax, label='', valmin=0, valmax=24, valinit=12, orientation='horizontal') slider.set_val(10) box = slider.poly.get_extents().transformed(ax.transAxes.inverted()) assert_allclose(box.bounds, [0, 0, 10/24, 1]) --8<---------------cut here---------------end--------------->8--- ... and was able to reproduce the failing assertion ... --8<---------------cut here---------------start------------->8--- AssertionError: Not equal to tolerance rtol=1e-07, atol=0 Mismatch: 25% Max absolute difference: 1.11022302e-16 Max relative difference: 2.66453526e-16 x: array([ 0.000000e+00, -1.046255e-17, 4.166667e-01, 1.000000e+00]) y: array([0. , 0. , 0.416667, 1. ]) --8<---------------cut here---------------end--------------->8--- ... , although the differing value wasn't exactly the same as the one reported by the test. As expected, the assertion did not fail when I followed the same steps on x86_64. --8<---------------cut here---------------start------------->8--- guix environment --ad-hoc python python-matplotlib -- python3 --8<---------------cut here---------------end--------------->8--- A closer look at the intermediate results ... --8<---------------cut here---------------start------------->8--- print(slider.poly.get_extents().bounds, ax.transAxes.get_matrix(), ax.transAxes.inverted().get_matrix(), box.bounds, sep='\n') --8<---------------cut here---------------end--------------->8--- ... revealed that only the values of box.bounds differ. The dimensions of the slider are the same (as are the values of the transformation matrices) on i686-linux ... --8<---------------cut here---------------start------------->8--- (80.0, 52.8, 206.66666666666663, 369.59999999999997) [[496. 0. 80. ] [ 0. 369.6 52.8] [ 0. 0. 1. ]] [[ 0.00201613 0. -0.16129032] [ 0. 0.00270563 -0.14285714] [ 0. 0. 1. ]] (0.0, -1.0462550964485118e-17, 0.4166666666666666, 1.0) --8<---------------cut here---------------end--------------->8--- ... and on x86_64-linux. --8<---------------cut here---------------start------------->8--- (80.0, 52.8, 206.66666666666663, 369.59999999999997) [[496. 0. 80. ] [ 0. 369.6 52.8] [ 0. 0. 1. ]] [[ 0.00201613 0. -0.16129032] [ 0. 0.00270563 -0.14285714] [ 0. 0. 1. ]] (0.0, 0.0, 0.41666666666666663, 1.0000000000000002) --8<---------------cut here---------------end--------------->8--- 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 wonder if this scientific computing stuff should be tried on i686 at > all. Should we limit it to contemporary architectures? I was opposed to this at first (after all, if upstream supports Numpy on i686, why shouldn't we?), but after seeing that even simple things like matrix multiplication can produce incorrect results I'm in favour of limiting it to contemporary architectures. What do others think? Regards, Diego