IcedTea/OpenJDK bootstrapping issue
Andrew John Hughes
ahughes at redhat.com
Thu May 27 08:56:24 PDT 2010
On 27 May 2010 16:48, Ludovic Courtès <ludo at gnu.org> wrote:
> Hi,
>
> Reviving an old thread...
>
> Michal Vyskocil <mvyskocil at suse.cz> writes:
>
>> On Monday 08 March 2010 02:08:20 pm Ludovic Courtès wrote:
>>> Hi,
>>>
>>> Andrew John Hughes <gnu_andrew at member.fsf.org> writes:
>>> > 2010/1/21 Ludovic Courtès <ludo at gnu.org>:
>>> >> Andrew John Hughes <gnu_andrew at member.fsf.org> writes:
>>> [...]
>>>
>>> >>> Does ant work for you with other builds?
>>> >>
>>> >> Yes. This version of Ant was built with GCJ. It was then used to
>>> >> compile things like Xalan, Xerces, and Rhino.
>>> >
>>> > It seems something is broken with regard to Ant. The fact it's
>>> > looking for tools.jar in your gcj home directory rather than
>>> > bootstrap/jdk1.6.0 suggests it's ignoring the setting of
>>> > bootstrap.java.home. Have you checked that bootstrap/jd1.6.0 has a
>>> > valid jar file in jre/lib/rt.jar? I would guess it does as the
>>> > earlier stages have worked, but Ant is reverting to your system
>>> > install.
>>>
>>> Perhaps I should have started with this: how did you build the Ant
>>> that’s used to build IcedTea?
>>>
>>> I built it with GCJ, but Ant’s manual says it isn’t supported [0].
>>> I patched ‘build.properties’ to set ‘build.compiler’ to ‘gcj’ [1]. In
>>> addition I have gross hacks to make gcj/gij available as javac/java
>>> while building Ant itself [2].
>>
>> The easiest way is simulate the Sun layout - see
>>
>> http://sources.redhat.com/rhug/java-gcj-compat.html
>> ftp://sources.redhat.com/pub/rhug/java-gcj-compat
>>
>> It create a structure similar to Sun's layout, so you don't need patch
>> anything, just use java-gcj-compat-devel as a build dependency. Not sure if
>> the gcj 4.4 layout support Andrew mentioned does not obsolete it.
>
> With GCJ 4.5 compiled with --enable-java-home, etc. (as mentioned in
> this thread) the resulting Ant happily finds tools.jar.
>
> However, Ant ignores the ‘javac.executable’ property, thus leading it to
> keep using GCJ instead of the bootstrap javac while building IcedTea:
>
> --8<---------------cut here---------------start------------->8---
> ANT_OPTS=-Djava.io.tmpdir='/tmp/nix-build-is9x5fclzbsh79zpy2hgrw1d3izkylf9-icedtea6-1.6.1.drv-0/icedtea6-1.6.1/openjdk-ecj/build/linux-amd64/langtools/build/ant-tmp' ant -Djdk.version=1.6.0_0 -Dfull.version='1.6.0_0-b16' -Drelease=1.6.0_0 -Dbuild.number=b16 -Djavac.debug=true -Djavac.target=5 -Dboot.java.home=/tmp/nix-build-is9x5fclzbsh79zpy2hgrw1d3izkylf9-icedtea6-1.6.1.drv-0/icedtea6-1.6.1/bootstrap/jdk1.6.0 -Djavac.executable=/tmp/nix-build-is9x5fclzbsh79zpy2hgrw1d3izkylf9-icedtea6-1.6.1.drv-0/icedtea6-1.6.1/bootstrap/jdk1.6.0/bin/javac -Dbuild.dir=/tmp/nix-build-is9x5fclzbsh79zpy2hgrw1d3izkylf9-icedtea6-1.6.1.drv-0/icedtea6-1.6.1/openjdk-ecj/build/linux-amd64/langtools/build -Ddist.dir=/tmp/nix-build-is9x5fclzbsh79zpy2hgrw1d3izkylf9-icedtea6-1.6.1.drv-0/icedtea6-1.6.1/openjdk-ecj/build/linux-amd64/langtools/dist -Dfindbugs.home=/NOT-SET/devtools/share/findbugs/latest build
> Buildfile: build.xml
>
> -def-check:
>
> -check-boot.java.home:
>
> -def-pcompile:
> [mkdir] Created dir: /tmp/nix-build-is9x5fclzbsh79zpy2hgrw1d3izkylf9-icedtea6-1.6.1.drv-0/icedtea6-1.6.1/openjdk-ecj/build/linux-amd64/langtools/build/toolclasses
> [javac] Compiling 2 source files to /tmp/nix-build-is9x5fclzbsh79zpy2hgrw1d3izkylf9-icedtea6-1.6.1.drv-0/icedtea6-1.6.1/openjdk-ecj/build/linux-amd64/langtools/build/toolclasses
> [javac] ----------
> [javac] 1. ERROR in /tmp/nix-build-is9x5fclzbsh79zpy2hgrw1d3izkylf9-icedtea6-1.6.1.drv-0/icedtea6-1.6.1/openjdk-ecj/langtools/make/tools/CompileProperties/CompileProperties.java (at line 1)
> [javac] /*
> [javac] ^
> [javac] The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
> --8<---------------cut here---------------end--------------->8---
>
> $ANT_OPTS above points it to the bootstrap javac, which was successfully
> built, but Ant uses GCJ anyway.
>
> This is with Ant 1.7.1.
>
> Can someone point me to instructions to build Ant as used for building
> IcedTea?
>
> Thanks,
> Ludo’.
>
Sounds like your ant is broken if it is ignoring boot.java.home. I
suggest you contact your distro provider.
--
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
More information about the distro-pkg-dev
mailing list