Subject: bug#26167: closed (Re: bug#26167: core-updates: Fix graphite2 test failure on 32-bit systems)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 19 Mar 2017 21:39:02 +0000

Your bug report

#26167: core-updates: Fix graphite2 test failure on 32-bit systems

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
26167: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26167
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#26167: core-updates: Fix graphite2 test failure on 32-bit systems
From: Leo Famulari <[email-masked]>
To: [email-masked]
Date: Sun, 19 Mar 2017 17:38:42 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On Sun, Mar 19, 2017 at 05:10:15AM +0100, John Darrington wrote:
> 
> On Sat, Mar 18, 2017 at 11:03:19PM -0400, Leo Famulari wrote:
>      Graphite2 is failing its test suite on core-updates. [0]
>      
>      https://hydra.gnu.org/build/1923151
>      
>      This patch cherry-picks the upstream change that builds graphite2 with
>      -ffloat-store to avoid rounding errors on some platforms:
>      
> I  cannot see any reason why you shouldn't push this change.
> 
> J'
> 
> -- 
> Avoid eavesdropping.  Send strong encrypted email.
> PGP Public key ID: 1024D/2DE827B3 
> fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
> See http://sks-keyservers.net or any PGP keyserver for public key.
> 

Closed

Subject: core-updates: Fix graphite2 test failure on 32-bit systems
From: Leo Famulari <[email-masked]>
To: [email-masked]
Date: Sat, 18 Mar 2017 23:03:19 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Graphite2 is failing its test suite on core-updates. [0]

https://hydra.gnu.org/build/1923151

This patch cherry-picks the upstream change that builds graphite2 with
-ffloat-store to avoid rounding errors on some platforms:

https://github.com/silnrsi/graphite/commit/f7bbdd87d510d587c872e314d6458160c0069c65

There is some more discussion in this Debian bug report:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855814
From 498d0ffdfab38fd3ec3c531a9f306513ba29f362 Mon Sep 17 00:00:00 2001
From: Leo Famulari <[email-masked]>
Date: Sat, 18 Mar 2017 22:58:14 -0400
Subject: [PATCH] gnu: graphite2: Fix test failure caused by rounding error on
 32-bit CPUs.

* gnu/packages/patches/graphite2-ffloat-store.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/fontutils.scm (graphite2): Use it.
---
 gnu/local.mk                                      |  1 +
 gnu/packages/fontutils.scm                        |  2 ++
 gnu/packages/patches/graphite2-ffloat-store.patch | 34 +++++++++++++++++++++++
 3 files changed, 37 insertions(+)
 create mode 100644 gnu/packages/patches/graphite2-ffloat-store.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 3b2bde729..9fc595386 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -606,6 +606,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
   %D%/packages/patches/gobject-introspection-cc.patch		\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
+  %D%/packages/patches/graphite2-ffloat-store.patch		\
   %D%/packages/patches/grep-timing-sensitive-test.patch		\
   %D%/packages/patches/grub-CVE-2015-8370.patch			\
   %D%/packages/patches/grub-gets-undeclared.patch		\
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 46c658b66..7e7234960 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2016, 2017 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2017 Rene Saavedra <[email-masked]>
+;;; Copyright © 2017 Leo Famulari <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -380,6 +381,7 @@ applications should be.")
        (method url-fetch)
        (uri (string-append "https://github.com/silnrsi/graphite/releases/"
                            "download/" version "/" name "-" version ".tgz"))
+       (patches (search-patches "graphite2-ffloat-store.patch"))
        (sha256
         (base32
          "0rs5h7m340z75kygx8d72cps0q6yvvqa9i788vym7585cfv8a0gc"))))
diff --git a/gnu/packages/patches/graphite2-ffloat-store.patch b/gnu/packages/patches/graphite2-ffloat-store.patch
new file mode 100644
index 000000000..f6ee56973
--- /dev/null
+++ b/gnu/packages/patches/graphite2-ffloat-store.patch
@@ -0,0 +1,34 @@
+Fix test failures of awamicmp1 and awamicmp2.
+
+Debian bug report:
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855814
+
+Patch adapted from upstream source repository:
+
+https://github.com/silnrsi/graphite/commit/f7bbdd87d510d587c872e314d6458160c0069c65
+
+From f7bbdd87d510d587c872e314d6458160c0069c65 Mon Sep 17 00:00:00 2001
+From: Martin Hosken <[email-masked]>
+Date: Tue, 14 Feb 2017 17:00:03 +0000
+Subject: [PATCH] try -ffloat-store for fp stability. Remove nested const to
+ work around VS bug
+
+---
+ src/CMakeLists.txt    | 2 +-
+ src/inc/locale2lcid.h | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 4f1e7e5..5b61b5c 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -108,7 +108,7 @@ set_target_properties(graphite2 PROPERTIES  PUBLIC_HEADER "${GRAPHITE_HEADERS}"
+ 
+ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+     set_target_properties(graphite2 PROPERTIES 
+-        COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector"
++        COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector -ffloat-store"
+         LINK_FLAGS      "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}" 
+         LINKER_LANGUAGE C)
+     if (CMAKE_COMPILER_IS_GNUCXX)
-- 
2.12.0