Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439892 (icu-50_c++11) - [TRACKER] C++ packages incompatible with ICU >=50[c++11]
Summary: [TRACKER] C++ packages incompatible with ICU >=50[c++11]
Status: RESOLVED OBSOLETE
Alias: icu-50_c++11
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal with 2 votes (vote)
Assignee: Arfrever Frehtes Taifersar Arahesis
URL:
Whiteboard:
Keywords: Tracker
Depends on: 439696 439698 439998 440020 440156 440204 440620 441812 442514
Blocks:
  Show dependency tree
 
Reported: 2012-10-27 15:30 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2017-10-03 22:30 UTC (History)
14 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
temporarily disable c++11 (icu.patch,1.16 KB, patch)
2012-11-01 19:45 UTC, Huang Hang
Details | Diff
Disable C++ 2011 test (icu-no-cxx11.patch,1.65 KB, patch)
2012-11-02 14:31 UTC, Andrew John Hughes
Details | Diff
Disable C++ 2011 test (configure.in version) (remove-c++11-test.patch,1.70 KB, patch)
2012-11-04 10:09 UTC, Paul Zander
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2012-10-27 15:30:14 UTC
C++ packages using ICU must use the same version of C++ standard, which is used for building of ICU.
ICU 50 uses C++11 (ISO/IEC 14882:2011) standard, when GCC >=4.7 is used.

C++ packages using ICU should use one of the following commands to get flags required for compilation of C++ sources:
  icu-config --cxxflags
  pkg-config icu-i18n --variable CXXFLAGS
  pkg-config icu-io --variable CXXFLAGS
  pkg-config icu-le --variable CXXFLAGS
  pkg-config icu-lx --variable CXXFLAGS
  pkg-config icu-uc --variable CXXFLAGS
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2012-11-01 02:39:00 UTC
No, it can NOT store CXX flags in pkg-config that aren't supported by previous compiler versions.  This is completely broken.  Please force ICU to not use C++11 unless explicitly instructed to.  When 4.7 goes into stable then we can revisit.
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2012-11-01 02:49:15 UTC
Also note I consider this a blocker for 4.7 unmasking.
Comment 3 Hristo Venev 2012-11-01 16:22:36 UTC
Does upstream require C++11 on ICU 50?
Comment 4 Huang Hang 2012-11-01 19:45:35 UTC
Created attachment 327982 [details, diff]
temporarily disable c++11


According to the changelog given by Arfrever in another thread (Bug 439698):

https://ssl.icu-project.org/trac/changeset/32179

The upstream developers are trying to enable -std=c++11 once the compiler supports it. If the test code utilizing -std=c++11 in configure fails, it just fallback to the old way and still works fine.

I've tried to hack the configure script to make the test fail in GCC 4.7. With the rebuilt ICU without c++11, most of the packages previously failed to be built against GCC 4.7 and ICU 50 now build OK (such as gptfdisk, chromium etc.).

Since many packages aren't c++11 ready, I suggest temporarily disable c++11/gnu++11 support in ICU 50 until the new standard is commonly supported (at least build-support).

A trivial reverting patch works. Maybe a more appropriate fix should be proposed.
Comment 5 Arfrever Frehtes Taifersar Arahesis 2012-11-01 21:45:16 UTC
Tracker bugs are not for any discussions.
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2012-11-02 01:34:45 UTC
No, the discussion will happen here because this is the bug blocking 4.7 unmasking.  And as soon as it's resolved this tracker will be closed as invalid.
Comment 7 Andrew John Hughes 2012-11-02 14:31:33 UTC
Created attachment 328084 [details, diff]
Disable C++ 2011 test

I've rebuilt ICU with a similar patch, though this takes out the entire test rather than replacing the flag.  I also took the logic that adds the flag into the pkg-config output out of the ebuild so consumers that do use pkg-config don't pick it up.

With this change, all dependencies of ICU could be rebuilt, including Chromium & gpftdisk.  I think this is the best solution for now, while this standard is still pretty new and not widely supported.
Comment 8 Paul Zander 2012-11-04 10:09:42 UTC
Created attachment 328294 [details, diff]
Disable C++ 2011 test (configure.in version)

This achieves the same as the patch before only in configure.in and would require running eautoreconf afterwards. But it might be a cleaner solution than patching "temporary" files.
Comment 9 Jason Lamb 2012-11-09 00:09:13 UTC
FWIW. I tried applying separately, all three patches from this bug report, on the current masked dev-libs/icu-50.1, and then tried to re-emerge sys-apps/gptfdisk-0.8.5 and www-client/chromium-23.0.1271.64, which were failing on my system with the errors reported in bugs 439698 and 439696.

Patch #1 from Comment #4, gptfdisk and chromium emerged cleanly
Patch #2 from Comment #7, gptfdisk and chromium emerge failed
Patch #3 from Comment #8, gptfdisk and chromium emerged cleanly

Thanks..
Comment 10 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-11-10 22:49:11 UTC
(In reply to comment #8)
> Created attachment 328294 [details, diff] [details, diff]
> Disable C++ 2011 test (configure.in version)
> 
> This achieves the same as the patch before only in configure.in and would
> require running eautoreconf afterwards. But it might be a cleaner solution
> than patching "temporary" files.

Thank you. I committed your patch in icu-50.1-r1.
Comment 11 Steven R. Loomis 2012-11-15 01:21:53 UTC
Folks,
Concerning   http://bugs.icu-project.org/trac/ticket/9717 disabling C++11 in ICU 50, It is now marked as wontfix.

 Please instead try the patch ICU#9728 which changes the char type without disabling C++11
You can view the patch at:
  http://bugs.icu-project.org/trac/review/9728

You can view ICU#9728 at:
  http://bugs.icu-project.org/trac/ticket/9728  

This is very critical, as we want to make sure that ICU#9728 ( fixing UChar type ) solves ALL of the issues that ICU#9717 was intending to solve, including ABI compatibility.

Kindly reply by commenting on ICU#9728 as to whether patch ICU#9728 solves your issue or not.

Thanks,
 Steven for the entire ICU team
Comment 12 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-11-15 04:58:26 UTC
(In reply to comment #11)
>  Please instead try the patch ICU#9728 which changes the char type without
> disabling C++11
> You can view the patch at:
>   http://bugs.icu-project.org/trac/review/9728

Applied in icu-50.1-r2 instead of the previous patch, thanks!

> This is very critical, as we want to make sure that ICU#9728 ( fixing UChar
> type ) solves ALL of the issues that ICU#9717 was intending to solve,
> including ABI compatibility.

Good to hear that. I hope Gentoo is a pretty good platform for this kind of experiments. :)

> Kindly reply by commenting on ICU#9728 as to whether patch ICU#9728 solves
> your issue or not.

I'll request more testing on gentoo-dev and possibly other places. Those ABI issues can be tricky, and we have some special cases as a from-source distro (like upgrading and downgrading the compiler etc).

If you don't hear back in a while, feel free to ping me.
Comment 13 Arfrever Frehtes Taifersar Arahesis 2012-11-15 06:55:12 UTC
(In reply to comment #12)
> Applied in icu-50.1-r2

Changes in ebuild are incomplete. ICU must have "c++11" USE flag to allow users to enable UChar=char16_t. This USE flag is available in master ebuild of ICU:
http://code.google.com/p/gentoo-progress/source/detail?r=2791
Comment 14 Ulenrich 2012-11-18 14:17:45 UTC
Just as a feedback from me as a user:
All is now compiling and running without segfaults as far as I see!

# qlist -Iv chromium gcc glibc icu binutils libreoffice
app-office/libreoffice-3.6.3.2
dev-libs/icu-50.1-r2
sys-devel/binutils-2.23.1
sys-devel/binutils-config-3-r3
sys-devel/gcc-4.7.2
sys-devel/gcc-config-1.7.3
sys-libs/glibc-2.16.0
www-client/chromium-24.0.1312.14
x11-misc/gccmakedep-1.0.2-r1
Comment 15 Ulenrich 2012-11-18 14:20:24 UTC
And, of cause: 
dev-libs/boost-1.52.0-r2
Comment 16 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-11-28 19:02:08 UTC
(In reply to comment #11)
> Kindly reply by commenting on ICU#9728 as to whether patch ICU#9728 solves
> your issue or not.
> 
> Thanks,
>  Steven for the entire ICU team

For now replying here (I have an account on ICU trac but rarely use it, will try to get back to it soon):

Yeah, patch from ICU#9728 seems to work here for many people. Thank you!

(In reply to comment #13)
> Changes in ebuild are incomplete. ICU must have "c++11" USE flag to allow
> users to enable UChar=char16_t. This USE flag is available in master ebuild
> of ICU:
> http://code.google.com/p/gentoo-progress/source/detail?r=2791

Arfrever, unfortunately after this whole mess I don't trust any patches from that overlay. If anyone else wants to deal with possible problems, fine.
Comment 17 Ryan Hill (RETIRED) gentoo-dev 2013-01-07 01:12:05 UTC
Thanks guys.  I'm dropping the blocker.