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

Andrew Hughes gnu.andrew at redhat.com
Mon Apr 15 08:31:18 PDT 2013


----- Original Message -----
> 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 gcc.gnu.org never did include the complete ecj.
> 

Right.

> >> See http://gcc.gnu.org/ml/java-patches/2013-q2/msg00009.html for the ecj
> >> updates
> >> (R3_8_2), the jar can be found at
> >> http://people.debian.org/~doko/tmp/eclipse-gcj/.
> >>
> > 
> > I see this has literally just been posted.
> 
> so what?

It read as if you expected me to already be familiar with this.

> 
> > 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/Thread.java
> >>   (at
> >> line 1619)
> >>         Map<Thread, StackTraceElement[]> m = new
> >>         HashMap<>(threads.length);
> >>                                                  ^^^^^^^
> >>   '<>' operator is not allowed for source level below 1.7
> >>
> >> Setting IT_LANGUAGE_SOURCE_VERSION=7 and IT_CLASS_TARGET_VERSION=7 fixes
> >> this
> >> 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
>     it_cv_diamond=no;
>   else
>     it_cv_diamond=yes;
>   fi
> 

What is broken here?  I don't see any problem.

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

This is unrelated to the above test.

I asked you to post your config.log so I could see what was wrong and you
haven't.  Please stop trying to second guess it instead.

> 
> However, not calling the config test with the explicit -source/-target
> options
> makes the diamond operator unavailable and then leads to:
> 
> ----------
> 1. ERROR in
> /scratch/packages/openjdk/7u15/openjdk-7-7u17-2.3.8/build/openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandle.java
> (at line 566)
>         return invoker.invokeExact(this, arguments);
>                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Invocation of polymorphic methods not allowed for source level below 1.7
> 

Well, obviously.  I don't see your point here.

> >> 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
> http://pkgs.fedoraproject.org/cgit/ecj.git/tree/ecj.spec?h=f17&id=458c2cac2fae5947d3250c2cf4a0bbe1db4c47fa
> isn't yet part of any release, and the icedtea bootstrap will fail the same
> way.
> 

I don't see what Fedora's ecj packages have to do with IcedTea at all.

IcedTea's bootstrap works fine both for me and our autobuilders.  Stop trying to use
something that isn't yet supported and it'll work fine for you too.

We can look at a newer ecj in the 2.5 timeframe.

>   Matthias
> 
> 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




More information about the distro-pkg-dev mailing list