out of memory when building


24-03-2006 07:30:51

I'm on a Debian Linux machine with 256 mb of ram and 256 mb swap. When trying to build PyOgre with setup.py, the build runs for nearly 24 hours, filling up all available memory and at times most of the swap space. This involves constant swapping, with kswapd often taken most of the CPU while the build process just waits for pages to be swapped in or out. Eventually the build is killed by the kernel when the system completely runs out of memory (ram + swap). Adding more swap would probably prevent the build from being killed, but who knows how long it would actually take.

So my question is this: Does anyone know of a way to reduce the memory usage of swig 1.3.28 when building PyOgre, or does anyone know where I can download a prebuilt PyOgre _ogre.so binary for Linux?

I have searched the forums a bit, and while there were others with similar memory usage problems, none of the solutions proposed seem to help in this case.


26-03-2006 08:36:47

Typically the build process takes approx 1.5GB (RAM + Swap). Typical build times should be approx 20 minutes. Last time I encounterd the problem of running out of system memory (ram + swap) it happened within 3 hours. If setup.py is running for nearly 24 hours then I think it aint going to happen.

Since you've followed the other solutions, i.e. increasing the size of your swap partition accordingly, then the only alternative is to add more RAM.

There's no prebuilt PyOgre _ogre.so. What version of ogre/gcc etc are you using - fog's debian packages (libogre5)?.


29-03-2006 05:38:19

I did finally manage to build successfully on a different machine with more ram and swap (512 MB of each). Not sure how that worked with less than 1.5 GB total, but it did. For the unsuccessful build on the 256 MB ram machine, I tried both gcc 3.3.6 and 4.0.3. I was building against the ogre packages currently in Debian testing (1.0.6-1.2).

Is there a reason that there are no binaries of pyogre available for the various distros of Linux? It would certainly lower the barrier to entry for new developers and encourage more people to use pyogre.