Re: Insane amount of memory required during compilation
"Duncan" <[email protected]>
| Newsgroups | gmane.comp.gnome.apps.pan.devel |
|---|---|
| Organization | Organization? Me? |
| Message-ID | <[email protected]> |
"Charles Kerr" <[email protected]> posted 43514.68.12.65.212.1150862291.squirrel-2RFepEojUI0ZA8pRhnfjzGXnswh1EIUO@public.gmane.org, excerpted below, on Tue, 20 Jun 2006 22:58:11 -0500: >> while compiling under Win2K with g++ 3.4.5 or 4.0.2, I have noticed that >> my computer was running into swap, eventually failing to compile the >> binary scorefile-test. For the record, this computer has 1GB RAM and 1GB >> swap. > > Yep, this has been reported a couple of times on pan-users IIRC. > > gcc 4 works beautifully, but, 3.4.x chokes on scorefile-test. I've had > luck getting it to build on mingw with gcc 3.4 by turning off all > optimizations (i.e. "export CXXFLAGS="-O0 -Wall"). I was one of the ones involved in researching the problem initially. On x86_64 anyway, compiling pan with gcc 3.4.6 required very close to 1.3 gigs of memory at once point in the process (with the scorefile stuff,with my CFLAGS). Someone else reported this and I confirmed. With gcc 4.1.x, usage is much more reasonable -- 200-300 megs max. That's why I didn't see the problem originally, as that's what I was using. I run Gentoo, where the gcc4 versions up to gcc 4.1.0 were masked due to various issues (4.1.1 is finally unmasked), but I was unmasking them and using them where I could anyway, reverting to 3.4.x where 4.0.x and later 4.1.0 still failed. The guy that originally reported the issue was still using the latest unmasked version, 3.4.6. Initially, it didn't occur to me that the gcc version was the problem, that it could make /that/ much difference in required compile-time resources, and we were comparing and him upgrading various other packages, to no avail. However, someone else commented that they had similar problems with gcc 3.4.x and suggested 4.1. Sure enough, a bit of testing later, and we confirmed the gcc version was the problem, 1.3 gigs with 3.4.6, <300 megs with 4.1.0 (and now 4.1.1). We hadn't tested x86 32-bit compiling, however, nor gcc 4.0.x, and of course our tests were on Linux. Assuming you are using 32-bit MSWormOS still (I haven't tracked what 64-bit products they offer, as I could no longer legally run it even if I wanted to, as I couldn't agree to the EULA), this now confirms the problem thru gcc 4.0.x and with at least 32-bit MSWormOS. To my knowledge, we still haven't confirmed it on 32-bit x86 Linux, however. FWIW, the only other package I can personally verify that requires that sort of compile-time resources is KDE's kmail (also C++ based). However, it still requires them with new gccs, while pan's requirement goes down substantially with gcc 4.1.x. OOo (Open Office dot org) is said to have seriously insane compile-time requirements as well, but I don't need it here so haven't tried it and can't personally say /what/ it requires. -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman