Issue 6722 - officecfg can not be built in parallel (MAXPROCESS >1)
Summary: officecfg can not be built in parallel (MAXPROCESS >1)
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: OOo 1.0.1
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 1.0.3
Assignee: hjs
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks: 9443
  Show dependency tree
 
Reported: 2002-08-02 22:53 UTC by pavel
Modified: 2003-04-16 12:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
normal (not parallel) build (23.16 KB, patch)
2002-08-02 22:55 UTC, pavel
no flags Details | Diff
Parallel (MAXPROCESS=2) build (3.56 KB, text/plain)
2002-08-02 22:56 UTC, pavel
no flags Details
Patch against target.mk to ensure java files are compiled before jar is built (1.72 KB, patch)
2002-12-04 12:57 UTC, chris
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2002-08-02 22:53:31 UTC
Hi,

I can not get over officecfg when building with MAXPROCESS=2 exported.
Output of those two commands is attached:

pavel@oo:~/Build/oo_1.0.1_src/officecfg> export MAXPROCESS=1; build -from
officecfg >log.1 2>&1
pavel@oo:~/Build/oo_1.0.1_src/officecfg> rm -rf unxlngi4.pro/
pavel@oo:~/Build/oo_1.0.1_src/officecfg> export MAXPROCESS=2; build -from
officecfg >log.2 2>&1
Comment 1 pavel 2002-08-02 22:55:00 UTC
Created attachment 2420 [details]
normal (not parallel) build
Comment 2 pavel 2002-08-02 22:56:41 UTC
Created attachment 2421 [details]
Parallel (MAXPROCESS=2) build
Comment 3 Unknown 2002-11-07 16:20:37 UTC
I can confirm that error - or at least a similar one on the OO643C 
build. It may be just a dependency problem, but cannot figure 
it out at the moment.  


Making ../../unxlngi4.pro/misc/oo-common.ldif
mkdir -p ../../unxlngi4.pro/misc/registry/schema/org/openoffice/
-------------
java -classpath
/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/xt.jar:/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/parser.jar
-Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser
com.jclark.xsl.sax.Driver org/openoffice/Inet.xcs
../../util/schema_val.xsl
../../unxlngi4.pro/misc/registry/schema/org/openoffice/Inet.val
file=org/openoffice/Inet pathSeparator=/	
java -classpath
/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/xt.jar:/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/parser.jar
-Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser
com.jclark.xsl.sax.Driver org/openoffice/Inet.xcs
../../util/schema_trim.xsl
../../unxlngi4.pro/misc/registry/schema/org/openoffice/Inet.tmp
java -classpath
/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/jaxp.jar:/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/parser.jar:../../unxlngi4.pro/class/schema.jar
-Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl
org.openoffice.helper.PrettyPrinter
../../unxlngi4.pro/misc/registry/schema/org/openoffice/Inet.tmp
../../unxlngi4.pro/misc/registry/schema/org/openoffice/Inet.xcs
rm -f ../../unxlngi4.pro/misc/registry/schema/org/openoffice/Inet.tmp
rm -f ../../unxlngi4.pro/misc/registry/schema/org/openoffice/Inet.val
mkdir -p ../../unxlngi4.pro/misc/registry/schema/org/openoffice/Office/
java -classpath
/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/xt.jar:/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/parser.jar
-Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser
com.jclark.xsl.sax.Driver org/openoffice/Office/Calc.xcs
../../util/schema_val.xsl
../../unxlngi4.pro/misc/registry/schema/org/openoffice/Office/Calc.val
file=org/openoffice/Office/Calc pathSeparator=/	
java -classpath
/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/xt.jar:/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/parser.jar
-Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser
com.jclark.xsl.sax.Driver org/openoffice/Office/Calc.xcs
../../util/schema_trim.xsl
../../unxlngi4.pro/misc/registry/schema/org/openoffice/Office/Calc.tmp
java -classpath
/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/jaxp.jar:/usr/local/home/buildso/OO643C/solver/643/unxlngi4.pro/bin/parser.jar:../../unxlngi4.pro/class/schema.jar
-Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl
org.openoffice.helper.PrettyPrinter
../../unxlngi4.pro/misc/registry/schema/org/openoffice/Office/Calc.tmp
../../unxlngi4.pro/misc/registry/schema/org/openoffice/Office/Calc.xcs
rm -f
../../unxlngi4.pro/misc/registry/schema/org/openoffice/Office/Calc.tmp
rm -f
../../unxlngi4.pro/misc/registry/schema/org/openoffice/Office/Calc.val
mkdir -p ../../unxlngi4.pro/misc/registry/schema/org/openoffice/Office/
Exception in thread "main" java.lang.NoClassDefFoundError:
org/openoffice/helper/PrettyPrinter
dmake:  Error code 1, while making
'../../unxlngi4.pro/misc/registry/schema/org/openoffice/Inet.xcs'
Exception in thread "main" java.lang.NoClassDefFoundError:
org/openoffice/helper/PrettyPrinter

ERROR: Error 65280 occurred while making
/usr/local/home/buildso/OO643C/officecfg/registry/schema
Comment 4 chris 2002-11-19 16:29:38 UTC
The problem is, that the Jar file is created from the compiled Java
files, but there is nothing to tell dmake that the jarfile depends on
the Java classes.

It seems that there was some work done on dependencies but it is not
enabled.  Lines from tg_jar.mk:

$(JARTARGETN) .SETDIR=$(CLASSDIR) :
#$(JARTARGETN) .SETDIR=$(CLASSDIR) .SEQUENTIAL : $(JARTARGETDEP)
$(shell -cat -s $(MISC)$/$(JARTARGETN).dep )

I guess that .dep file was used to create dependencies somehow?
Comment 5 chris 2002-11-22 16:05:27 UTC
The use of .SETDIR is known to have problems.  The ones I am aware of
are inconsistent bahviour when calling sub makes with MAXPROCESS >1,
and it is very confusing when trying to make dependency rules:

foo : bar
baz .SETDIR xxx : foo

When trying to make foo, dmake will look for ./bar.  When trying to
make baz, it will look for xxx/bar, because of the .SETDIR in baz.

This problem happens in tg_jar.mk.  $(JARTARGETN) should declare a
dependency on the Java classes that it contains, or at least the
targets that are needed to build the Java files, such as
ALL_JAVA_TARGETS.  But because of the .SETDIR, I can't just declare:

$(JARTARGETN) : $(ALL_JAVA_TARGETS)

so, the JARTARGETN target needs to be rewritten without .SETDIR.  This
also involves work on the dependent $(JARMANIFEST), I would guess.

Reassigning to our solenv/inc/*.mk expert - ause.
Comment 6 chris 2002-12-04 12:56:50 UTC
Well, I've come up with another way of doing this without having to
change the existing targets:  Make a new dummy target which depends
sequentially on ALL_JAVA_TARGETS and JARTARGETN, and let ALLTAR depend
on that instead of JARTARGETN.

Two items which you might want to check:  You may like to choose
different names for the targets, and I also added a line to output the
cppumaker commandline used.

Tested with a complete OO643C build with -P5 and -P2.
Comment 7 chris 2002-12-04 12:57:44 UTC
Created attachment 3898 [details]
Patch against target.mk to ensure java files are compiled before jar is built
Comment 8 pavel 2003-02-01 16:57:58 UTC
Any progress with this bug? It is still in 1.0.2...
Comment 9 hjs 2003-02-04 12:12:24 UTC
i'm currently working on the issue but i'm afraid it won't get fixed
on a OOo 1.0.* version as it requires changes in the jar packing i do
not regard as "stable" yet.
Comment 10 chris 2003-02-10 16:51:27 UTC
What about applying my version of the patch (id 3898) to STABLE_1? 
I've been using this for weeks without any problems.
Comment 11 hjs 2003-03-07 12:50:22 UTC
could someone please confirm that this issue is fixed in ooo11beta
even with MAXPROCESS > 5 or more?
if it is, i'll retarget this issue to OOo 1.0.3 and apply the patch
(if OOO_STABLE_1 is open again).
Comment 12 pavel 2003-03-09 15:49:17 UTC
I can confirm it - I've just finished the build of 1.1Beta with
MAXPROCESS=8.
Comment 13 hjs 2003-03-10 10:12:58 UTC
retargeted - now waiting for OOO_STABLE_1 to reopen.
Comment 14 hjs 2003-04-03 14:32:04 UTC
commited changes from patch to OOO_STABLE_1
Comment 15 hjs 2003-04-16 12:54:38 UTC
-