gapon@cattie ~ $ groovysh Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V at org.codehaus.groovy.classgen.ReflectorGenerator.generate(ReflectorGenerator.java:79) Reproducible: Always Steps to Reproduce: 1. emerge groovy 2. groovysh (groovyConsole or similar) 3. Actual Results: exception gapon@cattie ~ $ emerge --info Portage 2.1.3.13 (default-linux/x86/2006.1, gcc-4.2.2, glibc-2.6.1-r0, 2.6.23-gentoo i686) ================================================================= System uname: 2.6.23-gentoo i686 Genuine Intel(R) CPU T2600 @ 2.16GHz Timestamp of tree: Sun, 14 Oct 2007 14:00:01 +0000 app-shells/bash: 3.2_p17-r1 dev-java/java-config: 1.3.7, 2.1.2-r1 dev-lang/python: 2.4.4-r4, 2.5.1-r2 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.10-r5 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.23 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=prescott -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O3 -march=prescott -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS=" ftp://gentoo.inode.at/source/ http://gentoo.inode.at/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://213.186.33.38/gentoo-distfiles/ http://gentoo.inf.elte.hu/" LANG="cs_CZ.UTF-8" LC_ALL="cs_CZ.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--sort-common" LINGUAS="cs" MAKEOPTS="-j3" 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 --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/bzr-gentoo-overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac aalib accessibility acpi alsa apache2 aspnet aspnetedit avi bash-completion berkdb bitmap-fonts bluetooth bzip2 cdr cli cracklib crypt cups dbus directfb divx4linux dri dvd dvdr dvdread encode examples exif faad fam fbcon ffmpeg firebird firefox fortran ftp gdbm gif gnutls gpm gstreamer gtk gtk2 hal iconv imap ipv6 isdnlog jabber java java5 jpeg jpeg2k jython kde kdeenablefinal ldap logitech-mouse logrotate midi mmx mmx2 mng mono mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp oss pam pcmcia pcre perl png pnp postgres ppds pppd python qt qt3 qt4 quicktime readline reflection samba sasl sdl seamonkey session smp spl sqlite sqlite3 sse sse2 ssl subversion svg tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb utf8 vim vim-syntax vorbis wifi wireshark x264 x86 xine xinerama xorg xscreensaver xv xvid zlib zsh-completion" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="cs" USERLAND="GNU" VIDEO_CARDS="nvidia nv vga vesa fbdev" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
gapon@cattie ~ $ eix groovy [I] dev-java/groovy Available versions: (1) (~)1.0-r1 Installed versions: 1.0-r1(1)(17:07:23 15.10.2007)(-bsf -elibc_FreeBSD) Homepage: http://groovy.codehaus.org/ Description: Groovy is a high-level dynamic language for the JVM
Does it work with JAVA_PKG_STRICT="true" set in the env running emerge?
Do you mean: JAVA_PKG_STRICT="true" emerge -av1 groovy ? If yes, emerge completed successfully but no change. Please let me know whether I understand correctly. Thank you. One more thing that maybe could be helpful: gapon@cattie ~ $ eix ^asm$ [I] dev-java/asm Available versions: (1.4) 1.4.3-r3 (1.5) 1.5.2-r2 (~)1.5.3 (2) 2.0-r1 (2.2) (~)2.2.3-r1 (3) 3.0 Installed versions: 1.4.3-r3(1.4)(11:12:54 23.2.2007)(-doc -elibc_FreeBSD -source) 1.5.3(1.5)(11:11:32 23.2.2007)(-doc -elibc_FreeBSD -source) 2.0-r1(2)(11:14:33 23.2.2007)(-doc -elibc_FreeBSD -source) 2.2.3-r1(2.2)(11:12:21 23.2.2007)(-doc -elibc_FreeBSD -source) 3.0(3)(13:58:26 5.4.2007)(-doc -elibc_FreeBSD -source) Homepage: http://asm.objectweb.org Description: Bytecode manipulation framework for Java
Ah I should have looked better and see that the problem was not emerge but running :) Sorry. Yeah can reproduce the problem, probably because there are 3 versions of asm (1.4, 1.5, 2.2) on the classpath simultaneously, what a mess... must check the deptree...
i'm experiencing the same problem with groovy-1.5.4-r1 and groovy-1.5.6. from package.env files i can see that groovy itself depends directly on asm:2.2 and xstream (among other pacakges). xstream in turn depends on cglib:2.1 and cglib:2.1 depends on asm:1.5. my understanding is that both asm:2.2 and asm:1.5 are pulled in into classpath at runtime. this looks more like general transient dependency handling problem than groovy specific problem. in maven this handled by specifying <exclude> on transient dependencies and then specifically including the version needed. e.g. for groovy pom.xml: <dependency> <groupId>jmock</groupId> <artifactId>jmock-cglib</artifactId> <version>1.2.0</version> <scope>test</scope> <!-- exclude incompatible version of ASM --> <exclusions> <exclusion> <groupId>cglib</groupId> <artifactId>cglib-full</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>cglib</groupId> <artifactId>cglib-nodep</artifactId> <version>2.1_3</version> <scope>test</scope> </dependency> i wonder some similar technique exists in gentoo-java?
I am going to have a look at this soon.
Fixed by requiring xstream to depend on cglib-2.2 which then pulls asm-2.2 on the cp, so no more conflict. This is not a permanent solution for these kind of problems though...