Bug 126493

Summary: possible ecj miscompilation in xalan-j
Product: [Fedora] Fedora Reporter: Gary Benson <gbenson>
Component: ecjAssignee: Gary Benson <gbenson>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: green
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-06-03 09:13:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gary Benson 2004-06-22 13:31:57 UTC
Description of problem:
If you build struts using ecj-ant then attempting the upload webapp
fails with the following error:

compile:
    [style] DEPRECATED - the style attribute should be relative to the
project's
    [style]              basedir, not the tasks's basedir.
    [style] Transforming into
/home/gary/pkgs/struts/jakarta-struts-1.0.2-src/target/documentation
    [style] Processing
/home/gary/pkgs/struts/jakarta-struts-1.0.2-src/doc/installation-was.xml
to
/home/gary/pkgs/struts/jakarta-struts-1.0.2-src/target/documentation/installation-was.html
    [style] Loading stylesheet
/home/gary/pkgs/struts/jakarta-struts-1.0.2-src/doc/stylesheets/struts.xsl
    [style] Unknown file:0:0: Fatal Error! Extra illegal tokens: '(', ')'
    [style] : Fatal Error! Fatal error during transformation Cause:
Fatal error during transformation
    [style] Failed to process
/home/gary/pkgs/struts/jakarta-struts-1.0.2-src/doc/installation-was.xml

Comment 1 Gary Benson 2004-06-24 13:50:22 UTC
You can't build the tomcat-docs webapp either.  This looks to be a
generic failure rather than just something in struts.

build-main:
    [style] DEPRECATED - the style attribute should be relative to the
project's
    [style]              basedir, not the tasks's basedir.
    [style] Transforming into
/home/gary/pkgs/tomcat/tomcat-4.1.27/tomcat/webapps/build/manager
    [style] Processing
/home/gary/pkgs/tomcat/tomcat-4.1.27/tomcat/webapps/tomcat-docs/manager-howto.xml
to
/home/gary/pkgs/tomcat/tomcat-4.1.27/tomcat/webapps/build/manager/manager-howto.html
    [style] Loading stylesheet
/home/gary/pkgs/tomcat/tomcat-4.1.27/tomcat/webapps/tomcat-docs/tomcat-docs.xsl
    [style] Unknown file:0:0: Fatal Error! Extra illegal tokens: '(', ')'
    [style] : Fatal Error! Fatal error during transformation Cause:
Fatal error during transformation
    [style] Failed to process
/home/gary/pkgs/tomcat/tomcat-4.1.27/tomcat/webapps/tomcat-docs/manager-howto.xml

Comment 2 Gary Benson 2004-06-25 13:25:56 UTC
Looks like the xpath parser is being built incorrectly by cup.  The
one supplied with Xalan was built with v10j, so I tried that as well
as our v10k cup.  All three generated files have unix line termination
instead of dos, but apart from that:

* generated sym.java is identical but for the ordering of the symbols.
* generated XPathLexer.java (which JLex makes) is identical.
* generated XPathParser.java is different, but it's a big binary mess
  so it's hard to see what the problem may be.

Comment 3 Gary Benson 2004-06-25 15:11:21 UTC
Actually, it's nothing to do with that.  Ecj is miscompiling
XPathParser.java.  I've worked around in xalan-j.spec by prebuilding
the offending class with gcj.



Comment 4 Anthony Green 2004-06-28 12:13:29 UTC
Gary - I'll try to extract the ecj from Eclipse 3 to see if that makes
a difference.  The one you're using is from Eclipse 2.

I'm curious, however, if you've tried compiling XPathParser with ecj
as run by a non-GCJ vm.  I mean, is it really a problem with the
Eclipse compiler - or is it a gcj mis-compiling it?



Comment 5 Gary Benson 2004-06-28 12:30:49 UTC
It could be either, or it could be the bytecode->native step that is
broken.  I'm not really sure how to go about working out which it is :-/