Bug 24154 - Make requires too much memory building libjava
Summary: Make requires too much memory building libjava
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: ---
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-30 23:24 UTC by Ian Lance Taylor
Modified: 2016-09-30 22:51 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-10-01 08:44:15


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Lance Taylor 2005-09-30 23:24:35 UTC
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
Comment 1 Mark Wielaard 2005-10-01 08:44:15 UTC
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.
Comment 2 Mark Wielaard 2005-12-04 18:08:50 UTC
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
Comment 3 arno 2005-12-22 15:33:15 UTC
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
Comment 4 maho nakata 2005-12-23 08:10:25 UTC
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
Comment 5 maho nakata 2005-12-23 08:13:41 UTC
sorry
file for me -> fine for me
Comment 6 Mark Wielaard 2006-02-28 13:11:51 UTC
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"
Comment 7 Steven Newbury 2007-03-23 18:16:02 UTC
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.
Comment 8 xiaoyuanbo 2012-02-22 12:50:40 UTC
xiaoyuanbo
Comment 9 Andrew Pinski 2016-09-30 22:51:32 UTC
Closing as won't fix as libgcj (and the java front-end) has been removed from the trunk.