From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: bug#31095: [aegisub] error: Aegisub requires that boost be built with ICU support. Date: Sun, 08 Apr 2018 15:13:38 -0400 Message-ID: <87lgdxqzod.fsf@netris.org> References: <87tvslsy0w.fsf@gmail.com> <87sh85smyi.fsf@netris.org> <87muydsmhr.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5FmM-00067V-V3 for bug-guix@gnu.org; Sun, 08 Apr 2018 15:15:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5FmJ-0008N4-2s for bug-guix@gnu.org; Sun, 08 Apr 2018 15:15:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34931) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5FmI-0008Mu-T9 for bug-guix@gnu.org; Sun, 08 Apr 2018 15:15:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f5FmI-0007UD-KV for bug-guix@gnu.org; Sun, 08 Apr 2018 15:15:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87muydsmhr.fsf@gmail.com> (Pierre Neidhardt's message of "Sun, 08 Apr 2018 21:45:28 +0530") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Pierre Neidhardt Cc: 31095@debbugs.gnu.org --=-=-= Content-Type: text/plain Pierre Neidhardt 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 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-boost-Fix-ICU-support.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] gnu: boost: Fix ICU support >From 62a9ef1337010771c9f79c64e7b84a855c45df1f Mon Sep 17 00:00:00 2001 From: Mark H Weaver 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=3D... 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 =3D \ %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 =C2=A9 2014 John Darrington -;;; Copyright =C2=A9 2014, 2015 Mark H Weaver +;;; Copyright =C2=A9 2014, 2015, 2018 Mark H Weaver ;;; Copyright =C2=A9 2015 Andreas Enge ;;; Copyright =C2=A9 2016 Eric Bavier ;;; Copyright =C2=A9 2015 Ludovic Court=C3=A8s @@ -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 @@ =20 (invoke "./bootstrap.sh" (string-append "--prefix=3D" out) + ;; Auto-detection looks for ICU only in traditional + ;; install locations. + (string-append "--with-icu=3D" icu) "--with-toolset=3Dgcc")))) (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=3Dc++11 when compiling files that include the ICU headers. With= out +this flag, compilation fails and causes Boost's build system to remove ICU +support. Note that $(pkg-config --variable=3DCXXFLAGS icu-uc) includes +"-std=3Dc++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.000= 000000 -0500 ++++ boost_1_66_0/libs/locale/build/Jamfile.v2 2018-04-08 14:13:17.95348478= 7 -0400 +@@ -65,8 +65,8 @@ +=20 + if $(ICU_LINK) + { +- ICU_OPTS =3D $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin shared ; +- ICU64_OPTS =3D $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin64 shared ; ++ ICU_OPTS =3D $(ICU_PATH)/include -std=3Dc++11 $(ICU_LINK) $(ICU_PATH)/bin shared ; ++ ICU64_OPTS =3D $(ICU_PATH)/include -std=3Dc++11 $(ICU_LINK) $(ICU_PATH)/bin64 shared ; + } + else + { +@@ -120,7 +120,8 @@ +=20 + explicit icuuc icudt icuin ; +=20 +- ICU_OPTS =3D $(ICU_PATH)/include=20 ++ ICU_OPTS =3D $(ICU_PATH)/include ++ -std=3Dc++11 + icuuc/shared/shared=20 + icudt/shared/shared=20 + icuin/shared/shared +@@ -179,7 +180,8 @@ +=20 + explicit icuuc_64 icudt_64 icuin_64 ; +=20 +- ICU64_OPTS =3D $(ICU_PATH)/include=20 ++ ICU64_OPTS =3D $(ICU_PATH)/include ++ -std=3Dc++11 + icuuc_64/shared/shared=20 + icudt_64/shared/shared=20 + icuin_64/shared/shared +--- boost_1_66_0/libs/regex/build/Jamfile.v2.orig 2017-12-13 18:56:48.0000= 00000 -0500 ++++ boost_1_66_0/libs/regex/build/Jamfile.v2 2018-04-08 14:11:56.405080410= -0400 +@@ -44,7 +44,7 @@ +=20 + if $(ICU_LINK) + { +- ICU_OPTS =3D $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin BOOST_HAS_ICU=3D1 shared ; ++ ICU_OPTS =3D $(ICU_PATH)/include -std=3Dc++11 $(ICU_LINK) $(ICU_PATH)/bin BOOST_HAS_ICU=3D1 shared ; + } + else + { +@@ -77,7 +77,8 @@ + lib icuin : : this_is_an_invalid_library_name ; +=20 + ICU_OPTS =3D=20 +- $(ICU_PATH)/include=20 ++ $(ICU_PATH)/include ++ -std=3Dc++11 + shared:icuuc/shared + shared:icudt/shared + shared:icuin/shared --=20 2.16.3 --=-=-=--