IcedTea bootstrap and OpenJDK build broken with ecj-3.8/4.2

Matthias Klose doko at
Mon Apr 15 07:56:36 PDT 2013

Am 15.04.2013 15:31, schrieb Andrew Hughes:
> I use either the gcj version of ecj
> with CACAO or the later 3.6 natively compiled for gcj:
> $ /home/andrew/build/cacao-jdk/bin/javac -version
> Eclipse Java Compiler 0.972_R35x, 3.5.1 release, Copyright IBM Corp 2000, 2009. All rights reserved.
> $ /usr/lib/gcj-jdk-4.8.0/bin/javac -version
> Eclipse Compiler for Java(TM) 0.A58, 3.6.0, Copyright IBM Corp 2000, 2010. All rights reserved.
> I have 3.8/4.2 installed too, but it doesn't even build with gcj.

The ecj.jar distributed by never did include the complete ecj.

>> See for the ecj
>> updates
>> (R3_8_2), the jar can be found at
> I see this has literally just been posted.

so what?

> I asked you about updating the version used by gcj some time ago, but don't recall
> ever seeing a reply.

no, never did see this question.

>> Tried to build the 2.3.x branch with this new javac.
>> The build fails first in the stamps/rt-class-files.stamp target with some
>> hundred warnings:
>>   1. ERROR in .../openjdk-boot/jdk/src/share/classes/java/lang/
>>   (at
>> line 1619)
>>         Map<Thread, StackTraceElement[]> m = new HashMap<>(threads.length);
>>                                                  ^^^^^^^
>>   '<>' operator is not allowed for source level below 1.7
>> for me.  Is there anything going wrong when setting this to 7 for the stage1
>> build?  If not, then these two macros should be set by autoconf depending on
>> the
>> compiler accepting this operator.
> It does.  You have a configuration error here, whereby configure is detecting you
> have a javac capable of using <> and is not applying the diamond patch.

so the config test looks broken:

  if $JAVAC -cp . $JAVACFLAGS -source 7 -target 7 $CLASS >&AS_MESSAGE_LOG_FD
2>&1; then

and then it uses $JAVAC with -source 6 -target 6 unconditionally in the Makefile.

However, not calling the config test with the explicit -source/-target options
makes the diamond operator unavailable and then leads to:

1. ERROR in
(at line 566)
        return invoker.invokeExact(this, arguments);
Invocation of polymorphic methods not allowed for source level below 1.7

>> Next the build fails for some java classes (ecj-hacks.diff).  Could somebody
>> look at these errors? Are these ecj compiler bugs?  My work around was to
>> comment out the offending lines, and add these hacks to ICEDTEA_BOOT_PATCHES.
>> The resulting build and jtreg runs look fine to me.
> The build works fine for me using the above mentioned versions of ecj.  Please
> stick to these for now.

so I assume that
isn't yet part of any release, and the icedtea bootstrap will fail the same way.


More information about the distro-pkg-dev mailing list