Bug 29948 - G++ OOM's when compiling kmail
Summary: G++ OOM's when compiling kmail
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.1.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-22 22:20 UTC by Sjoerd
Modified: 2011-10-22 11:49 UTC (History)
4 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sjoerd 2006-11-22 22:20:05 UTC
When compiling kmail with Debian's dpkg-buildpackage, cc1plus is killed by the kernel due to memory shortage. This shows when using either g++ 4.0 or 4.1.

Files (including .ii files) are on the following URL:
http://errors.linuxonly.nl/gcc/

G++ version: 
g++-4.0 (GCC) 4.0.4 20060904 (prerelease) (Debian 4.0.3-7)
g++ (GCC) 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)
System type: Linux sjord 2.6.15-1-amd64-k8 #2 Wed Jan 4 06:25:54 CET 2006 x86_64 GNU/Linux
Compiling file: libkmailprivate_la.all_cpp.cpp
Comment 1 Andrew Pinski 2006-11-22 22:24:22 UTC
Can you report what options you are using to compile?
Actually just copy and paste the exact command that is running out of memory.
Comment 2 Sjoerd 2006-11-22 22:27:36 UTC
Command line:
g++ -save-temps -DHAVE_CONFIG_H -I. -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./kmail -I.. -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkmime -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkpgp -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkdenetwork -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkdepim -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkpimidentities -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libemailfunctions -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libksieve -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./mimelib -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./certmanager/lib -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./certmanager/lib/ui -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./indexlib -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/. -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkdepim -I/usr/include/kde -I/usr/share/qt3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -g -Wall -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -c libkmailprivate_la.all_cpp.cpp  -fPIC -DPIC -o .libs/libkmailprivate_la.all_cpp.o

Which originates from a libtool command:
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./kmail -I.. -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkmime -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkpgp -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkdenetwork -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkdepim -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkpimidentities -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libemailfunctions -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libksieve -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./mimelib -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./certmanager/lib -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./certmanager/lib/ui -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./indexlib -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/.  -I/home/sjoerd0/dev/dist/bla/kdepim-3.5.5.dfsg.1/./libkdepim -I/usr/include/kde -I/usr/share/qt3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -g -Wall -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o libkmailprivate_la.all_cpp.lo libkmailprivate_la.all_cpp.cpp
Comment 3 nicolas 2007-01-29 21:58:56 UTC
I have the same problems too on an x86_64-unknown-linux-gnu.

No distrib it's build from stratch.

Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.1.1/configure --prefix=/opt/gcc --enable-static --enable-shared --enable-threads --with-slibdir=/lib --enable-__cxa_atexit --enable-clocale=gnu -enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 4.1.2 20070129 (prerelease)

g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../libkmime -I../libkpgp -I../libkdenetwork -I../libkdepim -I../libkpimidentities -I../libemailfunctions -I../libksieve -I../mimelib -I../certmanager/lib -I../certmanager/lib/ui -I../indexlib -I.. -I../libkdenetwork/libgpgme-copy/gpgme -I../libkdenetwork/libgpg-error-copy -I../libkdenetwork/libgpg-error-copy -I../libkdepim -I/opt/kde/include -I/usr/lib/qt-3.3.7//include -I/usr/X11R6/include   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -MT libkmailprivate_la.all_cpp.lo -MD -MP -MF ".deps/libkmailprivate_la.all_cpp.Tpo" -c -o libkmailprivate_la.all_cpp.lo libkmailprivate_la.all_cpp.cpp
Comment 4 Sami Liedes 2007-02-05 21:11:55 UTC
It does compile (with gcc 4.1.1-15 in Debian amd64), but cc1 eats ~ 1 GiB of memory.
Comment 5 Manuel López-Ibáñez 2011-10-22 11:49:48 UTC
4.1 is just too old, and this issue is too vague to be able to identify if there is a problem at all, or g++ just needs that amount of memory. Sorry, I am closing this. If you can  isolate a single file that makes g++ suddenly increase memory without apparent limit, you may try generating a reduced preprocessed testcase: http://gcc.gnu.org/bugs/#need and reopen this.