[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    global.cpp compilation headaches (Was: Kernel panic compiling kde3 beta2
From:       Bryce Nesbitt <bryce () obviously ! com>
Date:       2002-02-20 0:49:49
[Download RAW message or body]


I think you're right.  Something in global.cpp really causes gcc fits.
I no longer get Kernel panics, but gcc coredumps badly compiling "global.cpp".

	HardHat:bryce> gcc -v
	Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
	gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)

Hacking the makefile to change -O2 into -O0 lets the compilation complete.

			-Bryce




mh wrote:
> 
> Lauri Watts, Donnerstag, 14. Februar 2002 18:46:
> > On Thursday 14 February 2002 15.35, Bryce Nesbitt wrote:
> ...
> > I get failures on this exact file on FreeBSD with GCC 2.95.3, if I have -O
> > in the compiler line.  Well, not a kernel panic, but the file fills 500 or
> > so MB memory and gcc crashes with a signal 9 error.
> >
> > Reconfiguring with --enable-debug=full (which turns off the optimizations)
> > solved it for me.  FreeBSD recommends against using these optimizations
> > anyway, and the ports and packages build without them normally.
> >
> > Still, nobody I asked on Linux could reproduce it, or I'd have reported it
> > earlier.  Of course, I asked mostly developers who compile with
> > --enable-debug=full anyway.
> >
> > Compiles a whole hell of a lot faster too..
> 
> Possibly worthless comment follows:
> 
> I know nothing about the kernel panic, but what you describe here is IMHO
> just another example how the usage of QMap in conjunction with -O2 drives gcc
> insane - especially version 2.95.3 :-(
> (and at least in beta 1, QMap was invoked through kio/global.h)
> I was once told, that this is a bug in gcc.
> If you don't believe it, just compile the example at the end of this mail
> with and without optimization.
> My results on an Athlon TB 1000,256 MB:
> -O0:
> resulting filesize: 41480
> time g++ -O0 -L$QTDIR/lib -I$QTDIR/include -lqt maptest.cpp -o maptest
> real    0m2.988s
> user    0m2.810s
> sys     0m0.110s
> -------------------------------------
> ...things are "slightly" slower with optimization, compilation requires >180
> MB RAM
> -------------------------------------
> -O2
> resulting filesize: 198230
> time g++ -O2 -L$QTDIR/lib -I$QTDIR/include -lqt maptest.cpp -o maptest
> real    1m8.365s
> user    1m6.230s
> sys     0m1.070s
> 
> IMHO this problem is also the reason that, while compiling Qt-3.0.1, the
> compilation of 2 (two !) files (namely form.cpp and mainwindow.cpp, iirc)
> requires about 5 % (five percent !) of the overall compilation time.
> 
> I hope, I'm not completely off topic :-)
> 
> Michael
> 
> Example:
> 
> //maptest.cpp
> #include <qapplication.h>
> #include <qmap.h>
> #include <qstring.h>
> 
> int main(int argc, char **argv )
> {
>   QApplication a(argc,argv);
>   QMap <QString,QString> testmap;
>   testmap.insert("Bla0","Blubber");
>   //add about 60 additional insert() calls here
>  return 0;
> }
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic