Langtools javac task target/source from build.properties in 1.11

mvfranz at gmail.com mvfranz at gmail.com
Tue Aug 18 08:08:04 PDT 2009


On Aug 18, 2009 8:18am, Andrew John Hughes <gnu_andrew at member.fsf.org>  
wrote:
> 2009/8/18 Michael Franz mvfranz at gmail.com>:

> > I don't normally follow the openjdk mailing list, but I see this issue  
> was

> > found back on August 10 with b68. Will IcedTea still plan on using  
> target

> > 5? Or will it be bumping to target 6?

> >

> > On Tue, Aug 18, 2009 at 2:16 AM, Michael Franz mvfranz at gmail.com> wrote:

> >>

> >> Hi,

> >>

> >> I am building using JDK 1.5 as my default, but configured with JDK 6  
> (this

> >> is on OS X). When the langtools section of the build runs I get a Bad

> >> version number in .class file when the custom task 'pcompile' executes.

> >> This is because the classes for the task are compile for JDK 6, but  
> then run

> >> using JDK 5. The build.properties file has been updated to specify

> >> source/target as 5 (from 6) but these are not passed to the javac that

> >> compiles the tools. To fix this, either the compilation of the tool  
> needs

> >> to specify the target as 5 or the jvm used to execute the tool needs  
> to be

> >> the same one used for the rest of the build (in this case 6).

> >>

> >> The command line calling ant is:

> >>

> >>  
> ANT_OPTS=-Djava.io.tmpdir='/Users/mfranz/developer/icedtea/icedtea-1.11-bsd/openjdk-ecj/build/bsd-i586/langtools/build/ant-tmp'

> >> ant -Djdk.version=1.7.0_0 -Dfull.version='1.7.0_0-bsd-b66'

> >> -Drelease=1.7.0_0 -Dbuild.number=b66 -Djavac.debug=true

> >> -Ddebug.classfiles=true -Djavac.target=5 -Djavac.source=5

> >>  
> -Dboot.java.home=/Users/mfranz/developer/icedtea/icedtea-1.11-bsd/bootstrap/jdk1.6.0

> >>  
> -Djavac.executable=/Users/mfranz/developer/icedtea/icedtea-1.11-bsd/bootstrap/jdk1.6.0/bin/javac

> >>  
> -Dbuild.dir=/Users/mfranz/developer/icedtea/icedtea-1.11-bsd/openjdk-ecj/build/bsd-i586/langtools/build

> >>  
> -Ddist.dir=/Users/mfranz/developer/icedtea/icedtea-1.11-bsd/openjdk-ecj/build/bsd-i586/langtools/dist

> >> build

> >>

> >> where boot.javac.home is JDK 6.

> >>

> >> So, ant is fired up using JDK 5, but the javac tasks run JDK 6. Is  
> there

> >> a way to run the custom tasks using a forked JVM?

> >>

> >> Michael


> IcedTea doesn't 'use' any particular target, the output you included

> is from OpenJDK. The builds I'm doing now (based on b69) already use

> 7 as target and version.


I said 'use' since there are patches that change the target and source from  
6 to 5. Maybe I don't understand the purpose of those patches.


> pcompile currently uses the default source/target options of the javac

> used to build it. I have a fix for this pending review:

> http://cr.openjdk.java.net/~andrew/ecj/01/webrev.01/

> So the problem is that the javac you use to build defaults to a

> version the java that handles it can't use. I suggest you fix Ant to

> use the same JVM as OpenJDK uses to bootstrap.


I have found that jaxp and jaxws will require the same patches.
> --

> Andrew :-)



> Free Java Software Engineer

> Red Hat, Inc. (http://www.redhat.com)



> Support Free Java!

> Contribute to GNU Classpath and the OpenJDK

> http://www.gnu.org/software/classpath

> http://openjdk.java.net



> PGP Key: 94EFD9D8 (http://subkeys.pgp.net)

> Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090818/48b996c5/attachment.html 


More information about the distro-pkg-dev mailing list