Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 384971

Summary: [java-overlay] dev-java/icedtea-7.2.0_pre fails to bootstrap using icedtea7
Product: Gentoo Linux Reporter: Martin von Gagern <Martin.vGagern>
Component: [OLD] JavaAssignee: Java team <java>
Status: RESOLVED OBSOLETE    
Severity: normal CC: gnu_andrew, rose
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 247140    
Attachments: build log (gziped)

Description Martin von Gagern 2011-09-29 18:52:05 UTC
Created attachment 288263 [details]
build log (gziped)

This appears to be different from bug #384877.

build-bootstrap-javac:
    [mkdir] Created dir: /tmp/portage/dev-java/icedtea-7.2.0_pre/work/icedtea-2.0pre/openj
dk.build/langtools/build/bootstrap/gensrc
    [mkdir] Created dir: /tmp/portage/dev-java/icedtea-7.2.0_pre/work/icedtea-2.0pre/openj
dk.build/langtools/build/bootstrap/classes
 [pcompile] Generating 7 resource files to /tmp/portage/dev-java/icedtea-7.2.0_pre/work/ic
edtea-2.0pre/openjdk.build/langtools/build/bootstrap/gensrc
     [copy] Copying 1 file to /tmp/portage/dev-java/icedtea-7.2.0_pre/work/icedtea-2.0pre/
openjdk.build/langtools/build/bootstrap/gensrc
 [pcompile] Generating 1 resource files to /tmp/portage/dev-java/icedtea-7.2.0_pre/work/ic
edtea-2.0pre/openjdk.build/langtools/build/bootstrap/gensrc
    [javac] Compiling 298 source files to /tmp/portage/dev-java/icedtea-7.2.0_pre/work/ice
dtea-2.0pre/openjdk.build/langtools/build/bootstrap/classes
    [javac] /tmp/portage/dev-java/icedtea-7.2.0_pre/work/icedtea-2.0pre/openjdk/langtools/
src/share/classes/com/sun/tools/javac/nio/PathFileObject.java:174: error: method toRealPat
h in interface Path cannot be applied to given types;
    [javac]                 return path.toRealPath(LinkOption.NOFOLLOW_LINKS).getFileName(
).toString().equals(sn);
    [javac]                            ^
    [javac]   required: boolean
    [javac]   found: LinkOption
    [javac]   reason: actual argument LinkOption cannot be converted to boolean by method invocation conversion
    [javac] 1 error

BUILD FAILED
/tmp/portage/dev-java/icedtea-7.2.0_pre/work/icedtea-2.0pre/openjdk/langtools/make/build.xml:452: The following error occurred while executing this line:
/tmp/portage/dev-java/icedtea-7.2.0_pre/work/icedtea-2.0pre/openjdk/langtools/make/build.xml:795: Compile failed; see the compiler error output for details.

Total time: 27 seconds
make[3]: *** [build] Error 1
make[3]: Leaving directory `/tmp/portage/dev-java/icedtea-7.2.0_pre/work/icedtea-2.0pre/openjdk/langtools/make'
make[2]: *** [langtools-build] Error 2
make[2]: Leaving directory `/tmp/portage/dev-java/icedtea-7.2.0_pre/work/icedtea-2.0pre/openjdk'
make[1]: *** [build_product_image] Error 2
make[1]: Leaving directory `/tmp/portage/dev-java/icedtea-7.2.0_pre/work/icedtea-2.0pre/openjdk'
make: *** [stamps/icedtea.stamp] Error 2
emake failed
 * ERROR: dev-java/icedtea-7.2.0_pre failed (compile phase):
 *   make failed
 * 
 * Call stack:
 *     ebuild.sh, line  91:  Called src_compile
 *   environment, line 5404:  Called die
 * The specific snippet of code:
 *       emake -j 1 || die "make failed"
 * 
 * If you need support, post the output of 'emerge --info =dev-java/icedtea-7.2.0_pre',
 * the complete build log and the output of 'emerge -pqv =dev-java/icedtea-7.2.0_pre'.
 * This ebuild is from a repository named 'java-overlay'
!!! When you file a bug report, please include the following information:
GENTOO_VM=icedtea7  CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info


It would appear to me that icedtea is not using its own classes in the bootclasspath. Those have the correct signature:

$ grep 'toRealPath(' $(find /tmp/portage/dev-java/icedtea-7.2.0_pre/work -name Path.java)
/tmp/portage/dev-java/icedtea-7.2.0_pre/work/icedtea-2.0pre/
  openjdk-boot/jdk/src/share/classes/java/nio/file/Path.java:
    Path toRealPath(LinkOption... options) throws IOException;
/tmp/portage/dev-java/icedtea-7.2.0_pre/work/icedtea-2.0pre/
  openjdk/jdk/src/share/classes/java/nio/file/Path.java:
    Path toRealPath(LinkOption... options) throws IOException;

Nevertheless, the icedtea7 jdk used to build icedtea apparently is the system one, which is broken in this respect:
$ GENTOO_VM=icedtea7 javap java.nio.file.Path | grep toRealPath
  public abstract java.nio.file.Path toRealPath(boolean)
    throws java.io.IOException;
$ GENTOO_VM=oracle-jdk-bin-1.7 javap java.nio.file.Path | grep toRealPath
  public abstract java.nio.file.Path toRealPath(java.nio.file.LinkOption...)
    throws java.io.IOException;

Note that my ebuild apparently already contains
http://overlays.gentoo.org/proj/java/changeset/8830
as the build log mentions the --disable-bootstrap argument to configure. So apparently that fix doesn't work as expected, if it is aimed at this issue here.
Comment 1 Maciej Piechotka 2011-10-02 08:52:07 UTC
I would like to point out that I have the same problem with sun jdk 1.6.0.26 but not icedtea6 1.10.3.
Comment 2 Martin von Gagern 2011-10-02 18:24:53 UTC
http://overlays.gentoo.org/proj/java/changeset/8839 fixes this for me. Thanks!
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-10-24 13:27:39 UTC
Should be fixed in 7.2.0, please reopen if not.
Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-10-24 13:30:02 UTC
*** Bug 384923 has been marked as a duplicate of this bug. ***