guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch core-updates-frozen updated: gnu: librime: Fix build with GCC 10.


From: guix-commits
Subject: branch core-updates-frozen updated: gnu: librime: Fix build with GCC 10.
Date: Tue, 07 Sep 2021 14:12:48 -0400

This is an automated email from the git hooks/post-receive script.

lfam pushed a commit to branch core-updates-frozen
in repository guix.

The following commit(s) were added to refs/heads/core-updates-frozen by this 
push:
     new d5a1206  gnu: librime: Fix build with GCC 10.
d5a1206 is described below

commit d5a1206beb06678a2cb3ffcc25b687bb9fbfec74
Author: Felix Gruber <felgru@posteo.net>
AuthorDate: Mon Sep 6 17:42:44 2021 +0000

    gnu: librime: Fix build with GCC 10.
    
    * gnu/packages/ibus.scm (librime)[source]: Add a patch that adds missing
    includes.
    * gnu/packages/patches/librime-fix-build-with-gcc10.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    
    Signed-off-by: Leo Famulari <leo@famulari.name>
---
 gnu/local.mk                                       |  1 +
 gnu/packages/ibus.scm                              |  2 ++
 .../patches/librime-fix-build-with-gcc10.patch     | 41 ++++++++++++++++++++++
 3 files changed, 44 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index 7e5d648..dab8203 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1287,6 +1287,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/libblockdev-glib-compat.patch           \
   %D%/packages/patches/libffi-3.3-powerpc-fixes.patch          \
   %D%/packages/patches/libffi-float128-powerpc64le.patch       \
+  %D%/packages/patches/librime-fix-build-with-gcc10.patch      \
   %D%/packages/patches/libvirt-add-install-prefix.patch        \
   %D%/packages/patches/libziparchive-add-includes.patch                \
   %D%/packages/patches/localed-xorg-keyboard.patch             \
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 4cec104..297d490 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2018, 2019, 2020, 2021 Peng Mei Yu <pengmeiyu@riseup.net>
 ;;; Copyright © 2020 kanichos <kanichos@yandex.ru>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -367,6 +368,7 @@ Japanese language input in most graphical applications.")
        (sha256
         (base32
          "0pqk0i3zcii3fx5laj9qzbgd58jvq6wn31j76w4zix2i4b1lqcqv"))
+       (patches (search-patches "librime-fix-build-with-gcc10.patch"))
        (modules '((guix build utils)))
        (snippet
         '(begin
diff --git a/gnu/packages/patches/librime-fix-build-with-gcc10.patch 
b/gnu/packages/patches/librime-fix-build-with-gcc10.patch
new file mode 100644
index 0000000..49ad011
--- /dev/null
+++ b/gnu/packages/patches/librime-fix-build-with-gcc10.patch
@@ -0,0 +1,41 @@
+From: Felix Gruber <felgru@posteo.net>
+Date: Mon, 6 Sep 2021 19:38:17 +0200
+Subject: [PATCH] Add missing <cmath> includes
+
+Fix a build failure with GCC 10 that manifests like this:
+
+------
+/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc: 
In member function ‘void rime::ScriptTranslation::PrepareCandidate()’:
+/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc:490:23:
 error: ‘exp’ was not declared in this scope
+  490 |     cand->set_quality(exp(entry->weight) +
+      |                       ^~~
+/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc:504:23:
 error: ‘exp’ was not declared in this scope
+  504 |     cand->set_quality(exp(entry->weight) +
+      |                       ^~~
+make[2]: *** [src/CMakeFiles/rime.dir/build.make:1241: 
src/CMakeFiles/rime.dir/rime/gear/script_translator.cc.o] Error 1
+------
+
+diff --git a/src/rime/gear/script_translator.cc 
b/src/rime/gear/script_translator.cc
+index 4a45f05..515c8db 100644
+--- a/src/rime/gear/script_translator.cc
++++ b/src/rime/gear/script_translator.cc
+@@ -7,6 +7,7 @@
+ // 2011-07-10 GONG Chen <chen.sst@gmail.com>
+ //
+ #include <algorithm>
++#include <cmath>
+ #include <stack>
+ #include <boost/algorithm/string/join.hpp>
+ #include <boost/range/adaptor/reversed.hpp>
+diff --git a/src/rime/gear/table_translator.cc 
b/src/rime/gear/table_translator.cc
+index 162ac02..dbea76a 100644
+--- a/src/rime/gear/table_translator.cc
++++ b/src/rime/gear/table_translator.cc
+@@ -4,6 +4,7 @@
+ //
+ // 2011-07-10 GONG Chen <chen.sst@gmail.com>
+ //
++#include <cmath>
+ #include <boost/algorithm/string.hpp>
+ #include <boost/range/adaptor/reversed.hpp>
+ #include <utf8.h>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]