Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 142750 - dev-java/aspectwerkz-2.0_rc2-r1 produces 1.5 bytecode even with generation 2
Summary: dev-java/aspectwerkz-2.0_rc2-r1 produces 1.5 bytecode even with generation 2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-04 01:05 UTC by WiseLYNX
Modified: 2006-08-05 09:57 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description WiseLYNX 2006-08-04 01:05:17 UTC
emerging any version above 2.0.2-r2 of dev-java/cglib fails with the following error:

    [javac] /var/tmp/portage/cglib-2.1.3/work/src/proxy/net/sf/cglib/transform/hook/AbstractPreProcessor.java:21: cannot access org.codehaus.aspectwerkz.hook.ClassPreProcessor
    [javac] bad class file: /var/tmp/portage/cglib-2.1.3/work/lib/aspectwerkz-core.jar(org/codehaus/aspectwerkz/hook/ClassPreProcessor.class)
    [javac] class file has wrong version 49.0, should be 48.0
    [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
    [javac] import org.codehaus.aspectwerkz.hook.ClassPreProcessor;
    [javac]                                      ^
    [javac] 1 error

BUILD FAILED
/var/tmp/portage/cglib-2.1.3/work/build.xml:72: Compile failed; see the compiler error output for details.

Total time: 4 seconds

!!! ERROR: dev-java/cglib-2.1.3 failed.
Call stack:
  ebuild.sh, line 1543:   Called dyn_compile
  ebuild.sh, line 938:   Called src_compile
  cglib-2.1.3.ebuild, line 38:   Called eant 'jar'
  java-utils-2.eclass, line 1229:   Called die

!!! eant failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! When you file a bug report, please include the following information:
GENTOO_VM=blackdown-jdk-1.4.2  CLASSPATH="" JAVA_HOME="/opt/blackdown-jdk-1.4.2.03"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="javac"

emerge --info outputs:

Portage 2.1.1_pre4-r2 (default-linux/x86/2006.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.17-gentoo-r4 i686)
=================================================================
System uname: 2.6.17-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.14
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.12-r6
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/terminfo"
CXXFLAGS="-march=i686 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apache2 avi berkdb bitmap-fonts bzip2 cdr cli crypt ctype cups dba dlloader dri eds elibc_glibc emboss encode esd ethereal exif expat fam fastbuild foomaticdb force-cgi-redirect fortran ftp gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml guile idn imlib ipv6 isdnlog jpeg kde kernel_linux lcms libg++ libwww mad memlimit mikmod mng motif mozilla mp3 mpeg ncurses nls nptl ogg opengl oss pam pcre pdflib perl png posix pppd python qt qt3 qt4 quicktime readline reflection samba sdl session simplexml slang soap sockets spell spl ssl tcltk tcpd tiff tokenizer truetype truetype-fonts type1-fonts udev userland_GNU vorbis x86 xml xml2 xmms xorg xsl xv zlib input_devices_keyboard input_devices_mouse input_devices_evdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


I followed the instructions at http://www.gentoo.org/proj/en/java/java-upgrade.xml, and I currently have:

# java-config-1 -L
[blackdown-jre-1.4.2.03] "Blackdown JRE 1.4.2.03" (/etc/env.d/java/20blackdown-jre-1.4.2.03)
[blackdown-jdk-1.4.2.03] "Blackdown JDK 1.4.2.03" (/etc/env.d/java/20blackdown-jdk-1.4.2.03) *
# java-config-2 -L
1) Blackdown JDK 1.4.2.03 [blackdown-jdk-1.4.2] (/usr/share/java-config-2/vm/blackdown-jdk-1.4.2)
2) Blackdown JRE 1.4.2.03 [blackdown-jre-1.4.2] (/usr/share/java-config-2/vm/blackdown-jre-1.4.2)
*) Sun JDK 1.5.0.07 [sun-jdk-1.5] (/usr/share/java-config-2/vm/sun-jdk-1.5)

both java-check-environment and java-1.5-fixer report all is right.
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-05 06:28:27 UTC
Aspectwerkz is intended to be 1.5, that's why java-1.5-fixer no longer reports it. So cglib should be 1.5 too, probably..
Comment 2 Josh Nichols (RETIRED) gentoo-dev 2006-08-05 08:09:18 UTC
Ok, well the problem turns out that it depends on >=virtual/jdk-1.5 and virtual/jdk-1.5... which forces it to produce 1.5 bytecode.

Could someone test this with changing the deps to 1.4 please?
Comment 3 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-08-05 08:14:33 UTC
With 1.4 it fails:

compile:jdk15:
     [echo] ** Found jdk15 specific compilation...
    [javac] Compiling 18 source files to /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/target/jdk15
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/DeploymentModelEnum.java:6: 'class' or 'interface' expected
    [javac] public enum DeploymentModelEnum {
    [javac]        ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/DeploymentModelEnum.java:9: 'class' or 'interface' expected
    [javac] ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/After.java:20: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] @Target(ElementType.METHOD)
    [javac]  ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/AfterFinally.java:20: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] @Target(ElementType.METHOD)
    [javac]  ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/AfterReturning.java:20: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] @Target(ElementType.METHOD)
    [javac]  ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/AfterThrowing.java:20: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] @Target(ElementType.METHOD)
    [javac]  ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Around.java:20: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] @Target(ElementType.METHOD)
    [javac]  ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Aspect.java:20: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] @Target(ElementType.TYPE)
    [javac]  ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Before.java:20: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] @Target(ElementType.METHOD)
    [javac]  ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Execution.java:10: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] @Target({ElementType.METHOD, ElementType.FIELD})
    [javac]  ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Execution.java:14: generics are not supported in -source 1.4
    [javac] (try -source 1.5 to enable generics)
    [javac]     Class<? extends Annotation>[] annotations() default Null.class;
    [javac]          ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Expression.java:22: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] @Target({ElementType.FIELD, ElementType.METHOD})
    [javac]  ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Introduce.java:11: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] @Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.FIELD})
    [javac]  ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Mixin.java:16: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] public @interface Mixin {
    [javac]         ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Not.java:8: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] public @interface Not {
    [javac]         ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Not.java:9: generics are not supported in -source 1.4
    [javac] (try -source 1.5 to enable generics)
    [javac]     Class<? extends Annotation> value(); // DOES NOT WORK!
    [javac]          ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Within.java:10: annotations are not supported in -source 1.4
    [javac] (try -source 1.5 to enable annotations)
    [javac] @Target({ElementType.METHOD, ElementType.FIELD})
    [javac]  ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/annotation/Within.java:14: generics are not supported in -source 1.4
    [javac] (try -source 1.5 to enable generics)
    [javac]     Class<? extends Annotation>[] annotations() default Null.class;
    [javac]          ^
    [javac] /var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/src/jdk15/main/org/codehaus/aspectwerkz/hook/PreProcessorAdapter.java:46: generics are not supported in -source 1.4
    [javac] (try -source 1.5 to enable generics)
    [javac]     public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined,
    [javac]                                                                        ^
    [javac] 19 errors

BUILD FAILED
/var/tmp/portage/aspectwerkz-2.0_rc2-r1/work/aw_2_0_2/build.xml:148: Compile failed; see the compiler error output for details.

Total time: 13 seconds

!!! ERROR: dev-java/aspectwerkz-2.0_rc2-r1 failed.
Call stack:
  ebuild.sh, line 1543:   Called dyn_compile
  ebuild.sh, line 938:   Called src_compile
  aspectwerkz-2.0_rc2-r1.ebuild, line 53:   Called eant 'dist'
  java-utils-2.eclass, line 1229:   Called die

!!! eant failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.5  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.5.0.07"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="javac"
and of course, the output of emerge --info
!!! This ebuild is from an overlay: '/home/nelchael/gentoo-x86'
Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-05 08:18:09 UTC
     [echo] ** Found jdk15 specific compilation...

looks like it tests for 1.5 and compiles something else, and build.xml rewriting conflicts with it. would it build with 1.4 JDK? if yes, looks like java5 USEflag candidate
Comment 5 Josh Nichols (RETIRED) gentoo-dev 2006-08-05 08:24:23 UTC
The quick fix is to dep on =virtual/jdk-1.4*, which will solve it.

Long term though, should probably remove the automagic... as in, make it be a property that you can specify. Like, you may want to still use 1.5 for building, but don't want java5 specific stuff.
Comment 6 Josh Nichols (RETIRED) gentoo-dev 2006-08-05 09:57:29 UTC
Ok, this should now be fixed with 2.0_rc2-r2. So, in this revision, the java5 use flag has been added. Java 5 stuff will only be built with it enabled. All the right bytecode should be produced now as well.