!!! ERROR: Couldn't find suitable VM. Possible invalid dependency string. * Unable to determine VM for building from dependencies: NV_DEPEND: || ( =virtual/jdk-1.4* =virtual/jdk-1.5* ) >=dev-java/xerces-2.7 dev-java/junit dev-java/gnu-crypto >=dev-java/log4j-1.2.8 dev-java/ant-core dev-java/xmldb >=dev-java/java-config-2.0.33-r1 >=sys-apps/portage-2.1.2.7 source? ( app-arch/zip ) >=dev-java/javatoolkit-0.2.0-r1 >=sys-apps/portage-2.1.2.7 dev-java/ant-core VNEED: * * ERROR: dev-java/jaxme-0.3.1-r4 failed. Hmm, that looks strange. Why can't it find a valid Java VM ? # emerge -pvk jaxme These are the packages that would be merged, in order: Calculating dependencies... done! [binary N ] x11-proto/printproto-1.0.3 [binary N ] app-portage/portage-utils-0.1.28 [binary N ] x11-libs/libXi-1.1.3 USE="-debug" [binary N ] x11-proto/recordproto-1.13.2 [binary N ] dev-java/java-config-wrapper-0.15 [binary N ] x11-libs/libXp-1.0.0 USE="-debug" [binary N ] x11-libs/libXtst-1.0.3 USE="-debug" [binary N ] dev-java/java-config-2.1.3 [binary N ] dev-java/java-config-1.3.7 [binary N ] dev-java/sun-jdk-1.6.0.03 USE="X -alsa -doc -examples -jce (-nsplugin)" [binary N ] virtual/jdk-1.6.0 [binary N ] virtual/jre-1.6.0 [binary N ] dev-java/ant-core-1.7.0-r1 USE="-doc -source" [binary N ] dev-java/xml-commons-external-1.3.04 USE="-doc -source" [binary N ] dev-java/xml-commons-resolver-1.2 USE="-doc -source" [binary N ] dev-java/bcel-5.2 USE="-doc -source" [binary N ] dev-java/javacup-0.11a_beta20060608 USE="-doc -source" [binary N ] dev-java/junit-3.8.2-r1 USE="-doc -source" [binary N ] dev-java/hamcrest-core-1.1 USE="-source" [binary N ] dev-java/gnu-crypto-2.0.1-r2 USE="-doc -source" [binary N ] dev-java/log4j-1.2.14-r2 USE="-doc -javamail -jms -jmx -source" [binary N ] dev-java/xalan-serializer-2.7.0 USE="-doc -source" [binary N ] dev-java/junit-4.4-r1 USE="-doc -examples -source -test" [binary N ] dev-java/xerces-2.9.1 USE="-doc -examples -source" [binary N ] dev-java/xalan-2.7.0-r5 USE="-doc -source" [binary N ] dev-java/xmldb-20011111-r1 USE="-doc -source" [binary N ] dev-java/jaxme-0.3.1-r4 USE="-doc -source" It can't find one because it never merged a valid one! And that's with DEPENDs stating: DEPEND="|| ( =virtual/jdk-1.5* =virtual/jdk-1.4* ) but 1.6 is really not 1.4 or 1.5 ! Who's to blame? ;) Portage 2.1.4 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.7-r1, 2.6.23-gentoo-r1 x86_64) ================================================================= System uname: 2.6.23-gentoo-r1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ Timestamp of tree: Tue, 15 Jan 2008 06:00:01 +0000 app-shells/bash: 3.2_p33 dev-lang/python: 2.5.1-r5 sys-apps/baselayout: 1.12.11 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.61-r1 sys-devel/automake: 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-r3 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-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/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="buildpkg distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://localhost/gentoo-portage" USE="X acl amd64 berkdb bitmap-fonts cli cracklib crypt cups dri fortran gcj gdbm gpm iconv ipv6 isdnlog midi mmx mudflap ncurses nls nptl nptlonly objc openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl tcpd truetype-fonts type1-fonts unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vga" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Perhaps you've been playing with /etc/portage/profile/package.provided?
# emerge -pvt jaxme These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild N ] dev-java/jaxme-0.3.1-r4 USE="-doc -source" 0 kB [ebuild N ] dev-java/log4j-1.2.14-r2 USE="-doc -javamail -jms -jmx -source" 0 kB [ebuild N ] virtual/jdk-1.5.0 0 kB [ebuild N ] dev-java/gnu-crypto-2.0.1-r2 USE="-doc -source" 0 kB [ebuild N ] dev-java/xmldb-20011111-r1 USE="-doc -source" 0 kB [ebuild N ] dev-java/junit-3.8.2-r1 USE="-doc -source" 0 kB [ebuild N ] app-arch/unzip-5.52-r1 0 kB [ebuild N ] dev-java/xalan-2.7.0-r5 USE="-doc -source" 0 kB [ebuild N ] dev-java/javacup-0.11a_beta20060608 USE="-doc -source" 0 kB [ebuild N ] dev-java/bcel-5.2 USE="-doc -source" 0 kB [ebuild N ] dev-java/xerces-2.9.1 USE="-doc -examples -source" 0 kB [ebuild N ] dev-java/xjavac-20041208-r5 0 kB [ebuild N ] dev-java/xml-commons-resolver-1.2 USE="-doc -source" 0 kB [ebuild N ] dev-java/sun-jdk-1.5.0.13 USE="X -alsa -doc -examples -jce (-nsplugin) -odbc" 0 kB [nomerge ] dev-java/xalan-2.7.0-r5 USE="-doc -source" [ebuild N ] dev-java/xalan-serializer-2.7.0 USE="-doc -source" 0 kB [ebuild N ] dev-java/xml-commons-external-1.3.04 USE="-doc -source" 0 kB [ebuild N ] virtual/jre-1.6.0 0 kB [ebuild N ] dev-java/ant-core-1.7.0-r1 USE="-doc -source" 0 kB [ebuild N ] virtual/jdk-1.6.0 0 kB [ebuild N ] dev-java/sun-jdk-1.6.0.03 USE="X -alsa -doc -examples -jce (-nsplugin) -odbc" 0 kB [ebuild N ] x11-libs/libXtst-1.0.3 USE="-debug" 0 kB [ebuild N ] x11-proto/recordproto-1.13.2 0 kB [ebuild N ] x11-libs/libXp-1.0.0 USE="-debug" 0 kB [ebuild N ] x11-proto/printproto-1.0.3 0 kB [ebuild N ] dev-java/java-config-1.3.7 0 kB [ebuild N ] dev-java/java-config-2.1.3 0 kB [ebuild N ] dev-java/java-config-wrapper-0.15 0 kB [ebuild N ] app-portage/portage-utils-0.1.28 0 kB [ebuild N ] x11-libs/libXi-1.1.3 USE="-debug" 0 kB [ebuild N ] x11-proto/inputproto-1.4.2.1 0 kB [ebuild N ] x11-misc/util-macros-1.1.5 0 kB [ebuild N ] dev-util/pkgconfig-0.22 USE="-hardened" 0 kB [ebuild N ] dev-java/javatoolkit-0.2.0-r1 0 kB # emerge -pvtk jaxme These are the packages that would be merged, in reverse order: Calculating dependencies... done! [binary N ] dev-java/jaxme-0.3.1-r4 USE="-doc -source" [binary N ] dev-java/log4j-1.2.14-r2 USE="-doc -javamail -jms -jmx -source" [binary N ] dev-java/gnu-crypto-2.0.1-r2 USE="-doc -source" [binary N ] dev-java/junit-4.4-r1 USE="-doc -examples -source -test" [binary N ] dev-java/hamcrest-core-1.1 USE="-source" [binary N ] dev-java/xmldb-20011111-r1 USE="-doc -source" [binary N ] dev-java/junit-3.8.2-r1 USE="-doc -source" [binary N ] dev-java/xalan-2.7.0-r5 USE="-doc -source" [binary N ] dev-java/javacup-0.11a_beta20060608 USE="-doc -source" [binary N ] dev-java/bcel-5.2 USE="-doc -source" [binary N ] dev-java/xerces-2.9.1 USE="-doc -examples -source" [binary N ] dev-java/xml-commons-resolver-1.2 USE="-doc -source" [binary N ] dev-java/ant-core-1.7.0-r1 USE="-doc -source" [nomerge ] dev-java/xalan-2.7.0-r5 USE="-doc -source" [binary N ] dev-java/xalan-serializer-2.7.0 USE="-doc -source" [binary N ] dev-java/xml-commons-external-1.3.04 USE="-doc -source" [binary N ] virtual/jre-1.6.0 [binary N ] virtual/jdk-1.6.0 [binary N ] dev-java/sun-jdk-1.6.0.03 USE="X -alsa -doc -examples -jce (-nsplugin)" [binary N ] x11-libs/libXtst-1.0.3 USE="-debug" [binary N ] x11-proto/recordproto-1.13.2 [binary N ] x11-libs/libXi-1.1.3 USE="-debug" [binary N ] dev-java/java-config-1.3.7 [binary N ] dev-java/java-config-2.1.3 [binary N ] dev-java/java-config-wrapper-0.15 [binary N ] app-portage/portage-utils-0.1.28 [binary N ] x11-libs/libXp-1.0.0 USE="-debug" [binary N ] x11-proto/printproto-1.0.3 Looks like a bug somewhere between resolver and binpkgs ...
Note that the binpkg for jaxme was created from older version of the ebuild than currently in tree. The error suggests that pkg_setup was executed in the ebuild extracted from the binpkg, because the jdk deps are in the order of || ( 1.4 1.5 ) but 5 days ago I changed them to || ( 1.5 1.4 ) (portage used to pick the first, not highest, dunno if it's still the case, anyway). So the DEPEND changed between the binpkg was created and now, which might be the cause. But the jdk-1.5 dep was always there.
As zmedico pointed out on IRC, this is due to jdk dep being only in DEPEND and not RDEPEND, thus not pulled for binpkg. Yet, pkg_setup() is executed for binpkgs, and tries to perform the vm switching. So it's something like bug 154495. Apparently there's an undocumented EMERGE_FROM variable that's set to "binary" which we could use as at least some workaround to not switch vm's. Or think of something better.
From bug 154495: ------- Comment #26 From Zac Medico 2008-02-16 21:03:54 0000 [reply] ------- Now that bug 56408 is fixed in the latest stable portage (2.1.4.4), it's possible for ebuilds set their own environment variables to deduce that the pkg_setup() function has been run previously. That should allow the pkg_setup() behavior to be altered so that it works correctly with binary packages. --- So, we can skip VM switching for binpkgs by some variable (such as JAVA_PKG_SETUP_DONE etc). Maybe clean all the restored variables so they don't refer to a nonexisting VM? And make sure none of the packages need a proper VM for doing stuff in preinst/postinst. And if we find some that need (I doubt), then they should declare some variable that will override JAVA_PKG_SETUP_DONE and let the vm switching be performed as usual. Such packages would also need to keep jdk in RDEPEND.
*** Bug 230627 has been marked as a duplicate of this bug. ***
*** Bug 230625 has been marked as a duplicate of this bug. ***
Wonderful background informations and theories but when will something happen for binary package setups? So my hsqldb and commons-dbcp will be installed. What shall we do to get it work? (Won't create own ebuild and change =virtual/jdk-1.5* to >=virtual/jdk-1.5*) Thanks for practical help in these issues, see last duplicate bug adds.
(In reply to comment #8) > Wonderful background informations and theories but when will something happen > for binary package setups? So my hsqldb and commons-dbcp will be installed. > > What shall we do to get it work? (Won't create own ebuild and change > =virtual/jdk-1.5* to >=virtual/jdk-1.5*) > You need to emerge virtual/jdk:1.5 for now.
This works! Thank you very much! "emerge virtual/jdk:1.5" And I played unsuccessful around with "=virtual/jdk-1.5" and and and... Fixes Bug 230627 and Bug 230625 for me.
*** Bug 261524 has been marked as a duplicate of this bug. ***
*** Bug 286693 has been marked as a duplicate of this bug. ***
Fixed. Thanks. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/java-utils-2.eclass?r1=1.147&r2=1.148