[ 
https://issues.apache.org/jira/browse/DERBY-5189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Knut Anders Hatlen updated DERBY-5189:
--------------------------------------

    Attachment: derby-5189-1a.diff

The attached patch skips directories that contain the string "gcj" in their 
names when searching for Java libraries. This made the build succeed on the 
Debian machine where it used to fail.

> 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: 10.8.1.1
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: derby-5189-1a.diff
>
>
> 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:
> printCompilerProperties:
>      [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
> r
>      [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-1.6.0.24/jre/lib/alt-rt.jar:/usr/lib/jvm/java-6-sun-1.6.0.24/jre
> /lib/alt-string.jar:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/charsets.jar:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/deploy.jar:/usr/lib/jvm/java-6-sun-1.6
> .0.24/jre/lib/javaws.jar:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/jce.jar:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/jsse.jar:/usr/lib/jvm/java-6-sun-1.6.0
> .24/jre/lib/management-agent.jar:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/plugin.jar:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/resources.jar:/usr/lib/jvm/
> java-6-sun-1.6.0.24/jre/lib/rt.jar
> 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:
> compile_jdk15:
>     [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
> BUILD FAILED
> /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:
> /home/kah/derby/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/build.xml:53:
>  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

Reply via email to