GNU make requires too much memory building libjava. On my system the virtual memory size got up to 251M. Since I only have 256M of RAM, make proceeded to thrash. I waited 45 minutes before killing it. I am running i686-pc-linux-gnu, Fedora Core 4. make hung at this point in the build: make[4]: Entering directory `/home/ian/gcc/bootstrap/i686-pc-linux-gnu/libjava/classpath/lib' true top_builddir=.. top_srcdir=../../../../../gcc/libjava/classpath /bin/sh ./gen-classlist.sh standard Adding java source files from srcdir '../../../../../gcc/libjava/classpath'. Adding java source files from VM directory /home/ian/gcc/gcc/libjava /home/ian/gcc/bootstrap/i686-pc-linux-gnu/libjava Adding generated files in builddir '..'. make -f ../../../../../gcc/libjava/classpath/lib/Makefile.gcj \ GCJ='/home/ian/gcc/bootstrap/gcc/gcj -B/home/ian/gcc/bootstrap/i686-pc-linux-gnu/libjava/ -B/home/ian/gcc/bootstrap/gcc/' \ compile_classpath='..:/home/ian/gcc/gcc/libjava:/home/ian/gcc/bootstrap/i686-pc-linux-gnu/libjava:../../../../../gcc/libjava/classpath:../../../../../gcc/libjava/classpath/external/w3c_dom:../../../../../gcc/libjava/classpath/external/sax:.:' \ top_srcdir=../../../../../gcc/libjava/classpath
Confirmed. I am also seeing this on my old PPC box which has just 192MB real memory. Since it has enough swap it does finish after a couple of hours of swapping like mad.
Found something strange. We seem to be generated identical .list files for packages that exist under the gnu.java. hierarchy, but not under the java. hierarchy. For example: classpath/lib/lists/gnu-javax-swing-text-html-parser-models.list and classpath/lib/lists/javax-swing-text-html-parser-models.list are identical, but only the package gnu.javax.swing.text.html.parser.models exists. I have not yet grokked the sed magic that makes this happen in split-for-gcj.sh
Might this be related to make-bug #1379 ("Don't use alloca() for automatic variable values like $^, etc. In the case of very large lists of prerequisites this causes problems."), which has been solved after make-3.80 was released? At least on freebsd, I can build and install libjava by using a recent cvs-version of make ( /usr/opt/scito/make/bin/gmake --version: GNU Make 3.81beta4; This program built for i386-portbld-freebsd5.4 ), with indeed still a maximum memory usage of about 350MB; however, make-3.80 segfaults with a 'memory exhausted' error, even if I add 2Gig extra swap space. Arno
hi all, i tried with gmake (GNU Make 3.81beta4) as Arno told, build and installs file for me. uname -a FreeBSD debussy.private.org 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Mon Nov 21 09:36:37 JST 2005 maho@debussy.private.org:/usr/src/sys/i386/compile/MAHO i386
sorry file for me -> fine for me
This seems to be also tracked as a GNU Make bug at: http://savannah.gnu.org/bugs/?func=detailitem&item_id=15182 "Make uses too much memory"
make version 3.81 on Gentoo (ARM EABI) needs 712MB at this point with gcc-4.2-20070307. I've had to use a CF disk to add enough swapspace :(. make 3.80-r4 (Gentoo includes a memory usage patch) uses even more.
xiaoyuanbo
Closing as won't fix as libgcj (and the java front-end) has been removed from the trunk.