Bug 22580 - [4.1 Regression] 'make -j' doesn't affect source->bytecode compilation
Summary: [4.1 Regression] 'make -j' doesn't affect source->bytecode compilation
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: 0.15
: P2 normal
Target Milestone: 0.18
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-20 23:39 UTC by Bryce McKinlay
Modified: 2005-10-01 19:47 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-08-10 18:47:16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bryce McKinlay 2005-07-20 23:39:43 UTC
Since the classpath merge, I have noticed that the source->bytecode stage of the
libgcj build is not being paralellized.

This warning was also seen:

make[4]: Entering directory
`/home/mckinlay/cvs/gcc/build-x86_64/x86_64-unknown-linux-gnu/libjava/classpath/lib
make[4]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
Comment 1 Andrew Pinski 2005-07-21 05:03:09 UTC
Confirmed, I did not notice this until now.
make[5]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
Comment 2 Ranjit Mathew 2005-07-21 11:00:22 UTC
Regards,
Stickler Sosumi.
Comment 3 Jim Wilson 2005-07-30 01:02:51 UTC
The problem is the compile-classes rule in the libjava/classpath/lib/Makefile.am
file.  This rule contains a line $(JAVAC) that has a recursive make hidden
inside it.  make -j requires that all lines that perform a recursive make
contain the string $(MAKE), the string ${MAKE}, or start with +.  This is before
variable substitution, etc.

Three possible solutions off the top of my head:
1) Add a comment that mentions $(MAKE), e.g. change the line
        $(JAVAC)
to
        $(JAVAC) # $(MAKE)
2) Add a + to indicate this line does a recursive make.  This is apparently
POSIX (though my manual isn't here to double check).  E.g. change the line
        $(JAVAC)
to
        +$(JAVAC)
3) Delete the JAVAC variable, and put the line in question directly into the
compile-classes rule.

I verified that the first two suggestions work.  I didn't try the third, it
seems less practical.

Since JAVAC is being conditionally set, and only the GCJ version has the hidden
recursive make, we probably need a conditional fix here.

I'll leave it to the java and/or classpath folks to decide how they want to fix
this.  You may want to check the make manual for info on the MAKE variable, -j,
jobserver, and +.

My libjava build is still going, so it is possible that there are other similar
problems I haven't noticed yet.
Comment 4 Andrew Pinski 2005-08-04 21:45:30 UTC
This is a classpath issue
Comment 5 Tom Tromey 2005-08-10 18:47:16 UTC
I'm handling this.
Comment 6 Tom Tromey 2005-08-10 18:53:55 UTC
I checked in a fix to classpath.
I'll pull it into libgcj with the next update.
(If it is more urgent I can pull it in separately sooner.)
Comment 7 cvs-commit@developer.classpath.org 2005-08-10 20:27:36 UTC
Subject: Bug 22580

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Branch: 	
Changes by:	Tom Tromey <tromey@savannah.gnu.org>	05/08/10 18:53:25

Modified files:
	.              : ChangeLog 
	lib            : Makefile.am 

Log message:
	For PR classpath/22580:
	* lib/Makefile.am (compile-classes): Made conditional on
	FOUND_GCJ.
	(JAVAC): Redefined when FOUND_GCJ.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4377&tr2=1.4378&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/lib/Makefile.am.diff?tr1=1.96&tr2=1.97&r1=text&r2=text




Comment 8 Tom Tromey 2005-10-01 19:47:49 UTC
This was fixed a while ago and the fix has since been
imported into the libgcj build.