Summary: | [4.5/graphite] 90_all_gcc-4.5-graphite-ICE.patch causes segfaults | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Maciej Piechotka <uzytkownik2> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chris, jrmalaq, rion4ik, rktspm, saellaven, skrattaren |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 345219 | ||
Bug Blocks: | |||
Attachments: |
strips graphite cflags in ebuild
90_all_gcc-4.5-graphite-ICE.patch |
Description
Maciej Piechotka
2010-11-22 16:53:42 UTC
The obvious question is: does it work with *sane* CFLAGS ? You are using LTO, so you should disable it. Submit a bug report at gcc@gcc.gnu.org - perhaps it get's fixed with the next compiler release... (In reply to comment #2) > You are using LTO, so you should disable it. Submit a bug report at > gcc@gcc.gnu.org - perhaps it get's fixed with the next compiler release... > I do not (it is enabled for gcc but not in CFLAGS). Please see cave info. % grep lto /etc/paludis/* /etc/paludis/use.conf:*/* lame laptop latex ldap lua libffi lto libproxy -libsigsegv libkms libsoup libwnck lvm llvm llvm-gcc lm_sensor lzo lzma % sudo cave info x11-libs/cairo | grep lto bunzip2 < /var/db/pkg/x11-libs/cairo-1.10.0-r3/environment.bz2 > /var/tmp/paludis/environment-x11-libs-cairo-1.10.0-r3-23731 ebuild_scrub_environment /var/tmp/paludis/environment-x11-libs-cairo-1.10.0-r3-23731 ebuild_safe_source /var/tmp/paludis/environment-x11-libs-cairo-1.10.0-r3-23731 rm /var/tmp/paludis/environment-x11-libs-cairo-1.10.0-r3-23731 rm -fr /var/tmp/paludis/x11-libs-cairo-1.10.0-r3-info rm -fr /var/tmp/paludis/x11-libs-cairo-1.10.0-r3-info (In reply to comment #3) > (In reply to comment #2) > > You are using LTO, so you should disable it. Hmm. It seems that cairo know better if I want to use lto... I have lto enabled in gcc but I don't have in CFLAGS. i don't have lto enabled in gcc, but it anyway segfaults. so its not the lto problem, rather graphite or some generic. i'll double check log output tomorrow to be sure its the same problem btw, i have few more packages wich fail to compile with the same symptopms. pyqt4 for example (In reply to comment #5) > i don't have lto enabled in gcc, but it anyway segfaults. > so its not the lto problem, rather graphite or some generic. > i'll double check log output tomorrow to be sure its the same problem > > btw, i have few more packages wich fail to compile with the same symptopms. > pyqt4 for example > The offending flags are from graphite. It seems that any of flags: -floop-interchange -floop-strip-mine -floop-block The 'safe' flags are: CFLAGS="-O2 -pipe -ggdb -march=native -msahf -mcx16 -fgcse-sm -fgcse-las -fgcse- after-reload -ftracer" What if you got rid of most of these: CFLAGS="-O2 -pipe -ggdb -march=native -msahf -mcx16 -fgcse-sm -fgcse-las -fgcse-after-reload -ftracer -floop-interchange -floop-strip-mine -floop-block -finline-limit=1200" Also, attach the entire build log as a file. (In reply to comment #7) > What if you got rid of most of these: > CFLAGS="-O2 -pipe -ggdb -march=native -msahf -mcx16 -fgcse-sm -fgcse-las > -fgcse-after-reload -ftracer -floop-interchange -floop-strip-mine -floop-block > -finline-limit=1200" > > Also, attach the entire build log as a file. > Sorry - part of post gone to /dev/null. By "safe" CFLAGS I mean that they are working. just checked my logs and now sure its the same as for me. my flags: CFLAGS="${CFLAGS} -march=core2 -msse4.1 -ftree-vectorize -fgraphite-identity -floop-interchange -floop-strip-mine -floop-block" also 3 more packages also fails with compiler segmentation fault: dev-libs/icu media-libs/libtheora dev-python/PyQt4 i didn't check yet if graphite causes this or not. AMD64 with gcc-4.5.1-r1 here package failed compilation with CFLAGS="-O2 -march=native -mtune=native -pipe -floop-interchange -floop-strip-mine -floop-block -ggdb -fgraphite-identity" package succeeded with CFLAGS="-O2 -march=native -mtune=native -pipe" quick and dirty fix to get it to compile for now until it is properly fixed --- cairo-1.8.10.ebuild.orig 2010-11-24 08:18:04.202421076 -0500 +++ cairo-1.8.10.ebuild 2010-11-24 08:15:49.904817505 -0500 @@ -74,6 +74,9 @@ # http://bugs.freedesktop.org/show_bug.cgi?id=15463 [[ ${CHOST} == *-solaris* ]] && append-flags -D_POSIX_PTHREAD_SEMANTICS + #filter graphite since it ICEs (bug #346445) + filter-flags -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity + #gets rid of fbmmx.c inlining warnings append-flags -finline-limit=1200 Created attachment 255325 [details, diff]
strips graphite cflags in ebuild
submitted a bug to the gcc folks http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46651 There were reports about successful build of cairo with GCC 4.5.1 (Graphite-enabled). After upgrading to GCC 4.5.1-r1 this error sprang up. Personally I can't confirm this, I did upgrade straight to 4.5.1-r1, but it'd be nice if someone could test our patchset. PyQt4 has been built successfully here, but www-client/links fails. I successfuly build x11-libs/cairo-1.10.0-r3 with sys-devel/gcc-4.5.1 and CFLAGS="-O2 -march=native -pipe -msse4.1 -floop-interchange -floop-strip-mine -floop-block" in October, 13. Based on someone post in the gcc bugzilla that suggested it was working as of the 20101104 gcc snapshot, I just did some manual bisecting. There appears to be 3 patches added just before gcc-4.5.1-r1 was unmasked in portage: 20_all_gcc-4.5-fno-strict-overflow.patch 49_all_gcc-4.5-pr46491-kernel-miscompile.patch 90_all_gcc-4.5-graphite-ICE.patch removal of all 3 resulted in a gcc that would compile cairo without ICE. I then dropped just the graphite-ICE patch. Result: successful compile I then dropped just the pr46491-kernel-miscompile. Result: ICE I then dropped just the fno-strict-overflow patch. Result: ICE 90_all_gcc-4.5-graphite-ICE.patch points to: https://bugs.gentoo.org/345861 http://gcc.gnu.org/PR45314 Over in the gcc bug, I've confirmed that reverting 90_all_gcc-4.5-graphite-ICE.patch / http://gcc.gnu.org/PR45314 in the vanilla gcc snapshot fixes the problem as well. Created attachment 255867 [details, diff]
90_all_gcc-4.5-graphite-ICE.patch
Thanks for investigating. Here's the respun patch.
confirmation here that vanilla gcc snapshot plus HJ Lu's patch from the gcc bug works. I'm assuming that's what the respun patch is. *** Bug 346903 has been marked as a duplicate of this bug. *** Released in patchset 1.4. Wait an hour, sync, and rebuild gcc-4.5.1-r1. i can confirm dev-libs/icu media-libs/libtheora x11-libs/cairo compiled w/o errors. but PyQt4 still fails. so i'll report this as another graphite-ICE bug =) |