Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439698 - www-client/chromium-24.0.1305.3 fails to build with ICU 50 and GCC 4.7
Summary: www-client/chromium-24.0.1305.3 fails to build with ICU 50 and GCC 4.7
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All All
: Normal normal
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: icu-50_c++11
  Show dependency tree
 
Reported: 2012-10-26 01:03 UTC by iGentoo
Modified: 2012-11-28 19:03 UTC (History)
20 users (show)

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


Attachments
chromium-24.0.1305.3-build.log.tar.xz (chromium-24.0.1305.3-build.log.tar.xz,267.13 KB, application/x-xz-compressed-tar)
2012-10-26 01:05 UTC, iGentoo
Details
Phr33d0m: chromium-24.0.1305.3.log.tar.xz (chromium-24.0.1305.3.log.tar.xz,238.44 KB, text/plain)
2012-10-26 13:22 UTC, Denis M. (Phr33d0m)
Details
compile with -std=c++11 (char16_t.tar.xz,4.85 KB, application/x-xz-compressed-tar)
2012-11-02 22:56 UTC, iGentoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description iGentoo 2012-10-26 01:03:57 UTC
out/Release/obj.target/chrome/libbrowser.a(out/Release/obj.target/chrome/../browser/chrome/browser/instant/instant_controller.o):instant_controller.cc:function (anonymous namespace)::Normalize(std::basic_string<unsigned short, base::string16_char_traits, std::allocator<unsigned short> > const&): error: undefined reference to 'icu::UnicodeString::UnicodeString(signed char, unsigned short const*, int)'
out/Release/obj.target/chrome/libbrowser.a(out/Release/obj.target/chrome/../browser/chrome/browser/signin/signin_manager.o):signin_manager.cc:function SigninManager::IsAllowedUsername(std::string const&) const: error: undefined reference to 'icu::UnicodeString::UnicodeString(unsigned short const*, int)'
out/Release/obj.target/chrome/libbrowser.a(out/Release/obj.target/chrome/../browser/chrome/browser/signin/signin_manager.o):signin_manager.cc:function SigninManager::IsAllowedUsername(std::string const&) const: error: undefined reference to 'icu::UnicodeString::UnicodeString(unsigned short const*, int)'
out/Release/obj.target/chrome/libbrowser.a(out/Release/obj.target/chrome/../browser/chrome/browser/autofill/autofill_country.o):autofill_country.cc:function (anonymous namespace)::CountryNames::GetSortKey(icu::Collator const&, std::basic_string<unsigned short, base::string16_char_traits, std::allocator<unsigned short> > const&, scoped_array<unsigned char>*, int*) const [clone .isra.30]: error: undefined reference to 'icu::UnicodeString::UnicodeString(unsigned short const*, int)'
out/Release/obj.target/chrome/libbrowser.a(out/Release/obj.target/chrome/../browser/chrome/browser/autofill/autofill_regexes.o):autofill_regexes.cc:function autofill::MatchesPattern(std::basic_string<unsigned short, base::string16_char_traits, std::allocator<unsigned short> > const&, std::basic_string<unsigned short, base::string16_char_traits, std::allocator<unsigned short> > const&): error: undefined reference to 'icu::UnicodeString::UnicodeString(unsigned short const*, int)'
out/Release/obj.target/chrome/librenderer.a(out/Release/obj.target/chrome/../renderer/chrome/renderer/spellchecker/spellcheck_worditerator.o):spellcheck_worditerator.cc:function SpellcheckWordIterator::Normalize(int, int, std::basic_string<unsigned short, base::string16_char_traits, std::allocator<unsigned short> >*) const: error: undefined reference to 'icu::UnicodeString::UnicodeString(signed char, unsigned short const*, int)'
out/Release/obj.target/ui/libui.a(out/Release/obj.target/ui/ui/base/text/text_elider.o):text_elider.cc:function ui::TruncateString(std::basic_string<unsigned short, base::string16_char_traits, std::allocator<unsigned short> > const&, unsigned long): error: undefined reference to 'icu::UnicodeString::UnicodeString(unsigned short const*)'
out/Release/obj.target/ui/libui.a(out/Release/obj.target/ui/ui/base/text/text_elider.o):text_elider.cc:function ui::TruncateString(std::basic_string<unsigned short, base::string16_char_traits, std::allocator<unsigned short> > const&, unsigned long): error: undefined reference to 'icu::UnicodeString::UnicodeString(unsigned short const*)'
out/Release/obj.target/third_party/sfntly/libsfntly.a(out/Release/obj.target/third_party/sfntly/../../sfntly/third_party/sfntly/cpp/src/sample/chromium/subsetter_impl.o):subsetter_impl.cc:function sfntly::SubsetterImpl::LoadFont(char const*, unsigned char const*, unsigned long): error: undefined reference to 'icu::UnicodeString::UnicodeString(unsigned short const*)'
out/Release/obj.target/third_party/sfntly/libsfntly.a(out/Release/obj.target/third_party/sfntly/../../sfntly/third_party/sfntly/cpp/src/sample/chromium/subsetter_impl.o):subsetter_impl.cc:function sfntly::SubsetterImpl::LoadFont(char const*, unsigned char const*, unsigned long): error: undefined reference to 'icu::UnicodeString::doCaseCompare(int, int, unsigned short const*, int, int, unsigned int) const'
out/Release/obj.target/third_party/sfntly/libsfntly.a(out/Release/obj.target/third_party/sfntly/../../sfntly/third_party/sfntly/cpp/src/sample/chromium/subsetter_impl.o):subsetter_impl.cc:function sfntly::SubsetterImpl::LoadFont(char const*, unsigned char const*, unsigned long): error: undefined reference to 'icu::UnicodeString::doCaseCompare(int, int, unsigned short const*, int, int, unsigned int) const'
out/Release/obj.target/third_party/sfntly/libsfntly.a(out/Release/obj.target/third_party/sfntly/../../sfntly/third_party/sfntly/cpp/src/sample/chromium/subsetter_impl.o):subsetter_impl.cc:function sfntly::SubsetterImpl::LoadFont(char const*, unsigned char const*, unsigned long): error: undefined reference to 'icu::UnicodeString::UnicodeString(unsigned short const*)'
out/Release/obj.target/third_party/cld/libcld.a(out/Release/obj.target/third_party/cld/../../cld/third_party/cld/encodings/compact_lang_det/win/cld_unicodetext.o):cld_unicodetext.cc:function NormalizeText(unsigned short const*): error: undefined reference to 'icu::UnicodeString::UnicodeString(signed char, unsigned short const*, int)'
out/Release/obj.target/chrome/libcommon.a(out/Release/obj.target/chrome/../common/chrome/common/time_format.o):time_format.cc:function FormatTimeImpl(base::TimeDelta const&, (anonymous namespace)::FormatType): error: undefined reference to 'icu::UnicodeString::extract(unsigned short*, int, UErrorCode&) const'
collect2: error: ld returned 1 exit status
make: *** [out/Release/chrome] Error 1
 * ERROR: www-client/chromium-24.0.1305.3 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=www-client/chromium-24.0.1305.3'`,
 * the complete build log and the output of `emerge -pqv '=www-client/chromium-24.0.1305.3'`.
 * The complete build log is located at '/var/log/portage/build/www-client/chromium-24.0.1305.3:20121025-232125.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/www-client/chromium-24.0.1305.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/chromium-24.0.1305.3/temp/environment'.
 * Working directory: '/var/tmp/portage/www-client/chromium-24.0.1305.3/work/chromium-24.0.1305.3'
 * S: '/var/tmp/portage/www-client/chromium-24.0.1305.3/work/chromium-24.0.1305.3'


emerge --info chromium icu
Portage 2.2.0_alpha141 (hardened/linux/amd64/selinux, gcc-4.7.2, glibc-2.16.0, 3.7.0-rc2-custom x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.7.0-rc2-custom-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-gentoo-2.2
Timestamp of tree: Fri, 26 Oct 2012 00:15:01 +0000
ccache version 3.1.8 [disabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1, 3.3.0
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.9-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.2
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.4
sys-devel/binutils:       2.23
sys-devel/gcc:            4.6.3, 4.7.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo systemd hardened-dev custom
Installed sets: @local-protected
ACCEPT_KEYWORDS="amd64 x86 ~amd64 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize"
DISTDIR="/usr/local/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles multilib-strict news parallel-fetch preserve-libs protect-owned sandbox selinux sesandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.163.com/gentoo http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--icf=safe"
LINGUAS="en en_US zh zh_CN"
MAKEOPTS="V=1 -j10"
PKGDIR="/usr/local/portage/packages-amd64"
PORTAGE_BZIP2_COMMAND="lbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9ef"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--ipv4"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/systemd /var/lib/layman/hardened-development /usr/local/portage"
SYNC="rsync://mirrors.ustc.edu.cn/gentoo-portage"
USE="X acl alsa amd64 audit bash-completion berkdb bzip2 c++0x cairo caps cli cracklib crypt custom-cflags cxx dbus dri ffmpeg gdbm gmp gnome gpm gtk gtk3 hardened iconv icu ipv6 jit jpeg jpeg2k justify lzma mmx modules mudflap multilib ncurses nls nptl open_perms opengl openmp orc pam pcre png pppd pulseaudio qt4 readline selinux session sse sse2 ssl svg systemd tcpd threads tiff udev unicode urandom vim-syntax xattr xinetd zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="bootchart btrfs caps dmsquash-live gensplash livenet lvm nfs ssh-client syslog systemd" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US zh zh_CN" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="arm mips64el x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

www-client/chromium-24.0.1305.3 was built with the following:
USE="custom-cflags gnome (multilib) -bindist -cups -gnome-keyring -kerberos (-pulseaudio) (-selinux) (-tcmalloc) -test" LINGUAS="zh_CN -am -ar -bg -bn -ca -cs -da -de -el -en_GB -es -es_LA -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt_BR -pt_PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh_TW"


dev-libs/icu-50_rc was built with the following:
USE="-debug -doc -examples -static-libs"
Comment 1 iGentoo 2012-10-26 01:05:18 UTC
Created attachment 327438 [details]
chromium-24.0.1305.3-build.log.tar.xz
Comment 2 Mike Gilbert gentoo-dev 2012-10-26 04:14:10 UTC
Can't reproduce this.
Comment 3 Denis M. (Phr33d0m) 2012-10-26 13:20:41 UTC
I am able to reproduce this issue with gcc-4.7.2 + icu-50_rc + chromium-24.0.1305.3
I'll attach my build.log as well.



Portage 2.1.11.30 (default/linux/amd64/10.0/desktop/kde, gcc-4.7.2, glibc-2.15-r3, 3.6.2 x86_64)
=================================================================
System uname: Linux-3.6.2-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.2
Timestamp of tree: Fri, 26 Oct 2012 10:45:01 +0000
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.9-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.2
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.4
sys-devel/binutils:       2.23
sys-devel/gcc:            4.6.3, 4.7.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/media/STORAGE/Personal/Documents/gentoo/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs config-protect-if-modified distlocks fail-clean fixlafiles news nodoc parallel-fetch parallel-install protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ http://mirrors.telepoint.bg/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j10"
PKGDIR="/media/STORAGE/Personal/Documents/gentoo/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-4"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://188.165.231.20/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apng ares avx bash-completion berkdb bluetooth bluray branding bzip2 cairo cli consolekit cracklib cxx dbus declarative dri dts dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gstreamer gtk gzip iconv icu ipv6 jpeg kde kdm kipi lcms ldap libnotify lm_sensors lzma mad matroska mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nsplugin offensive ogg opencl opengl openmp pam pango pcre pdf perl phonon plasma png policykit ppds pppd python qt3support qt4 readline sdl session spell sse sse2 sse3 sse4 sse4_1 ssl ssse3 startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fglrx" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, USE_PYTHON
Comment 4 Denis M. (Phr33d0m) 2012-10-26 13:22:48 UTC
Created attachment 327472 [details]
Phr33d0m: chromium-24.0.1305.3.log.tar.xz

build.log
Comment 5 Łukasz Siudut 2012-10-26 15:59:59 UTC
I can confirm it as well. Won't paste my build log though, as it looks exactly the same. Chromium won't compile against icu-50.
Comment 6 Mike Gilbert gentoo-dev 2012-10-26 16:09:46 UTC
Yes, it seems to be an issue with icu-50 and gcc-4.7.
Comment 7 Arfrever Frehtes Taifersar Arahesis 2012-10-26 18:15:04 UTC

*** This bug has been marked as a duplicate of bug 439696 ***
Comment 8 Arfrever Frehtes Taifersar Arahesis 2012-10-27 15:42:28 UTC
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 9 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-10-27 19:20:09 UTC
(In reply to comment #8)
> 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


This solution is not suitable because it breaks chromium compilation:

# diff -u /usr/{,local/}portage/www-client/chromium/chromium-23.0.1271.40.ebuild
--- /usr/portage/www-client/chromium/chromium-23.0.1271.40.ebuild	2012-10-17 18:24:18.000000000 -0400
+++ /usr/local/portage/www-client/chromium/chromium-23.0.1271.40.ebuild	2012-10-27 15:12:53.672817989 -0400
@@ -326,6 +326,9 @@
 		replace-flags "-Os" "-O2"
 		strip-flags
 	fi
+	# icu requires special CXXFLAGS with >=gcc-4.7, bug #439698
+	export CXXFLAGS="${CXXFLAGS} $(eval '$(tc-getPKG_CONFIG) icu-i18n --variable CXXFLAGS')"
+	einfo "Building with CXXFLAGS=\"${CXXFLAGS}\""
 
 	egyp_chromium ${myconf} || die
 }
# emerge chromium
>>> Emerging (1 of 1) www-client/chromium-23.0.1271.40 from local
 * chromium-23.0.1271.40.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...    [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/3.6.3/build
 * Found sources for kernel version:
 *     3.6.3
 * Checking for suitable kernel configuration options...                 [ ok ]
 * bindist disabled: Resulting binaries may not be legal to re-distribute.
>>> Unpacking source...
>>> Unpacking chromium-23.0.1271.40.tar.bz2 to /var/tmp/portage/www-client/chromium-23.0.1271.40/work
>>> Source unpacked in /var/tmp/portage/www-client/chromium-23.0.1271.40/work
>>> Preparing source in /var/tmp/portage/www-client/chromium-23.0.1271.40/work/chromium-23.0.1271.40 ...
 * Preparing NaCl newlib toolchain ...                                   [ ok ]
 * Applying chromium-ppapi-r0.patch ...                                  [ ok ]
 * Applying chromium-dbus-glib-r0.patch ...                              [ ok ]
 * Applying chromium-system-icu-r0.patch ...                             [ ok ]
 * Applying chromium-system-speex-r0.patch ...                           [ ok ]
 * Applying user patches from /etc/portage/patches//www-client/chromium ...
 * Done with patching
 * V8 version: bundled - 3.13.7.4; installed - 3.13.7.4
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/www-client/chromium-23.0.1271.40/work/chromium-23.0.1271.40 ...
 * Building with CXXFLAGS="-march=native -O2 -pipe -O2 -std=gnu++11"
[...]
  x86_64-pc-linux-gnu-g++ '-D_FILE_OFFSET_BITS=64' '-DNO_TCMALLOC' '-DCHROMIUM_BUILD' '-DUSE_LIBJPEG_TURBO=1' '-DUSE_NSS=1' '-DENABLE_ONE_CLICK_SIGNIN' '-DGTK_DISABLE_SINGLE_INCLUDES=1' '-DENABLE_REMOTING=1' '-DENABLE_WEBRTC=1' '-DUSE_PROPRIETARY_CODECS' '-DENABLE_CONFIGURATION_POLICY' '-DENABLE_INPUT_SPEECH' '-DENABLE_NOTIFICATIONS' '-DENABLE_GPU=1' '-DENABLE_EGLIMAGE=1' '-DUSE_SKIA=1' '-DENABLE_TASK_MANAGER=1' '-DENABLE_WEB_INTENTS=1' '-DENABLE_EXTENSIONS=1' '-DENABLE_PLUGIN_INSTALLATION=1' '-DENABLE_PROTECTOR_SERVICE=1' '-DENABLE_SESSION_SERVICE=1' '-DENABLE_THEMES=1' '-DENABLE_BACKGROUND=1' '-DENABLE_AUTOMATION=1' '-DENABLE_PRINTING=1' '-DENABLE_CAPTIVE_PORTAL_DETECTION=1' '-DGOOGLE_PROTOBUF_NO_RTTI' '-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER' '-DNDEBUG' '-DNVALGRIND' '-DDYNAMIC_ANNOTATIONS_ENABLED=0' -Ithird_party/protobuf -Ithird_party/protobuf/src/src -Ithird_party/protobuf/src  -pthread -fno-exceptions -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-format -Wno-unused-result -O2 -fno-ident -fdata-sections -ffunction-sections -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-deprecated -MMD -MF out/Release/.deps/out/Release/obj.host/protoc/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.o.d.raw -march=native -O2 -pipe -O2 -std=gnu++11 -c -o out/Release/obj.host/protoc/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.o third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc
third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc: In member function ‘bool google::protobuf::compiler::CommandLineInterface::InterpretArgument(const string&, const string&)’:
third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:913:78: error: no matching function for call to ‘make_pair(std::string&, std::string&)’
third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:913:78: note: candidate is:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/bits/stl_algobase.h:65:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/bits/char_traits.h:41,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/string:42,
                 from third_party/protobuf/src/google/protobuf/stubs/common.h:41,
                 from third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h:41,
                 from third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:35:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/bits/stl_pair.h:268:5: note: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_T1>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/bits/stl_pair.h:268:5: note:   template argument deduction/substitution failed:
third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:913:78: note:   cannot convert ‘virtual_path’ (type ‘std::string {aka std::basic_string<char>}’) to type ‘std::basic_string<char>&&’
make: *** [out/Release/obj.host/protoc/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.o] Error 1
 * ERROR: www-client/chromium-23.0.1271.40 failed (compile phase):
 *   emake failed


Arfrever, you cannot expect most existing C++ code that uses icu to be buildable with -std=gnu++11.
Comment 10 Arfrever Frehtes Taifersar Arahesis 2012-10-27 19:27:15 UTC
It was decision of ICU upstream, not Arfrever.

Chromium should just be fixed to be compatible with C++11.
Somebody should report this problem to Chromium upstream.
Comment 11 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-10-27 19:42:58 UTC
(In reply to comment #10)
> It was decision of ICU upstream, not Arfrever.

It was your decision to leave icu upstream's default configure choice - which may have been a good default for whatever OS the icu upstream authors are targeting, but is not a good default for us - unpatched.

Adapting upstream code to gentoo's needs is an unpleasant but absolutely necessary part of a package maintainer's work.
Comment 12 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-10-28 03:28:25 UTC
(In reply to comment #10)
> It was decision of ICU upstream, not Arfrever.

Could you please show some upstream docs about that? I'm still looking for the best way to handle this.

Note that below snippet comes right from ICU ebuild, which is something we do control:

    # Store -std=gnu++11 flag in CXXFLAGS in icu-config and icu-*.pc files for API consumers, if this flag is supported and required.
    if $(tc-getCXX) -c -std=gnu++11 -x c++ - -o /dev/null <<< "char16_t string[] = u\"...\";" &> /dev/null && ! $(tc-getCXX) -c -x c++ - -o /dev/null <<< "char16_t string[] = u\"...\";" &> /dev/null; then
        sed -e "/^CXXFLAGS =/s/ *$/ -std=gnu++11/" -i config/icu.pc.in config/Makefile.inc.in || die "sed failed"
    fi

Could you explain more why it's there? Is it needed to make consumers work, or is it just an extra thing to make use of c++11 in the ICU interface? If the latter, I think this should at least be behind a flag (not obvious whether that's good idea either), and then chromium would depend on that flag being off.

> Chromium should just be fixed to be compatible with C++11.

It's not obvious how easy that is. I'll take a look, but the Chromium projects builds on platforms and compilers that don't support c++11 yet, and may not want to support #ifdef-ed code for different variants of the c++ standard until the complete switch to c++11 on all supported platforms.
Comment 13 Arfrever Frehtes Taifersar Arahesis 2012-10-28 07:05:23 UTC
(In reply to comment #12)
> (In reply to comment #10)
> > It was decision of ICU upstream
> 
> Could you please show some upstream docs about that?

https://ssl.icu-project.org/trac/changeset/32179
  - configure.in started to try to compile a test code with -std=c++11 and keep
    this flag in CXXFLAGS if compilation succeeds. -std=c++11 sets __cplusplus
    to 201103L.
  - unicode/platform.h started to define U_HAVE_CHAR16_T as 1 instead of 0
    when U_HAVE_CHAR16_T was undefined and __cplusplus was defined to a
    value >= 201103L.
https://ssl.icu-project.org/trac/browser/icu/trunk/source/common/unicode/umachine.h?rev=32179#L271
  - UChar started to be char16_t due to above changes in configure.in and
    unicode/platform.h.

>     # Store -std=gnu++11 flag in CXXFLAGS in icu-config and icu-*.pc files
> for API consumers, if this flag is supported and required.
>     if $(tc-getCXX) -c -std=gnu++11 -x c++ - -o /dev/null <<< "char16_t
> string[] = u\"...\";" &> /dev/null && ! $(tc-getCXX) -c -x c++ - -o
> /dev/null <<< "char16_t string[] = u\"...\";" &> /dev/null; then
>         sed -e "/^CXXFLAGS =/s/ *$/ -std=gnu++11/" -i config/icu.pc.in
> config/Makefile.inc.in || die "sed failed"
>     fi
> 
> Could you explain more why it's there?

By default, build system of ICU would store all CFLAGS and CXXFLAGS in e.g. icu-config, including flags set by users in make.conf. Such propagation of flags is obviously undesirable, so ebuild has been cleaning all flags for many years.

With ICU >=50 and GCC >=4.7, the need of propagation of only one flag (for version of C++ standard) has appeared, so ebuild manually re-adds this flag. Otherwise `icu-config --cxxflags` would print empty string, but C++ reverse dependencies of ICU would still need to set C++11.
Comment 14 Paul Zander 2012-10-28 10:23:32 UTC
Is there any specific reason why you use -std=gnu++11 over -std=c++11, as the latter is the one icu detects (and sets)?
Comment 15 Arfrever Frehtes Taifersar Arahesis 2012-10-28 19:31:39 UTC
(In reply to comment #14)
> Is there any specific reason why you use -std=gnu++11 over -std=c++11, as
> the latter is the one icu detects (and sets)?

http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Standards.html says:
"By default, GCC provides some extensions to the C++ language; See Options Controlling C++ Dialect. Use of the -std option listed above will disable these extensions. You may also select an extended version of the C++ language explicitly with -std=gnu++98 (for C++98 with GNU extensions) or -std=gnu++11 (for C++11 with GNU extensions). The default, if no C++ language dialect options are given, is -std=gnu++98."

Some packages might implicitly rely on GNU extensions, so it is better to use -std=gnu++11 instead of -std=c++11 to not disable these extensions.

(We might consider using -std=c++11 for non-GCC compilers...)
Comment 16 Patrizio Bassi 2012-11-01 12:15:21 UTC
i have same issue with www-client/chromium-23.0.1271.60

any progress here? 
what shall we do?
Comment 17 Ryan Hill (RETIRED) gentoo-dev 2012-11-02 01:34:52 UTC
ICU needs to be forced not to use C++11 unless explicitly instructed to.  Not only is this ABI-incompatible, it breaks the build of any package depending on the library when using a compiler not supporting the standard, like all the currently unmasked versions of GCC in the tree.  You can not force all users of the library to support C++11.  You can not pollute pkg-config files with ABI-changing compiler flags, especially not ones that are only available in masked compiler versions.  I don't care what upstream does, they are not trying to distribute a source-based distro where things can and often do get built with mismatched compiler versions.  Get them to add a configure option to disable C++11 completely or add it yourself, I don't care.  Either this gets fixed now or I put it in package.mask.

Please follow up in bug #439892.  This affects much more than Chromium.
Comment 18 iGentoo 2012-11-02 22:56:59 UTC
Created attachment 328156 [details]
compile with -std=c++11

For reference only...
Comment 19 Steven R. Loomis 2012-11-15 01:24:39 UTC
I've followed up on #439892 - is it true that there are other ABI-incompatible issues besides the type of UChar being char_16 vs unsigned short? Please follow up on #439892 and at upstream http://bugs.icu-project.org/trac/ticket/9728

(In reply to comment #17)
> ICU needs to be forced not to use C++11 unless explicitly instructed to. 
> Not only is this ABI-incompatible, it breaks the build of any package
> depending on the library when using a compiler not supporting the standard,
> like all the currently unmasked versions of GCC in the tree.  You can not
> force all users of the library to support C++11.  You can not pollute
> pkg-config files with ABI-changing compiler flags, especially not ones that
> are only available in masked compiler versions.  I don't care what upstream
> does, they are not trying to distribute a source-based distro where things
> can and often do get built with mismatched compiler versions.  Get them to
> add a configure option to disable C++11 completely or add it yourself, I
> don't care.  Either this gets fixed now or I put it in package.mask.
> 
> Please follow up in bug #439892.  This affects much more than Chromium.
Comment 20 Arfrever Frehtes Taifersar Arahesis 2012-11-15 06:56:41 UTC
Until www-client/chromium is updated to support C++11, please add the following dependency:
dev-libs/icu[-c++11(-)]
Comment 21 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-11-16 02:07:56 UTC
(In reply to comment #20)
> Until www-client/chromium is updated to support C++11, please add the
> following dependency:
> dev-libs/icu[-c++11(-)]

It seems no icu ebuilds in the tree have that flag.

I'm willing to make changes to chromium ebuilds to help with the issues, but would strongly prefer to hear from _official_ maintainers.
Comment 22 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-11-16 16:23:43 UTC
Your 50.1-r2 seems to be working fine to build Chromium...
Comment 23 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-11-28 19:03:17 UTC
(In reply to comment #22)
> Your 50.1-r2 seems to be working fine to build Chromium...

Excellent, thank you for testing.