G++

Rupert Wood me@rupey.net
Mon Aug 5 06:40:00 GMT 2002


Matus Petrulak wrote:

> I have installed G++ 3.1 on my laptop runing Debian Linux 2.2 and i 
> tryed to compile simple aplication with it and it takes a 
> very very long time!!! More than 20 minutes. What should I do?

Best guess: it's swapping itself to death. Newer g++es have larger
memory requirements particularly when using the new, more compliant,
STL. Laptops tend to have less memory than anything else. In this case,
there's not a lot you can do other than fit more memory.

The other alternative is that there's an infinite loop somewhere in your
build of the GCC backend. Try building the equivalent C program, e.g.

    #include <stdio.h>
    int main() { printf("Hello.\n"); return 0; }

This shouldn't take more than a few seconds to build. If it does, try
building with -O1 or even -O0 optimization; if that works on the C then
it might help your C++ too.

Good luck. Please note that this question (and any follow-ups) would be
better suited to the gcc-help mailing list; this list is primarily for
gcc development.

Rup.



More information about the Gcc mailing list