Red Hat Bugzilla – Bug 41794
Last modified: 2007-04-18 12:33:21 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.2-2smp i686; en-US; 0.7)
Description of problem:
Use of the "-fomit-frame-pointer" compiler switch when building the kdelib
package causes a few KDE applications to abort with an "internal error"
message at application startup.
Steps to Reproduce:
[The following assumes a stock i686 RedHat v7.1 ("Seawolf") system. The
versions of the development tools used are those which shipped with that
1. Rebuild the KDE library SRPM, either the RH 7.1 distribution
"kdelibs-2.1.1-5.src.rpm" or the update "kdelibs-2.1.2-1.src.rpm", with
2. Install the generated binary RPMs onto a RedHat v7.1 system which
includes a working KDE environment.
3. Run the KDE desktop, then launch the KDE online help (life-preserver
icon) and the Konqueror Web browser. (The applications can be run either
sequentially or concurrently; it doesn't matter.) Both run fine. Exit the
4. Now rebuild that same SRPM with RPM_OPT_FLAGS="-march=i686 -O2
5. Install the generated RPMs onto that same RedHat v7.1 system,
overwriting the libraries from the previouly build.
6. Run the KDE desktop, then launch the KDE online help and the Konqueror
Web browser. In both cases the application will not start. Instead of the
given application, a message box is shown which says that the application
cannot run due to an internal error. No debug symbols are available for
inspection. Exit the KDE desktop.
7. Repeat steps #1 and #2 above, so that the installed libraries are again
built without the "-fomit-frame-pointer" compiler switch.
8. Run the KDE desktop again. No errors are seen when attempting to run
Actual Results: A few KDE application would not run.
Expected Results: Application should have run normally.
1. This is not a build conflict between different elements of KDE That is,
it is not a result of building some KDE RPMs with "-fomit-frame-pointer"
and some without. I initially saw this problem after building all kde*.rpm
packages with "-march=i686 -O2 -fomit-frame-pointer". Having seen these
failing applications work fine on another i686 machine, I knew the problem
had to be in the build. Subsequent testing showed that the problem was
caused by building the kdelib*.rpm with "-fomit-frame-pointer" and that it
was not specific to the version of kdelibs that shipped with RH v7.1.
2. I am reporting the as a bug in kdelibs because I have used the
"-fomit-frame-pointer" with many other RH v7.1 packages and seen no ill
effects from it. If this is a compiler bug, then it is a very narrowly
3. Some hearsay: another guy on the Seawolf mailing list reported seeing
this same behavior in the use of kdelibs-2.1.1-5.src.rpm +
4. Use of the desired compiler switches wasdone by placing them in
/etc/rpmrc, where they were employed by RPM at build time. No spec files
Damn, my summary was truncated!
the summary should read as:
Compiler switch "-fomit-frame-pointer" breaks kdelibs
Definitely a compiler bug. KDE happens to be the only large piece of code
using C++, that's why it isn't showing up anywhere else.
What's going on with this bug? Is building C++ code with "-fomit-frame-pointer"
still dangerous? If not, in what version of the compiler was it fixed?
Also, regarding the comment "KDE happens to be the only large piece of code
using C++", please see bug 51238 for another example of "-fomit-frame-pointer"
incompatibility with C++.
If you are able to reproduce this with a contemporary GCC, please