Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548306 - www-client/chromium-44.0.2383.0 doesn't compile with gcc-5.1
Summary: www-client/chromium-44.0.2383.0 doesn't compile with gcc-5.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
: 552550 (view as bug list)
Depends on: PR65801
Blocks: gcc-5
  Show dependency tree
 
Reported: 2015-05-01 09:29 UTC by Helmut Jarausch
Modified: 2015-07-18 05:24 UTC (History)
8 users (show)

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


Attachments
build log xz-compressed (chromium-44.0.2383.0.build.xz,49.91 KB, application/x-xz)
2015-05-01 09:29 UTC, Helmut Jarausch
Details
proposed work around patch from comment 4 of upstream bug 466760 (chromium-44.0.2384.0-gcc-5.1.patch,23.10 KB, patch)
2015-05-02 09:33 UTC, Mark Wright
Details | Diff
chromium-42.0.2311.135-gcc-5.1.patch (chromium-42.0.2311.135-gcc-5.1.patch,23.22 KB, patch)
2015-05-19 12:47 UTC, Mark Wright
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2015-05-01 09:29:55 UTC
Created attachment 402368 [details]
build log xz-compressed

Compilation of www-client/chromium-44.0.2383.0 fails with lots of errors like
error: narrowing conversion of '-14' from 'int' to 'CLD2::uint8 {aka unsigned char}' inside { }

emerge --info www-client/chromium
Portage 2.2.18 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop, gcc-5.1.0, glibc-2.20-r2, 4.1.0-rc1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.1.0-rc1-x86_64-AMD_Phenom-tm-_II_X4_940_Processor-with-gentoo-2.2
KiB Mem:     7906008 total,   1040496 free
KiB Swap:    2097148 total,   2096736 free
Timestamp of repository gentoo: Fri, 01 May 2015 07:45:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.25 p1.0) 2.25
ccache version 3.2.1 [disabled]
app-shells/bash:          4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.4.3::gentoo
dev-util/ccache:          3.2.1-r1::gentoo
dev-util/cmake:           3.2.1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.14::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.9.6-r4::gentoo, 1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.8.4::gentoo, 4.9.2::gentoo, 5.1.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.0::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync15.de.gentoo.org/gentoo-portage
    priority: -1000

local
    location: /usr/local/portage
    masters: gentoo
    priority: 0

java
    location: /usr/local/portage/layman/java
    sync-type: laymansync
    sync-uri: git://git.overlays.gentoo.org/proj/java.git
    masters: gentoo
    priority: 50

lisp
    location: /usr/local/portage/layman/lisp
    sync-type: laymansync
    sync-uri: git://git.overlays.gentoo.org/proj/lisp.git
    masters: gentoo
    priority: 50

qt
    location: /usr/local/portage/layman/qt
    sync-type: laymansync
    sync-uri: git://git.overlays.gentoo.org/proj/qt.git
    masters: gentoo
    priority: 50

science
    location: /usr/local/portage/layman/science
    sync-type: laymansync
    sync-uri: git://git.overlays.gentoo.org/proj/sci.git
    masters: gentoo
    priority: 50

sunrise
    location: /usr/local/portage/layman/sunrise
    sync-type: laymansync
    sync-uri: git://git.overlays.gentoo.org/proj/sunrise-reviewed.git
    masters: gentoo
    priority: 50

toolchain
    location: /usr/local/portage/layman/toolchain
    sync-type: laymansync
    sync-uri: git://git.overlays.gentoo.org/proj/toolchain.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=native -O2 -msse3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/lib/neatx/home"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-mtune=native -O2 -msse3 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo "
LANG="en_US.iso88591"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="3dnow 3dnowext 3dnowprefetch X a52 aac acl acpi alsa amd64 avahi berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam ffmpeg fftw firefox flac fortran fuse gdbm gfortran gif gimp glamor gpm gtk gtk3 iconv ipv6 jpeg lapack lcms libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf png policykit ppds python qt qt3support qt4 qt5 readline sdl session smp spell sqlite sqlite3 sse sse2 sse3 sse4a ssl startup-notification svg systemd tcl tcpd threads tiff tk truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xulrunner xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow mmx 3dnowext mmxext popcnt sse sse2 sse3 sse4a" 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 ublox ubx" GRUB_PLATFORMS="pc multiboot" INPUT_DEVICES="keyboard mouse evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi" 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, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

www-client/chromium-43.0.2351.3::gentoo was built with the following:
USE="cups (pic) tcmalloc -custom-cflags -gnome -gnome-keyring -hidpi -kerberos (-neon) -proprietary-codecs -pulseaudio (-selinux) -test -widevine" ABI_X86="64" LINGUAS="de -am -ar -bg -bn -ca -cs -da -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_CN -zh_TW"
CFLAGS="-mtune=native -O2 -pipe"
CXXFLAGS="-mtune=native -O2 -pipe"
Comment 1 octoploid 2015-05-01 09:37:06 UTC
Will be fixed in 5.2: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65801
Comment 2 Helmut Jarausch 2015-05-01 15:58:34 UTC
(In reply to octoploid from comment #1)
> Will be fixed in 5.2: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65801

Will there be a 5.9999 ebuild (since it might take some time for 5.2 beeing released) ?
Comment 3 octoploid 2015-05-01 16:31:27 UTC
(In reply to Helmut Jarausch from comment #2)
> (In reply to octoploid from comment #1)
> > Will be fixed in 5.2: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65801
> 
> Will there be a 5.9999 ebuild (since it might take some time for 5.2 beeing
> released) ?

I don't know. But it might be a good idea to add the patch to 5.1.
Comment 4 Mark Wright gentoo-dev 2015-05-02 09:33:25 UTC
Created attachment 402432 [details, diff]
proposed work around patch from comment 4 of upstream bug 466760

I reproduced the problem with www-client/chromium-43.0.2357.18.  There are some
upstream bugs:

https://code.google.com/p/cld2/issues/detail?id=26
https://code.google.com/p/chromium/issues/detail?id=466760

I have attached the "rather questionable patches" from comment 4:

https://code.google.com/p/chromium/issues/detail?id=466760#c4

The patch is applying changes to generated code.

The patch is for 44.0.2387.0 I am currently testing it with
www-client/chromium-43.0.2357.18 with gcc 5.1.0.

argus / # diff -ur /usr/portage/www-client/chromium/chromium-43.0.2357.18.ebuild /usr/local/portage/www-client/chromium/chromium-43.0.2357.18.ebuild
--- /usr/portage/www-client/chromium/chromium-43.0.2357.18.ebuild       2015-04-20 12:31:19.000000000 +1000
+++ /usr/local/portage/www-client/chromium/chromium-43.0.2357.18.ebuild 2015-05-02 19:04:55.097170293 +1000
@@ -193,6 +193,7 @@
        epatch "${FILESDIR}/${PN}-system-jinja-r7.patch"
        epatch "${FILESDIR}/${PN}-libsecret-r0.patch"
        epatch "${FILESDIR}/${PN}-system-libvpx-r0.patch"
+       epatch "${FILESDIR}/${PN}-44.0.2384.0-gcc-5.1.patch"
 
        if use widevine; then
                local WIDEVINE_VERSION="$(< "${ROOT}/usr/$(get_libdir)/chromium-browser/widevine.version")"
argus / #
Comment 5 Helmut Jarausch 2015-05-02 17:29:32 UTC
In addtion, I have patched gcc-5.1.0, see
https://bugs.gentoo.org/show_bug.cgi?id=548412
With this patch and the proposed work-around here,

I could emerge chromium-44.0.2383.0 without any problems.
Comment 6 Mike Gilbert gentoo-dev 2015-05-06 02:02:00 UTC
The "fix" of casting to unsigned char is pretty ugly.

I think we will just wait for the next gcc release unless chromium upstream applies some fix. The patch below seems to do the job.

https://gcc.gnu.org/viewcvs/gcc/branches/gcc-5-branch/gcc/cp/typeck2.c?view=patch&r1=222636&r2=222635&pathrev=222636
Comment 7 octoploid 2015-05-06 05:17:31 UTC
(In reply to Mike Gilbert from comment #6)
> The "fix" of casting to unsigned char is pretty ugly.
> 
> I think we will just wait for the next gcc release unless chromium upstream
> applies some fix. The patch below seems to do the job.
> 
> https://gcc.gnu.org/viewcvs/gcc/branches/gcc-5-branch/gcc/cp/typeck2.
> c?view=patch&r1=222636&r2=222635&pathrev=222636

Unfortunately this fix is buggy:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007
Comment 8 Mike Gilbert gentoo-dev 2015-05-06 14:26:22 UTC
(In reply to octoploid from comment #7)

Thanks for the info.
Comment 9 Helmut Jarausch 2015-05-07 16:27:53 UTC
(In reply to octoploid from comment #7)
> (In reply to Mike Gilbert from comment #6)
> > The "fix" of casting to unsigned char is pretty ugly.
> > 
> > I think we will just wait for the next gcc release unless chromium upstream
> > applies some fix. The patch below seems to do the job.
> > 
> > https://gcc.gnu.org/viewcvs/gcc/branches/gcc-5-branch/gcc/cp/typeck2.
> > c?view=patch&r1=222636&r2=222635&pathrev=222636
> 
> Unfortunately this fix is buggy:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66007

But not the most recent one, see https://bugs.gentoo.org/show_bug.cgi?id=548412
Comment 10 Mark Wright gentoo-dev 2015-05-19 12:47:51 UTC
Created attachment 403616 [details, diff]
chromium-42.0.2311.135-gcc-5.1.patch

For those experimenting with gcc 5.1:

The proposed work around patch from comment 4 of upstream bug 466760 backported to apply to the stable www-client/chromium-42.0.2311.13, to apply, save the
patch to this directory:
mkdir -p /etc/portage/patches/www-client/chromium-42.0.2311.135

For later chromium versions, try the earlier patch (02432: proposed work around patch from comment 4 of upstream bug 466760),something like (depending
on the chromium version):

mkdir -p /etc/portage/patches/www-client/chromium-43.0.2357.18
cp chromium-44.0.2384.0-gcc-5.1.patch /etc/portage/patches/www-client/chromium-43.0.2357.18
Comment 11 Mike Gilbert gentoo-dev 2015-05-19 15:37:30 UTC
(In reply to Mark Wright from comment #10)

I would suggest patching gcc instead. gcc-5.2 will have a fix for this.
Comment 12 Ryan Hill (RETIRED) gentoo-dev 2015-06-14 07:27:03 UTC
This should really be fixed in Chromium.  The code violates the stricter narrowing rules in the C++-11 standard.  Our policy is to always prefer fixing the code over adding flags that relax standard conformance (eg. -fpermissive).

By the time we unmask GCC 5 this will probably be have been fixed in both places so it doesn't really matter in this case.
Comment 13 Mike Gilbert gentoo-dev 2015-06-19 13:53:34 UTC
*** Bug 552550 has been marked as a duplicate of this bug. ***
Comment 14 Mike Gilbert gentoo-dev 2015-06-19 13:54:45 UTC
(In reply to Ryan Hill from comment #12)

Sure. I a patch gets accepted by chromium upstream to fix the code, I certainly have no objection to it!
Comment 15 Ryan Hill (RETIRED) gentoo-dev 2015-06-19 23:41:56 UTC
I forgot we also have bug #550852, so we do need to fix something GCC-side. :D
Comment 16 Ryan Hill (RETIRED) gentoo-dev 2015-07-18 05:24:32 UTC
This should be fixed with gcc-5.2.0.