Apache OpenOffice (AOO) Bugzilla – Issue 14512
OO does not build when jdk1.4 is installed
Last modified: 2013-02-24 21:09:24 UTC
Hello, I tried to build openoffice from source and failed. The reason is a bug in JDK1.4.2-beta but also a bug in the OO source code. Here is an excerpt from the build log: ============= Building project XmlSearch ============= /home/oobuild/work/oo/XmlSearch/src/com/sun/xmlsearch Making dpj... ...................................................................... javac -classpath ".:../../../../unxlngi3.pro/class:/usr/java/j2sdk1.4.2/jre/lib/rt.jar:.:/home/oobuild/work/oo/solver/644/unxlngi3.pro/bin/jaxp.jar:/home/oobuild/work/oo/solver/644/unxlngi3.pro/bin/parser.jar:/home/oobuild/work/oo/solver/644/unxlngi3.pro/bin/xt.jar:/home/oobuild/work/oo/external/common/jaxp.jar:/home/oobuild/work/oo/external/common/parser.jar:/home/oobuild/work/oo/external/common/xt.jar" -d ../../../../unxlngi3.pro/class db/Block.java db/BlockFactory.java db/BlockManager.java db/BlockManagerParameters.java db/BlockProcessor.java db/BlockStack.java db/BtreeDict.java db/BtreeDictParameters.java db/CompactEdgeFormat.java db/DBPartParameters.java db/EdgePrinter.java db/EntryProcessor.java db/FullBtreeDict.java db/FullVectorBtree.java db/Schema.java db/VectorBtree.java db/VectorBtreeIterator.java db/VectorBtreeParameters.java db/VectorFormat.java db/VectorProcessor.java util/ExtensibleURLStreamHandlerFactory.java util/BitBuffer.java util/ByteArrayDecompressor.java util/Compressor.java util/CompressorIterator.java util/ConceptList.java util/ConceptLocation.java util/Configuration.java util/Decompressor.java util/DocumentCompressor.java util/Extent.java util/Index.java util/IndexAccessor.java util/IndexInverter.java util/IntegerArray.java util/LineInput.java util/Location.java util/NonnegativeIntegerGenerator.java util/PrefixTranslator.java util/SimpleTokenizer.java util/StreamDecompressor.java util/Token.java util/Tokenizer.java tree/Names.java tree/Node2.java tree/NodeFactory.java tree/ResultAdapter.java tree/TreeBuilder.java tree/XmlTreeNode.java tree/XmlTreeNodeImpl.java qe/ConceptData.java qe/ConceptGroupGenerator.java qe/GeneratorHeap.java qe/HitStore.java qe/LiteMorph.java qe/LiteMorph_en.java qe/NextDocGenerator.java qe/NextDocGeneratorHeap.java qe/Query.java qe/QueryHit.java qe/RoleFiller.java qe/Rule.java qe/SearchEnvironment.java xml/ContextTables.java xml/XmlIndex.java xml/indexer/ElementIndexer.java xml/indexer/XmlIndexBuilder.java xml/indexer/XmlIndexer.java xml/indexer/XmlIndexingException.java xml/qe/ConceptData.java xml/qe/ConceptData1.java xml/qe/ConceptData2.java xml/qe/ConceptData3.java xml/qe/ConceptData4.java xml/qe/ConceptData5.java xml/qe/ConceptData7.java xml/qe/ConceptDataStart.java xml/qe/ConceptDataStop.java xml/qe/ConceptGroupGenerator.java xml/qe/GeneratorHeap.java xml/qe/HitStore.java xml/qe/MultiTokenLocator.java xml/qe/NextDocGenerator.java xml/qe/NextDocGeneratorHeap.java xml/qe/Query.java xml/qe/QueryFactoryImpl.java xml/qe/QueryHit.java xml/qe/QueryHitData.java xml/qe/QueryHitIterator.java xml/qe/QueryProcessor.java xml/qe/QueryProcessorImpl.java xml/qe/QueryResults.java xml/qe/QueryStatement.java xml/qe/RoleFiller.java xml/qe/Search.java db/FullVectorBtree.java:160: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier assert(_free > 0 && _free <= _blockSize); ^ db/VectorBtree.java:277: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier public static void assert(boolean assertion) { ^ db/VectorBtree.java:352: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier assert(stack.size() == 0); ^ An exception has occurred in the compiler (1.4.2-beta). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. java.lang.NullPointerException at com.sun.tools.javac.v8.comp.Flow.newVar(Flow.java:332) at com.sun.tools.javac.v8.comp.Flow.visitVarDef(Flow.java:701) at com.sun.tools.javac.v8.tree.Tree$VarDef.accept(Tree.java:511) at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33) at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483) at com.sun.tools.javac.v8.comp.Flow.scanStats(Flow.java:492) at com.sun.tools.javac.v8.comp.Flow.visitBlock(Flow.java:711) at com.sun.tools.javac.v8.tree.Tree$Block.accept(Tree.java:547) at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33) at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483) at com.sun.tools.javac.v8.comp.Flow.visitDoLoop(Flow.java:721) at com.sun.tools.javac.v8.tree.Tree$DoLoop.accept(Tree.java:565) at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33) at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483) at com.sun.tools.javac.v8.comp.Flow.scanStats(Flow.java:492) at com.sun.tools.javac.v8.comp.Flow.visitBlock(Flow.java:711) at com.sun.tools.javac.v8.tree.Tree$Block.accept(Tree.java:547) at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33) at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483) at com.sun.tools.javac.v8.comp.Flow.visitIf(Flow.java:988) at com.sun.tools.javac.v8.tree.Tree$If.accept(Tree.java:756) at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33) at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483) at com.sun.tools.javac.v8.comp.Flow.scanStats(Flow.java:492) at com.sun.tools.javac.v8.comp.Flow.visitBlock(Flow.java:711) at com.sun.tools.javac.v8.tree.Tree$Block.accept(Tree.java:547) at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33) at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483) at com.sun.tools.javac.v8.comp.Flow.visitIf(Flow.java:988) at com.sun.tools.javac.v8.tree.Tree$If.accept(Tree.java:756) at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33) at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483) at com.sun.tools.javac.v8.comp.Flow.scanStats(Flow.java:492) at com.sun.tools.javac.v8.comp.Flow.visitBlock(Flow.java:711) at com.sun.tools.javac.v8.tree.Tree$Block.accept(Tree.java:547) at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33) at com.sun.tools.javac.v8.comp.Flow.scanStat(Flow.java:483) at com.sun.tools.javac.v8.comp.Flow.visitMethodDef(Flow.java:665) at com.sun.tools.javac.v8.tree.Tree$MethodDef.accept(Tree.java:482) at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33) at com.sun.tools.javac.v8.comp.Flow.visitClassDef(Flow.java:615) at com.sun.tools.javac.v8.tree.Tree$ClassDef.accept(Tree.java:443) at com.sun.tools.javac.v8.tree.TreeScanner.scan(TreeScanner.java:33) at com.sun.tools.javac.v8.comp.Flow.analyzeTree(Flow.java:1161) at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:361) at com.sun.tools.javac.v8.Main.compile(Main.java:569) at com.sun.tools.javac.Main.compile(Main.java:36) at com.sun.tools.javac.Main.main(Main.java:27) dmake: Error code 4, while making '../../../../unxlngi3.pro/misc/com_sun_xmlsearch_dummy.java' ---* TG_SLO.MK *--- ERROR: Error 65280 occurred while making /home/oobuild/work/oo/XmlSearch/src/com/sun/xmlsearch dmake: Error code 1, while making 'build_all' ---* TG_SLO.MK *--- It seems that some Java code (VectorBtree.java and FullVectorBtree.java) uses "assert" which now is a keyword, but not in the manner the keyword should be used. This is wrong regarding future compatibility. The Java compiler javac crashes instead of handling "assert" words the old way (i.e. as regular identifier). This is a javac bug. Additionally, there is no choice to select the used compiler (i.e. as ./configure option) to workaround this problem. This is a build script bug. I'm not sure where to file such bugs, so please move it to a better component if you know one.
There seems to be a patch related JDK1.4 compatibility and openoffice at http://linuxfromscratch.org/~tushar/hints/files/OpenOfficeFromScratch/openoffice-1.0.1-jdk1.4-syntax.patch.bz2 , maybe only this patch needs to be applied.
I think it is yours, please fix the project, API is definitely inappropriate
I have only had experience getting the build with JDK 1.4.1 on Mac OS X. Maybe Kevin has some ideas about this. In any case, if the real problem is that there is a bug in the Sun JDK that you are using (and that is not surprisingly since you are using a beta version), you need to file a bug against Sun's JDK at http://java.sun.com as OpenOffice.org developers can't fix a broken JDK.
Even when the javac bug is fixed, the compiler will spit out warnings about using "assert" not as a keyword, but as an identifier. These warnings are bugs, aren't they?
It looks like I didn't look closely enough at your error messages the first time. You are correct: since "assert" is a Java 1.4 reserved work per the Java 1.4 specification, it is illegal to name a method after it. I am reopening this issue.
Reassigning to author of code who originally wrote this code.
Created attachment 6236 [details] Proposed fix.
Because the above patch was generated using "cvs diff", I'm not confident that it will apply cleanly.
I think it is not api but Tool Component, CMIIW change OS to all as confirm in http://tools.openoffice.org/dev_docs/build_windows.html Important Note 4: JDK 1.4.1 is prooven to work, but the new JDK 1.4.2 beta will break the build. Now JDK 1.4.2 is final and available, so I hope it will be fixed.
> Now JDK 1.4.2 is final and available, so I hope it will be fixed. It's fixed, for OOo 2.0 codeline. See issue 16626 Closing as duplicate. *** This issue has been marked as a duplicate of 16626 ***
for 2.0 maybe we better using JDK 2,x which will be available in next year. Now JDK 1.4.2 have some bug fixes in 1.4.2_02. if there is bugs which blocking us using it for OOo, I hope somebody can report the problem there. Thanks
Closed.