From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0J+vK4nW9mBjVwEAgWs5BA (envelope-from ) for ; Tue, 20 Jul 2021 15:58:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 54l7J4nW9mALYAAAbx9fmQ (envelope-from ) for ; Tue, 20 Jul 2021 13:58:33 +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 A727897D3 for ; Tue, 20 Jul 2021 15:58:27 +0200 (CEST) Received: from localhost ([::1]:42504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5qGQ-00083V-Ln for larch@yhetil.org; Tue, 20 Jul 2021 09:58:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5qF3-00074h-Ud for guix-patches@gnu.org; Tue, 20 Jul 2021 09:57:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51658) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m5qF3-0000zT-N3 for guix-patches@gnu.org; Tue, 20 Jul 2021 09:57:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m5qF3-0008U3-NZ for guix-patches@gnu.org; Tue, 20 Jul 2021 09:57:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49659] [PATCH core-updates] gnu: guile: Fix failing tests on i686-linux. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Jul 2021 13:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49659 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 49659@debbugs.gnu.org Received: via spool by 49659-submit@debbugs.gnu.org id=B49659.162678936832538 (code B ref 49659); Tue, 20 Jul 2021 13:57:01 +0000 Received: (at 49659) by debbugs.gnu.org; 20 Jul 2021 13:56:08 +0000 Received: from localhost ([127.0.0.1]:34971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5qE8-0008Sf-GA for submit@debbugs.gnu.org; Tue, 20 Jul 2021 09:56:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5qE6-0008Rh-02 for 49659@debbugs.gnu.org; Tue, 20 Jul 2021 09:56:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44822) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5qDz-0000dO-SC; Tue, 20 Jul 2021 09:55:55 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=42890 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5qDw-0002Mr-BL; Tue, 20 Jul 2021 09:55:52 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210720112712.25905-1-maximedevos@telenet.be> Date: Tue, 20 Jul 2021 15:55:49 +0200 In-Reply-To: <20210720112712.25905-1-maximedevos@telenet.be> (Maxime Devos's message of "Tue, 20 Jul 2021 13:27:12 +0200") Message-ID: <871r7tks2i.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626789507; h=from:from:sender:sender: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; bh=AljNuf2nfvPnLs4U3MUAI414c2lOeoKjo4iC5jY1jGs=; b=r5MtGMwB42LN3gtO9kGWjrkcyyRST0pBgEM5Ss0BR078JrEjrlV6/+aZphyxQyrJ4MJ3Py 4lxCA10ziiWmRQNgQI0uLi0xdb8DR9+VdxCfwI2rBEe3E4rlJw/qbqtW5bRur83OdyQKbI LcUcTgPzPd1nIQS6L0e72ATWtThF2I+vsrxCUL0HuBpP1BVeCXvijGQXfTeYKDezgHPo8+ 8ZnvMxanBraSG7YFD25hkYn/CNGUdbzZ7mP8/XXkibdMrD59XmtsZySVOE28/JcPvervjA ItsyiQGhO9BvceHaX9wn3NEilnMkezUYPBqSTL2SfaFVhGLsXmWQQnS0u6LGBA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626789507; a=rsa-sha256; cv=none; b=TeoPluMu8aXMAjj/gb54NltJYCfmDikThNOEImAmPr4fR6Wg7VusvD5SRTok1cJtjC0jW5 5R/Wlmm7/7EAjg/ocFkym3oFFmVWA4CLNzUmq/ZKz+qX6Y8M+SDJ8pHYHBmxhS17zYiCsI I3qc6mVqV/sCsfj8mckofgIbIGvUgj2mL1YLHT4P/vUbcRMtm8KJO+sFfoVniSKaewWhnI oQD3nkijjuIeMNtHrqivNPThmaWC4Zs8X21LrlSblEa5NHns7Yanfoz3tlCib+4mI5Q4sQ 2WdALkoZ5ZAlIPB6LH6WnrzEnvozGz1S42BxRRDrRis8DBEeXeUGrc2aisuUYw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: A727897D3 X-Spam-Score: -2.92 X-Migadu-Scanner: scn1.migadu.com X-TUID: a1holNQNj/E2 Hi! Maxime Devos skribis: > i586-gnu might have the same issue. Please add a =E2=80=9CFixes =E2=80=A6=E2=80=9D line. > * gnu/packages/guile.scm > (guile-3.0)[arguments]<#:configure-flags>: Add > "-fexcess-precision=3Dstandard" to CFLAGS. Nitpick: the first two lines can be joined. :-) > (substitute-keyword-arguments (package-arguments guile-2.2) > ((#:configure-flags flags ''()) > - (let ((flags `(cons "--enable-mini-gmp" ,flags))) > + ;; -fexcess-precision=3Dstandard is required when compiling for > + ;; i686-linux, otherwise "numbers.test" will fail. > + (let ((flags `(cons* "CFLAGS=3D-g -O2 -fexcess-precision=3Dstand= ard" > + "--enable-mini-gmp" ,flags))) Yay! Questions: 1. Should we make it conditional on (or (string-prefix? "i686-" %host-type) (string-prefix? "i586-" %host-type)) ? (I wonder why armhf-linux doesn=E2=80=99t have the same problem.) 2. Is there any downside to compiling all of libguile with this flag? 3. Do we have a clear explanation of why =E2=80=98-fexcess-precision=3Dfa= st=E2=80=99 (the default) would lead to failures in =E2=80=98numbers.test=E2=80=99? I looked at the GCC manual (info "(gcc) Optimize Options") and at links you provided earlier on IRC, but I can=E2=80=99t really explain how this wo= uld lead those tests to fail: . I added a =E2=80=98printf=E2=80=99 call in =E2=80=98scm_i_inexact_floor_div= ide=E2=80=99, which is where it all happens: --8<---------------cut here---------------start------------->8--- static void scm_i_inexact_floor_divide (double x, double y, SCM *qp, SCM *rp) { if (SCM_UNLIKELY (y =3D=3D 0)) scm_num_overflow (s_scm_floor_divide); /* or return a NaN? */ else { double q =3D floor (x / y); double r =3D x - q * y; printf ("%s x=3D%f y=3D%f x/y=3D%f floor(x/y)=3D%f q=3D%f r=3D%f\n", = __func__, x, y, x/y, floor (x/y), q, r); *qp =3D scm_i_from_double (q); *rp =3D scm_i_from_double (r); } } --8<---------------cut here---------------end--------------->8--- I get this: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (euclidean/ 130. (exact->inexact 10/7)) scm_i_inexact_floor_divide x=3D130.000000 y=3D1.428571 x/y=3D91.000000 floo= r(x/y)=3D90.000000 q=3D90.000000 r=3D1.428571 $1 =3D 90.0 $2 =3D 1.4285714285714257 --8<---------------cut here---------------end--------------->8--- So it=E2=80=99s really =E2=80=98floor=E2=80=99 that=E2=80=99s messing up so= mehow. Perhaps we have to just accept it, use the flag, and be done with it, but that=E2=80=99s frustrating. Thoughts? Ludo=E2=80=99.