As you can see in the Gentoo forums thread (see URL above), several users have been experiencing frequent and easily reproducible crashes of the X server with the combination of xorg-x11, gcc-3.4, march=pentium4, and the nvidia driver. Changing march=pentium4 to march=pentium3 eliminates at least some of the crashes. I recommend adding something like this to the ebuild: if [ "`gcc-major-version`" -eq "3" -a "`gcc-minor-version`" -eq "4" ] then replace-cpu-flags "pentium3" "pentium4" fi Reproducible: Always Steps to Reproduce: 1. CFLAGS="-O2 -march=pentium4" emerge xorg-x11 2. echo "startkde" >> ~/.xinitrc 3. startx Actual Results: xorg-x11 crashes shortly after displaying the KDE splash screen. Expected Results: KDE should start normally. Portage 2.0.51_pre13 (default-x86-2004.0, gcc-3.4.1, glibc-2.3.4.20040619-r0, 2.6.7 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz) ================================================================= System uname: 2.6.7 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.5.1 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.14.90.0.8-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.mirrored.ca/ http://mirrors.acm.cs.rpi.edu/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://192.168.1.100/portage" USE="X X509 aac acpi aim alsa apache2 apm arts audiofile avi berkdb cdr crypt cups dga divx4linux dvd encode esd fbcon flac foomaticdb freetype gcj gdbm gif gimp gnome gpm gtk gtk2 guile icq imlib inetd jack java jikes jpeg junit kde libg++ libwww mad mikmod mmx mng motif mpeg mpeg4 mplayer ncurses nls oggvorbis opengl oscar oss pam pdflib perl png python qt quicktime readline samba sdl slang sndfile speex spell sse ssl svg svga tcltk tcpd theora tiff truetype usb v4l v4l2 wmf x86 xml xml2 xmms xv xvid zlib"
Confirming... Portage 2.0.50-r9 (default-x86-2004.2, gcc-3.4.1, glibc-2.3.4.20040619-r0, 2.6.8-rc2-love2) ================================================================= System uname: 2.6.8-rc2-love2 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz Gentoo Base System version 1.4.16 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -O3 -ftracer -fPIC -ffast-math -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias /var/qmail/control /var/vpopmail/domains /var/vpopmail/etc" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O3 -ftracer -fPIC -ffast-math -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache sandbox usersandbox" GENTOO_MIRRORS="http://mirror.hamakor.org.il/pub/mirrors/gentoo/ http://gentoo.mirror.sdv.fr http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/trunk /usr/local/bmg-main" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X Xaw3d aalib acpi alsa apache2 apm arts avi berkdb caps cdr crypt cups directfb divx4linux doc encode erandom esd ethereal fam flac foomaticdb gd gdbm gif gimp gimpprint gnome gnomedb gpm gtk gtk2 icq imagemagick imap imlib imlib2 ipv6 jack jpeg k3b lcms libg++ libwww mad memlimit mikmod mmx mng motif mozdomi mozilla mozsvg mpeg mplayer mule mysql ncurses nls nocd nptl ntlm oggvorbis openal opengl oscar pam pdflib perl pic png ppds propolice pthreads python qt quicktime readline samba sdl slang snmp speedo speex spell src sse ssl svg svga tcltk tcpd tetex theora truetype unicode videos vim-with-x wifi x86 xml xml2 xmms xosd xv xvid zlib" Both xorg-x11-6.7.0-r1 & -r2.
I confirm this, and know 2 other cases in which this made xorg finally not segfault.
I have something like this on my AMD 64 (in i386 mode). Compling with GCC 3.4 and CFLAGS="-O3 -pipe -march=k8 -fomit-frame-pointer -ftracer" made X very unstable. I have not seen any problems with those flags earlier. Anyway, I know it's a bit dangerous cflags, so I remerged xorg with CFLAGS="-pipe" just to be sure. Didn't help! Switched back to GCC 3.3.4 and compiled with CFLAGS="-O3 -pipe -march=athlon-xp -fomit-frame-pointer", working great now. Is this related?
It seems like it doesn't like -march=pentium-m either. Changed it to -march=pentium3 and now it works. That is, it doesn't segfault when I click some icons. I guess it has some problems with SSE2 optimizations, since that is basically the difference between P-3 and P-M.
is this a dup of bug #60597?
I wouldn't quite call it a dup, but it touches much of the same problems. But PentiumM wasn't mentioned in the other bugreport, for one.
No. The xorg-x11 ebuild only changes flags for gcc-3.2.x, not gcc-3.4.x.
*** Bug 61999 has been marked as a duplicate of this bug. ***
ive been using -mno-sse2 for a while now on my box to fix things x11 team: can we at least get something like this added to the xorg ebuild ? [ "$(gcc-version)" == "3.4" ] && test_flag -mno-sse2 && append-flags -mno-sse2
I wanna update, that this affects gcc-3.4.2, xorg-6.8.0, and all cvs versions of xorg in between 6.7.0 and 6.8.0. I recommend that the fix for -march=pentium3 be added to all xorg ebuilds, as it appears that xorg's devs are not going to fix this because it involves the nvidia binary driver.
Shouldn't this be filed upstream to Nvidia, so they can fix the problem? They probably know where to look...
>> Shouldn't this be filed upstream to Nvidia, so they can fix the problem? << I don't think so. I remember experiencing segfaults using the nv driver, though not quite as frequently as with the nvidia driver. In any case, we really should do the proposed "quick fix" soon. It doesn't hurt much, and there's been talk of unmasking gcc-3.4 on x86 soon. This problem would affect a significant number of users. I'll try the -mno-sse with 6.8.0 today and let you know what happens.
appending -mno-sse2 for now with gcc3.4
did i mention please wait 35 minutes, sync, and test? thanks
the bit of code you added to append -mno-sse2 is wrong ... it's breaks all arches that dont support the flag (so currently mips and ppc are broken) why not use the code i originally suggested in Comment #9
Assigning back to gcc people to get the real problem fixed, now that X11 has a workaround.
The "patch" disables sse2 to the entire xorg-x11, because the nvidia driver is buggy? What about people who don't use nvidia cards? Please write a patch that rewrites the nvidia driver's Imakefile.
Please attach such a patch. I'll add it and see how things go.
I had issues with the sse2 compiled version when not using nvidia drivers at all (but ati). Those were fixed by disabling the sse2 code generation, so I seriously doubt that the problem is nvidia only.
This has been fixed upstream as of about a month ago... I'll put together a newer 3.4 ebuild containing the fix tomorrow... http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19010
Please test gcc-3.4.3.20050110
oh, and if testing off of cvs, make sure to 'cvs up' in eclass first.
This is reportedly fixed in >=gcc-3.4.3.20050110.