From: Mark H Weaver <mhw@netris.org>
To: Pierre Neidhardt <ambrevar@gmail.com>
Cc: 31095@debbugs.gnu.org
Subject: bug#31095: [aegisub] error: Aegisub requires that boost be built with ICU support.
Date: Sun, 08 Apr 2018 15:13:38 -0400 [thread overview]
Message-ID: <87lgdxqzod.fsf@netris.org> (raw)
In-Reply-To: <87muydsmhr.fsf@gmail.com> (Pierre Neidhardt's message of "Sun, 08 Apr 2018 21:45:28 +0530")
[-- Attachment #1: Type: text/plain, Size: 867 bytes --]
Pierre Neidhardt <ambrevar@gmail.com> writes:
> Thanks for the feedback!
>
>> However, the first step is to figure out why 'boost' is failing to find
>> icu4c. Would you like to investigate?
>
> I usually happily answer "yes" to those questions, but this time I'll
> pass: aegisub is not really a priority for me at the moment and I don't
> have a great opinion of boost, so...
>
> Anyone else? :p
That's okay, I appreciate the bug report nonetheless.
I worked on it, and the following preliminary patch seems to fix the
problem for me on 'core-updates'. I didn't try building aegisub, but
boost builds with messages suggesting that ICU support is now included.
If someone's motivated to do so, they could fix 'aegisub' on master by
adding a 'boost/fixed' package that inherits from 'boost' but includes
the fixes included in the following patch.
Mark
[-- Attachment #2: [PATCH] gnu: boost: Fix ICU support --]
[-- Type: text/x-patch, Size: 6447 bytes --]
From 62a9ef1337010771c9f79c64e7b84a855c45df1f Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Sun, 8 Apr 2018 14:40:00 -0400
Subject: [PATCH] gnu: boost: Fix ICU support.
* gnu/packages/patches/boost-fix-icu-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/boost.scm (boost)[source]: Add the patch.
[arguments]: In the custom configure phase, pass --with-icu=...
to ./bootstrap.sh
---
gnu/local.mk | 1 +
gnu/packages/boost.scm | 13 ++++--
gnu/packages/patches/boost-fix-icu-build.patch | 59 ++++++++++++++++++++++++++
3 files changed, 69 insertions(+), 4 deletions(-)
create mode 100644 gnu/packages/patches/boost-fix-icu-build.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 6cf49ad07..5888d32f5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -577,6 +577,7 @@ dist_patch_DATA = \
%D%/packages/patches/bcftools-regidx-unsigned-char.patch \
%D%/packages/patches/binutils-loongson-workaround.patch \
%D%/packages/patches/blast+-fix-makefile.patch \
+ %D%/packages/patches/boost-fix-icu-build.patch \
%D%/packages/patches/btrfs-progs-e-value-block.patch \
%D%/packages/patches/byobu-writable-status.patch \
%D%/packages/patches/cairo-CVE-2016-9082.patch \
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 674877a88..6b17e30a8 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
-;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
@@ -52,7 +52,8 @@
".tar.bz2"))
(sha256
(base32
- "1aaw48cmimsskzgiclwn0iifp62a5iw9cbqrhfari876af1828ap"))))
+ "1aaw48cmimsskzgiclwn0iifp62a5iw9cbqrhfari876af1828ap"))
+ (patches (search-patches "boost-fix-icu-build.patch"))))
(build-system gnu-build-system)
(inputs `(("icu4c" ,icu4c)
("zlib" ,zlib)))
@@ -81,8 +82,9 @@
(modify-phases %standard-phases
(delete 'bootstrap)
(replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((icu (assoc-ref inputs "icu4c"))
+ (out (assoc-ref outputs "out")))
(substitute* '("libs/config/configure"
"libs/spirit/classic/phoenix/test/runtest.sh"
"tools/build/doc/bjam.qbk"
@@ -96,6 +98,9 @@
(invoke "./bootstrap.sh"
(string-append "--prefix=" out)
+ ;; Auto-detection looks for ICU only in traditional
+ ;; install locations.
+ (string-append "--with-icu=" icu)
"--with-toolset=gcc"))))
(replace 'build
(lambda* (#:key make-flags #:allow-other-keys)
diff --git a/gnu/packages/patches/boost-fix-icu-build.patch b/gnu/packages/patches/boost-fix-icu-build.patch
new file mode 100644
index 000000000..389f60e30
--- /dev/null
+++ b/gnu/packages/patches/boost-fix-icu-build.patch
@@ -0,0 +1,59 @@
+Pass -std=c++11 when compiling files that include the ICU headers. Without
+this flag, compilation fails and causes Boost's build system to remove ICU
+support. Note that $(pkg-config --variable=CXXFLAGS icu-uc) includes
+"-std=c++11", but Boost's build system does not use 'pkg-config'.
+
+--- boost_1_66_0/libs/locale/build/Jamfile.v2.orig 2017-12-13 18:56:44.000000000 -0500
++++ boost_1_66_0/libs/locale/build/Jamfile.v2 2018-04-08 14:13:17.953484787 -0400
+@@ -65,8 +65,8 @@
+
+ if $(ICU_LINK)
+ {
+- ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <runtime-link>shared ;
+- ICU64_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin64 <runtime-link>shared ;
++ ICU_OPTS = <include>$(ICU_PATH)/include <cxxflags>-std=c++11 <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <runtime-link>shared ;
++ ICU64_OPTS = <include>$(ICU_PATH)/include <cxxflags>-std=c++11 <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin64 <runtime-link>shared ;
+ }
+ else
+ {
+@@ -120,7 +120,8 @@
+
+ explicit icuuc icudt icuin ;
+
+- ICU_OPTS = <include>$(ICU_PATH)/include
++ ICU_OPTS = <include>$(ICU_PATH)/include
++ <cxxflags>-std=c++11
+ <library>icuuc/<link>shared/<runtime-link>shared
+ <library>icudt/<link>shared/<runtime-link>shared
+ <library>icuin/<link>shared/<runtime-link>shared
+@@ -179,7 +180,8 @@
+
+ explicit icuuc_64 icudt_64 icuin_64 ;
+
+- ICU64_OPTS = <include>$(ICU_PATH)/include
++ ICU64_OPTS = <include>$(ICU_PATH)/include
++ <cxxflags>-std=c++11
+ <library>icuuc_64/<link>shared/<runtime-link>shared
+ <library>icudt_64/<link>shared/<runtime-link>shared
+ <library>icuin_64/<link>shared/<runtime-link>shared
+--- boost_1_66_0/libs/regex/build/Jamfile.v2.orig 2017-12-13 18:56:48.000000000 -0500
++++ boost_1_66_0/libs/regex/build/Jamfile.v2 2018-04-08 14:11:56.405080410 -0400
+@@ -44,7 +44,7 @@
+
+ if $(ICU_LINK)
+ {
+- ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <define>BOOST_HAS_ICU=1 <runtime-link>shared ;
++ ICU_OPTS = <include>$(ICU_PATH)/include <cxxflags>-std=c++11 <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <define>BOOST_HAS_ICU=1 <runtime-link>shared ;
+ }
+ else
+ {
+@@ -77,7 +77,8 @@
+ lib icuin : : <name>this_is_an_invalid_library_name ;
+
+ ICU_OPTS =
+- <include>$(ICU_PATH)/include
++ <include>$(ICU_PATH)/include
++ <cxxflags>-std=c++11
+ <runtime-link>shared:<library>icuuc/<link>shared
+ <runtime-link>shared:<library>icudt/<link>shared
+ <runtime-link>shared:<library>icuin/<link>shared
--
2.16.3
next prev parent reply other threads:[~2018-04-08 19:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-08 12:06 bug#31095: [aegisub] error: Aegisub requires that boost be built with ICU support Pierre Neidhardt
2018-04-08 16:05 ` Mark H Weaver
2018-04-08 16:15 ` Pierre Neidhardt
2018-04-08 19:13 ` Mark H Weaver [this message]
2018-04-10 6:32 ` Mark H Weaver
2018-11-02 5:19 ` Leo Famulari
2018-11-25 17:58 ` Björn Höfling
2018-11-25 19:44 ` Björn Höfling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lgdxqzod.fsf@netris.org \
--to=mhw@netris.org \
--cc=31095@debbugs.gnu.org \
--cc=ambrevar@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.