Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 50417 - tetex-2.0.2-r3 breaks with -ftracer and gcc 3.4
Summary: tetex-2.0.2-r3 breaks with -ftracer and gcc 3.4
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 All
: High normal (vote)
Assignee: Please assign to toolchain
Depends on: 50463
  Show dependency tree
Reported: 2004-05-07 15:41 UTC by Robert Führicht
Modified: 2004-12-03 23:35 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Robert Führicht 2004-05-07 15:41:22 UTC
Compiled with -O3 -march=k8 -pipe -ftracer and gcc 3.4.0-r1

$ latex ue2b.tex
This is TeX, Version 3.14159 (Web2C 7.4.5)
! I can't find file `ue2b.texue2b.tex'.
<*> ue2b.tex

If I omit -ftracer, everything is fine.
Comment 1 Danny van Dyk (RETIRED) gentoo-dev 2004-05-08 09:06:21 UTC
That's a real odd bug, but i can reproduce it. Works fine with "-O2 -ftracer". As
a workaround, the ebuild now replaces -O3 by -O2 for the time being.
Comment 2 Travis Tilley (RETIRED) gentoo-dev 2004-05-20 02:49:11 UTC
-O3 is something that often breaks applications of all kinds, and we have a LOT of ebuilds that replace -O3 with -O2...
Comment 3 Mihai Limbasan 2004-07-10 16:33:19 UTC
Confirmed. Thanks, Robert, this one's been haunting me for weeks. I came to dread the "doc" USE flag.
-ftracer breaks tetex-2.0.2-r3 with both -O2 and -O3, CXXFLAGS=$CFLAGS, gcc-3.4.0 (initial, -r1 and -r6). Plain -O3 works perfectly fine for me (x86/p3), no need to replaceflags to -O2. If you're wary of -O3, it also works fine with -O2 -fweb -frename-registers. This occasionally also triggers sandbox access violations, as tex tries to write a logfile into /usr/share/texmf/web2c.
Could you please update the tetex eclass to filter out -ftracer? Maybe conditionally based on >=gcc-3.4.0.
Also, could someone please report this as an upstream bug to the GCC team? I'm pretty certain -ftracer should *not* cause runtime behavioral variations.

moocha root # gcc-config -l
[1] i686-pc-linux-gnu-3.4.0

moocha root # emerge info
Portage 2.0.50-r9 (default-x86-2004.0, gcc-3.4.0, glibc-, 2.6.7-love7)
System uname: 2.6.7-love7 i686 Pentium III (Katmai)
Gentoo Base System version 1.5.1
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
CFLAGS="-march=pentium3 -mtune=pentium3 -O3 -ftracer -fweb -frename-registers -momit-leaf-frame-pointer -fomit-frame-pointer -fno-ident -pipe"
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/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -mtune=pentium3 -O3 -ftracer -fweb -frename-registers -momit-leaf-frame-pointer -fomit-frame-pointer -fno-ident -pipe"
FEATURES="autoaddcvs ccache sandbox"
USE="X aalib acl alsa arts berkdb bindist caps crypt cups encode esd gdbm gif gnome gpm gtk gtk2 imlib jpeg kde ldap mad mailwrapper mikmod mmx motif mpeg mysql ncurses nptl odbc oggvorbis opengl oss pam pcre perl php pic pie png pwdb python qt quicktime readline ruby samba sasl sdl slang slp speex spell sse ssl svga tcpd tetex tiff truetype unicode x86 xml xml2 xv xvid zlib"
Comment 4 Robert Moss (RETIRED) gentoo-dev 2004-07-11 10:08:32 UTC
I get the same behaviour on x86 with a really insane set of CFLAGS (including both -O3 and -ftracer) and with and without -ffast-math (works without, above behaviour occurs with). Can we also filter -ffast-math for this one?
Comment 5 Mihai Limbasan 2004-11-29 01:43:27 UTC
Hate to bring this up *yet* again, but since it's the case with the tetex-3-beta line as well can we just please, please, PLEASE compromise and have the ebuild add the following to the CFLAGS?

-fno-tracer -fno-sched2-use-superblocks -fno-sched2-use-traces -fno-fast-math

That will solve the entire issue once and for all, will prevent a lot of headaches for hapless users, and will not break *anything* since it just turns off the optimizations that cause tetex to break at runtime.