This is the mail archive of the rhug-rhats@sources.redhat.com mailing list for the RHUG project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcj -C bug in xalan



Hi Alex -

   I recently checked in changes to build Xalan .class files before
the object code.  For this to work, I had to add the following bits...


%.class: %.java
	$(GCJ) -C --encoding=UTF-8 $(CLASSPATH) -O2 -d upstream/src $<

# Work around a gcj bug by putting the srcdir at the front of the classpath.
upstream/src/org/apache/xalan/xsltc/compiler/util/NodeType.class: upstream/src/org/apache/xalan/xsltc/compiler/util/NodeType.java
	gcj -C --encoding=UTF-8 -fCLASSPATH=$(srcdir)/upstream/src:../xerces/upstream/src:../BCEL/upstream:../cup/upstream:$(srcdir)/upstream/src -O2 -d upstream/src $(srcdir)/upstream/src/org/apache/xalan/xsltc/compiler/util/NodeType.java
upstream/src/org/apache/xalan/xsltc/compiler/util/Type.class: upstream/src/org/apache/xalan/xsltc/compiler/util/Type.java
	gcj -C --encoding=UTF-8 -fCLASSPATH=$(srcdir)/upstream/src:../xerces/upstream/src:../BCEL/upstream:../cup/upstream:$(srcdir)/upstream/src -O2 -d upstream/src $(srcdir)/upstream/src/org/apache/xalan/xsltc/compiler/util/Type.java

   The default rule has the classpath starting with upstream/src (the
build directory).  However, when building NoteType.class and
Type.class, gcj -C fails when it has to read generated class files
first.  The exceptions above force the $(srcdir)/upstream/src to the
front of the classpath as a work around.  If you remove them you'll
see errors like...

gcj -C --encoding=UTF-8 -fCLASSPATH=upstream/src:../xerces/upstream/src:../BCEL/upstream:../cup/upstream:/fencer/cutlass/aph/green/cvs/rhug/xalan/upstream/src -O2 -d upstream/src /fencer/cutlass/aph/green/cvs/rhug/xalan/upstream/src/org/apache/xalan/xsltc/compiler/util/Type.java
/fencer/cutlass/aph/green/cvs/rhug/xalan/upstream/src/org/apache/xalan/xsltc/compiler/NodeTest.java:79: Undefined variable or class name: `DOM'.
       public static final int ANODE     = DOM.FIRST_TYPE - 1;
                                           ^
/fencer/cutlass/aph/green/cvs/rhug/xalan/upstream/src/org/apache/xalan/xsltc/compiler/NodeTest.java:72: Undefined variable or class name: `DOM'.
       public static final int ROOT      = DOM.ROOT;
                                           ^
/fencer/cutlass/aph/green/cvs/rhug/xalan/upstream/src/org/apache/xalan/xsltc/compiler/NodeTest.java:73: Undefined variable or class name: `DOM'.
       public static final int ELEMENT   = DOM.ELEMENT;
                                           ^
/fencer/cutlass/aph/green/cvs/rhug/xalan/upstream/src/org/apache/xalan/xsltc/compiler/NodeTest.java:74: Undefined variable or class name: `DOM'.
       public static final int ATTRIBUTE = DOM.ATTRIBUTE;
                                           ^
/fencer/cutlass/aph/green/cvs/rhug/xalan/upstream/src/org/apache/xalan/xsltc/compiler/NodeTest.java:69: Undefined variable or class name: `DOM'.
       public static final int TEXT      = DOM.TEXT;
                                           ^
/fencer/cutlass/aph/green/cvs/rhug/xalan/upstream/src/org/apache/xalan/xsltc/compiler/NodeTest.java:70: Undefined variable or class name: `DOM'.
       public static final int COMMENT   = DOM.COMMENT;
                                           ^
/fencer/cutlass/aph/green/cvs/rhug/xalan/upstream/src/org/apache/xalan/xsltc/compiler/NodeTest.java:71: Undefined variable or class name: `DOM'.
       public static final int PI        = DOM.PROCESSING_INSTRUCTION;
                                           ^
7 errors
make: *** [upstream/src/org/apache/xalan/xsltc/compiler/util/Type.class] Error 1


      Any ideas?

AG


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]