db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-5189) PropertySetter should ignore GCJ installations
Date Thu, 14 Apr 2011 11:59:05 GMT
PropertySetter should ignore GCJ installations

                 Key: DERBY-5189
                 URL: https://issues.apache.org/jira/browse/DERBY-5189
             Project: Derby
          Issue Type: Improvement
          Components: Build tools
    Affects Versions:
            Reporter: Knut Anders Hatlen
            Assignee: Knut Anders Hatlen

Many Linux platforms come with GCJ installed. GCJ implements most of the Java SE API, but
not all of it, so it cannot be used to build Derby. Unfortunately, PropertySetter sometimes
get confused by it and constructs a compile classpath using GCJ's libraries.

For example, on a machine running Debian 6.0.1, I have the sun-java6-jdk package as well as
the gcj-jdk package installed. When running ant to build Derby (with no ~/ant.properties),
I get these compile classpaths constructed:

     [echo] After setting properties:  compilerPropsAlreadySet = true
     [echo] After setting properties:  compilerLevel16 = 1.6
     [echo] After setting properties:  jsr169compile.classpath = /home/kah/derby/trunk/classes/stubs/jsr169:/usr/lib/jvm/java-1.5.0-gcj-4.4/jre/lib/rt.ja
     [echo] After setting properties:  j14lib = ${j14lib}
     [echo] After setting properties:  java14compile.classpath = /usr/lib/jvm/java-1.5.0-gcj-4.4/jre/lib/rt.jar
     [echo] After setting properties:  j15lib = ${j15lib}
     [echo] After setting properties:  java15compile.classpath = /usr/lib/jvm/java-1.5.0-gcj-4.4/jre/lib/rt.jar
     [echo] After setting properties:  j16lib = ${jdk16}/jre/lib
     [echo] After setting properties:  java16compile.classpath = /usr/lib/jvm/java-6-sun-

Since java15compile.classpath is based on GCJ, and GCJ lacks some classes in the javax.management.remote
package, the build fails when it gets to the JMX tests:

    [javac] Compiling 14 source files to /home/kah/derby/trunk/classes
    [javac] /home/kah/derby/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/JMXConnectionDecorator.java:26:
cannot find symbol
    [javac] symbol  : class JMXServiceURL
    [javac] location: package javax.management.remote
    [javac] import javax.management.remote.JMXServiceURL;
    [javac]                               ^
    [javac] /home/kah/derby/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/RemoteConnectionGetter.java:73:
cannot find symbol
    [javac] symbol  : class JMXConnector
    [javac] location: class org.apache.derbyTesting.functionTests.tests.management.RemoteConnectionGetter
    [javac]         JMXConnector jmxc = conns.remove(jmxConnection);
    [javac]         ^
    [javac] 17 errors

/home/kah/derby/trunk/build.xml:596: The following error occurred while executing this line:
/home/kah/derby/trunk/java/testing/build.xml:80: The following error occurred while executing
this line:
Compile failed; see the compiler error output for details.

Total time: 1 minute 30 seconds

PropertySetter should ignore GCJ installations to prevent this problem. If it hadn't found
GCJ, it would have constructed java15compile.classpath from java16compile.classpath, and the
build would have succeeded.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message