Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 546752 (PR61929) - [ICE/5] sys-devel/gcc: internal error when using both lto and graphite: isl_constraint.c: expecting integer value
Summary: [ICE/5] sys-devel/gcc: internal error when using both lto and graphite: isl_c...
Status: RESOLVED FIXED
Alias: PR61929
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/PR61929
Whiteboard:
Keywords:
: 555684 560904 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-16 09:01 UTC by Cănărău Constantin
Modified: 2015-12-05 21:27 UTC (History)
3 users (show)

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


Attachments
gcc trunk backport of isl integer value overflow fix for gcc 5 graphite support (95_all_pr61929-graphite-isl.patch,13.27 KB, patch)
2015-07-20 14:13 UTC, Jana Saout
Details | Diff
fix Gentoo dynamic loading of isl symbols to include symbols used in backported fix (96_all_pr61929-graphite-isl-dl.patch,1.31 KB, patch)
2015-07-20 14:14 UTC, Jana Saout
Details | Diff
dev-lang/lua-5.1.5-r3 with gcc-5.2.0 build.log (build.log,12.87 KB, text/plain)
2015-07-21 12:00 UTC, Cănărău Constantin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cănărău Constantin 2015-04-16 09:01:45 UTC
I think this is a bug in gcc itself. The following packages build and run fine with lto OR graphite but NOT BOTH. gcc throw "internal error"

grep no-graphite /etc/portage/package.env | cat -n
     1	app-accessibility/espeak no-graphite
     2	app-text/ghostscript-gpl no-graphite
     3	dev-lang/lua no-graphite
     4	gnome-base/libgnomecanvas no-graphite
     5	media-gfx/gimp no-graphite
     6	media-libs/a52dec no-graphite
     7	media-libs/cogl no-graphite
     8	media-libs/giflib no-graphite
     9	media-libs/glu no-graphite
    10	media-libs/gst-plugins-base no-graphite
    11	media-libs/libaacplus no-graphite
    12	media-libs/libtheora no-graphite
    13	media-libs/mesa no-graphite
    14	media-libs/openal no-graphite
    15	media-libs/x265 no-graphite
    16	media-plugins/audacious-plugins no-graphite
    17	media-sound/alsa-tools no-graphite
    18	media-sound/audacious no-graphite
    19	net-analyzer/mtr no-graphite
    20	net-analyzer/nmap no-graphite
    21	x11-base/xorg-server no-graphite
    22	x11-libs/libX11 no-graphite
    23	x11-libs/libXi no-graphite
    24	x11-libs/pixman no-graphite

Reproducible: Always
Comment 1 Cănărău Constantin 2015-04-16 09:02:10 UTC
Portage 2.2.18 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.1.0, glibc-2.21, 4.0.0-gentoo-costel x86_64)
=================================================================
System uname: Linux-4.0.0-gentoo-costel-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.2
KiB Mem:     8169112 total,   2260180 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 16 Apr 2015 05:45:02 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.25 p1.0) 2.25
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/cmake:           3.2.1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.9.2::gentoo, 5.1.0::newer
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.21::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://ftp.romnet.org/gentoo-portage
    priority: -1000

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

newer
    location: /usr/portage/local/newer
    masters: gentoo
    priority: 1

open
    location: /usr/portage/local/nou
    masters: gentoo
    priority: 100

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -w -fuse-linker-plugin -flto=4 -fipa-icf -fuse-ld=gold -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native -w -fuse-linker-plugin -flto=4 -fipa-icf -fuse-ld=gold -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block"
DISTDIR="/mnt/linux/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=3 --load-average=15 --keep-going --with-bdeps=y --complete-graph --quiet-build=n --autounmask-write"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy cgroup collision-protect config-protect-if-modified distlocks fail-clean fixlafiles ipc-sandbox merge-sync news nodoc noinfo parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-filter unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.romnet.org/gentoo/ http://mirrors.xservers.ro/gentoo/ ftp://ftp.romnet.org/gentoo/ http://ftp.roedu.net/pub/mirrors/gentoo.org/ http://distfiles.gentoo.org/"
LANG="ro_RO.UTF-8"
LC_ALL="ro_RO.UTF-8"
LDFLAGS="-Wl,-O1,--sort-common,--hash-style=gnu,--as-needed,-z,now -O2 -pipe -march=native -w -fuse-linker-plugin -flto=4 -fipa-icf -fuse-ld=gold -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block"
MAKEOPTS="-j8 --load-average=20"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--human-readable --delete-before --progress"
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="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac gdbm gif glamor gmp gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 iconv introspection ipv6 jpeg lcms ldap libnotify libsecret logrotate lua mad mmx mmxext mng modules mp3 mp4 mpeg multilib mysql nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pch pcre pdf png policykit popcnt ppds pulseaudio python qt3support readline sdl server session socialweb spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd tcpd threads tiff truetype udev udisks unicode upower usb vdpau vhosts vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel" 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="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="efi-64 pc" 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="ro en" NETBEANS_MODULES="apisupport extide php webcommon" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fancyindex fastcgi geo gzip headers index limit_conn limit_req log map memcached naxsi pagespeed proxy redis referer rewrite scgi spdy ssi upstream_ip_hash userid uwsgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="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"
USE_PYTHON="2.7 3.4"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 2 Cănărău Constantin 2015-04-16 09:07:16 UTC
Example from dev-lang/lua:

libtool --quiet --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -m32 -version-info 6:5:1 \
            -rpath /usr/lib32/ -Wl,-O1,--sort-common,--hash-style=gnu,--as-needed,-z,now -O2 -pipe -march=native -w -fuse-linker-plugin -flto=4 -fipa-icf -fuse-ld=gold -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -o liblua.la lapi.lo lcode.lo ldebug.lo ldo.lo ldump.lo lfunc.lo lgc.lo llex.lo lmem.lo lobject.lo lopcodes.lo lparser.lo lstate.lo lstring.lo ltable.lo ltm.lo lundump.lo lvm.lo lzio.lo lauxlib.lo lbaselib.lo ldblib.lo liolib.lo lmathlib.lo loslib.lo ltablib.lo lstrlib.lo loadlib.lo linit.lo -lm -ldl
/var/tmp/portage/dev-libs/isl-0.14/work/isl-0.14/isl_constraint.c:625: expecting integer value
lapi.c: In function 'lua_pushcclosure':
lapi.c:486:14: internal compiler error: Aborted
 LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) {
              ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
make[1]: *** [/var/tmp/portage/dev-lang/lua-5.1.5-r3/temp/cc1uTFZp.ltrans0.ltrans.o] Error 1
make[1]: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/5.0.1/../../../../x86_64-pc-linux-gnu/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Makefile:197: recipe for target 'liblua.la' failed
make: *** [liblua.la] Error 1

On every above packages "expecting integer value" and "internal compiler error: Aborted" I repeat: this is happened only in conjunction with graphite. The above packages build and run fine with lto only.
Comment 3 SpanKY gentoo-dev 2015-04-24 03:57:34 UTC
just to be safe, you should install the gcc-5.1.0 that's in the tree now vs whatever gcc-5.1.0 you had.  i don't think it'll make a difference, but you should try anyways since we don't generally support prerelease snapshots.
Comment 4 Cănărău Constantin 2015-04-26 09:37:01 UTC
Same results with portage gcc-5.1.0
Comment 5 Jana Saout 2015-07-20 14:13:26 UTC
Created attachment 407260 [details, diff]
gcc trunk backport of isl integer value overflow fix for gcc 5 graphite support

This is most likely also offspring from this issue:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929

I've applied the fix to 5.2.0 and all my graphite-related issues on a lot of packages all went away.
Comment 6 Jana Saout 2015-07-20 14:14:17 UTC
Created attachment 407262 [details, diff]
fix Gentoo dynamic loading of isl symbols to include symbols used in backported fix
Comment 7 Cănărău Constantin 2015-07-20 18:58:28 UTC
(In reply to Jana Saout from comment #6)
> Created attachment 407262 [details, diff] [details, diff]
> fix Gentoo dynamic loading of isl symbols to include symbols used in
> backported fix

This patch does not apply clean on gcc-5.2.0 from portage. 
When I tried to apply it manually I wasn't able to find corresponding lines.
DYNSYM (isl_pw_aff_copy); \ or 
#define isl_pw_aff_copy (*isl_pointers__.p_isl_pw_aff_copy)
in /var/tmp/portage/sys-devel/gcc-5.2.0/work/gcc-5.2.0/gcc/graphite-poly.h
I must doing something wrong. Please advise me. 

With only first patch applied gcc fails to build.
Comment 8 Jana Saout 2015-07-20 22:04:51 UTC
Well, I added the two patches after Gentoo's patchset. The first one applies cleanly on plain 5.2.0, the second one is on top of 74_all_gcc5_isl-dl.patch and makes it work again.

What kind of build failure do you get with only the first patch?
Comment 9 SpanKY gentoo-dev 2015-07-21 09:12:48 UTC
i can reproduce lua failing w/gcc-5.1, but not with gcc-5.2.  please show an example of gcc-5.2 failing and your `emerge --info`.
Comment 10 Cănărău Constantin 2015-07-21 10:46:21 UTC
(In reply to Jana Saout from comment #8)
> Well, I added the two patches after Gentoo's patchset. The first one applies
> cleanly on plain 5.2.0, the second one is on top of 74_all_gcc5_isl-dl.patch
> and makes it work again.
> 
> What kind of build failure do you get with only the first patch?

With two above patches aplied AFTER gcc patchset everything is all right.
From first posted list only media-libs/libaacplus simple freeze during compile with one core at 100% used by compiler.

Thank you for find upstream bug! The irony is that it was fixed a day later after 5.2 release :)
Comment 11 Cănărău Constantin 2015-07-21 10:47:33 UTC
(In reply to SpanKY from comment #9)
> i can reproduce lua failing w/gcc-5.1, but not with gcc-5.2.  please show an
> example of gcc-5.2 failing and your `emerge --info`.

I have to "downgrade" gcc - to compile it without above two patches.
Will be back shortly.
Comment 12 Cănărău Constantin 2015-07-21 12:00:25 UTC
Created attachment 407326 [details]
dev-lang/lua-5.1.5-r3 with gcc-5.2.0 build.log

lua build.log attached.

From first list:
     1	app-accessibility/espeak no-graphite
     2	app-text/ghostscript-gpl no-graphite
     3	dev-lang/lua no-graphite
     4	gnome-base/libgnomecanvas no-graphite
     5	media-gfx/gimp no-graphite
     6	media-libs/a52dec no-graphite
     7	media-libs/cogl no-graphite
     8	media-libs/giflib no-graphite
     9	media-libs/glu no-graphite
    10	media-libs/gst-plugins-base no-graphite
    11	media-libs/libaacplus no-graphite
    12	media-libs/libtheora no-graphite
    13	media-libs/mesa no-graphite
    14	media-libs/openal no-graphite
    15	media-libs/x265 no-graphite
    16	media-plugins/audacious-plugins no-graphite
    17	media-sound/alsa-tools no-graphite
    18	media-sound/audacious no-graphite
    19	net-analyzer/mtr no-graphite
    20	net-analyzer/nmap no-graphite
    21	x11-base/xorg-server no-graphite
    22	x11-libs/libX11 no-graphite
    23	x11-libs/libXi no-graphite
    24	x11-libs/pixman no-graphite
None of them shown any improvments with gcc-5.2.0.
But with two attached patched above 23 of them compiled and ran succesfully.
The exception is media-libs/libaacplus which just freeze during compile phase.
One process remain active using 100% of one core indefinitely.
Comment 13 SpanKY gentoo-dev 2015-12-05 19:32:48 UTC
*** Bug 555684 has been marked as a duplicate of this bug. ***
Comment 14 SpanKY gentoo-dev 2015-12-05 19:34:45 UTC
*** Bug 560904 has been marked as a duplicate of this bug. ***
Comment 15 SpanKY gentoo-dev 2015-12-05 21:27:43 UTC
i've backported the upstream fix to gcc-5.3 which is in the tree now

http://sources.gentoo.org/gentoo/src/patchsets/gcc/5.3.0/gentoo/70_all_gcc-5-pr546752.patch