Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 392587 - dev-java/icedtea-6.1.10.4-r2 fails to compile with eclipse-ecj-3.7: "same erasure" and "must implement the inherited abstract method"
Summary: dev-java/icedtea-6.1.10.4-r2 fails to compile with eclipse-ecj-3.7: "same era...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 10:28 UTC by Martin von Gagern
Modified: 2012-11-19 22:48 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (dev-java:icedtea-6.1.10.4-r2.emerge--info,6.54 KB, text/plain)
2011-11-30 10:28 UTC, Martin von Gagern
Details
build log (dev-java:icedtea-6.1.10.4-r2:20111129-222027.log,514.69 KB, text/plain)
2011-11-30 10:29 UTC, Martin von Gagern
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2011-11-30 10:28:55 UTC
Created attachment 294293 [details]
emerge --info

Emerging dev-java/icedtea-6.1.10.4-r2 fails with 27 error messages like the following:

1. ERROR in /var/tmp/portage/dev-java/icedtea-6.1.10.4-r2/work/icedtea6-1.10.4/openjdk-ecj/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ArrayTypeImpl.java (at line 41)
        public class ArrayTypeImpl extends ReferenceTypeImpl implements ArrayType {
                     ^^^^^^^^^^^^^
The type ArrayTypeImpl must implement the inherited abstract method Comparable<ReferenceType>.compareTo(ReferenceType)

Will attach build log shortly.
Comment 1 Martin von Gagern 2011-11-30 10:29:16 UTC
Created attachment 294295 [details]
build log
Comment 2 Kenton Groombridge 2011-11-30 22:31:02 UTC
Same problem.  Glad it isn't just me.
Comment 3 Andrzej Krentosz 2011-11-30 22:42:32 UTC
Same here.

I think it's caused by new jbootstrap USE flag. Is it safe to disable it?
Comment 4 Kenton Groombridge 2011-12-01 00:32:13 UTC
It does build with -jbootstrap.  This ebuild wants it to build with jbootstrap even though that useflag isn't set on my system.
Comment 5 Gary E. Miller 2011-12-01 01:53:48 UTC
Same problem for me.  USE=-jbootstrap allows me to emerge OK.
Comment 6 Ralph Sennhauser (RETIRED) gentoo-dev 2011-12-01 09:00:37 UTC
(In reply to comment #3)
> Same here.
> 
> I think it's caused by new jbootstrap USE flag. Is it safe to disable it?

Before the introduction of the use flag it was forced off for icedtea:6 and forced on for icedtea:7.

A bootstrap build is a means of verifying the built JDK before merging it. Without jbootstrap set the only actual run test done is generating the keystore from cacerts.
Comment 7 Peter Wood 2011-12-01 16:38:16 UTC
Instead of disabling the jbootsrap use flag, I emerged ecj-gcj. This seems to resolve the issue. Maybe ecj should be added as a dependency.
Comment 8 Martin von Gagern 2011-12-01 16:57:54 UTC
(In reply to comment #7)
> Instead of disabling the jbootsrap use flag, I emerged ecj-gcj. This seems to
> resolve the issue. Maybe ecj should be added as a dependency.

I've got eclipse-ecj installed on my system, but not ecj-gcj. Obviously it's also eclipse-ecj which is selected by eselect-ecj.

Peter, what error message did you get before you emerged ecj-gcj? If you got error messages like "no such file or directory", then what you are seeing is more likely bug #392337 than this bug here.

Note that bug #392337 comment #1 suggests emerging eselect-ecj as a workaround. As that appears not to be enough for me, I assume that this bug here is a different issue. But it might well be that the depencency should be on ecj-gcj only, and perhaps that version would have to be eselected as well. That might make things really ugly.
Comment 9 Randy Barlow 2011-12-01 19:36:16 UTC
I have this problem, with this message:

Can't exec "@ECJ@": No such file or directory at /var/tmp/portage/dev-java/icedtea-6.1.10.4-r2/work/icedtea6-1.10.4/bootstrap/jdk1.6.0/bin/javac line 53.

I suppose I am also experiencing the missing dependency suggested in this ticket…
Comment 10 Martin von Gagern 2011-12-01 19:47:11 UTC
(In reply to comment #9)
> Can't exec "@ECJ@": No such file or directory

That's bug #392337. Although the two might well be related, let's keep this one here focused on those error messages originally reported, and keep those errors executing @ECJ@ in the older bug opened for that case.

The two patterns common to the errors mentioned in the log from comment #1 appear to be the following:
* The type … must implement the inherited abstract method
  Comparable<…>.compareTo(…)
* Name clash: The method compareTo(Object) of type … has the same erasure
  as compareTo(T) of type Comparable<T> but does not override it

Adjusted the Subject of this report to be more specific as to what it is about.
Comment 11 Randy Barlow 2011-12-01 19:57:20 UTC
(In reply to comment #10)
> That's bug #392337.

Oh, thank you, I hadn't seen that one when I was searching. I'll go check it out.
Comment 12 Ralph Sennhauser (RETIRED) gentoo-dev 2011-12-01 20:43:52 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Instead of disabling the jbootsrap use flag, I emerged ecj-gcj. This seems to
> > resolve the issue. Maybe ecj should be added as a dependency.
> 
> I've got eclipse-ecj installed on my system, but not ecj-gcj. Obviously it's
> also eclipse-ecj which is selected by eselect-ecj.
> 
> Peter, what error message did you get before you emerged ecj-gcj? If you got
> error messages like "no such file or directory", then what you are seeing is
> more likely bug #392337 than this bug here.
> 
> Note that bug #392337 comment #1 suggests emerging eselect-ecj as a workaround.
> As that appears not to be enough for me, I assume that this bug here is a
> different issue. But it might well be that the depencency should be on ecj-gcj
> only, and perhaps that version would have to be eselected as well. That might
> make things really ugly.

Seems the problem is limited to eclipse-ecj:3.7.
Comment 13 Peter Wood 2011-12-01 21:35:10 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Instead of disabling the jbootsrap use flag, I emerged ecj-gcj. This seems to
> > resolve the issue. Maybe ecj should be added as a dependency.
> 
> I've got eclipse-ecj installed on my system, but not ecj-gcj. Obviously it's
> also eclipse-ecj which is selected by eselect-ecj.
> 
> Peter, what error message did you get before you emerged ecj-gcj? If you got
> error messages like "no such file or directory", then what you are seeing is
> more likely bug #392337 than this bug here.
> 
> Note that bug #392337 comment #1 suggests emerging eselect-ecj as a workaround.
> As that appears not to be enough for me, I assume that this bug here is a
> different issue. But it might well be that the depencency should be on ecj-gcj
> only, and perhaps that version would have to be eselected as well. That might
> make things really ugly.

I got the "no such file or directory" error, so I should be watching the other bug. Emerging eselect-ecj does not resolve the issue alone. some version of ecj is needed for the compilation to succeed. Emerging ecj-gcj also pulls in eselect-gcj, I randomly selected ecj-gcj, so I guess its pure luck that this solved the problem for me. (Sorry, if this is the wrong bug I am posting to, but I thought I should answer the question.)
Comment 14 Ralph Sennhauser (RETIRED) gentoo-dev 2011-12-02 12:36:32 UTC
Fixed in icedtea-6.1.10.4-r3.

Thanks for the report and the hint.
Comment 15 Andrew John Hughes 2012-11-19 22:48:58 UTC
Well, it's not fixed.  It's just worked around.  My guess is that the actual problem here is that the ecj script is swallowing the second set of source/target options and trying to compile for 1.6 which won't work with the implementation of JDI in IcedTea6.

This doesn't happen with gcj because ecj disables the 1.6 stuff on current versions as they have the necessary API.

I did fix this upstream but I guess that's only in 7.  We could look at backporting to make it work.  Or we could change the javac script in bootstrap mode.