Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 754393 - dev-lang/scala-2.12.4[-binary]: !! ERROR: Couldn't find a VM dep
Summary: dev-lang/scala-2.12.4[-binary]: !! ERROR: Couldn't find a VM dep
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: PATCH
: 729722 (view as bug list)
Depends on:
Blocks: 732962
  Show dependency tree
 
Reported: 2020-11-14 18:34 UTC by WGH
Modified: 2021-12-26 12:14 UTC (History)
8 users (show)

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 WGH 2020-11-14 18:34:23 UTC
dev-lang/scala-2.12.4[-binary] fails to emerge.

Reproducible: Always

Steps to Reproduce:
emerge scala
Actual Results:  
>> Emerging (1 of 1) dev-lang/scala-2.12.4::gentoo
 * scala-2.12.4.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                      [ ok ]
 * scala-2.12.4-ivy2-deps.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                                                                            [ ok ]
 * scala-2.12.4-sbt-deps.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                                                                             [ ok ]
 * scala-2.12.4-ant-contrib.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                             [ ok ]
 * scala-2.12.4-ant-dotnet-1.0.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                          [ ok ]
 * scala-2.12.4-ant.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                     [ ok ]
 * scala-2.12.4-maven-ant-tasks-2.1.1.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                   [ ok ]
 * scala-2.12.4-vizant.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                  [ ok ]
 * scala-2.12.4-code.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                    [ ok ]
 * scala-2.12.4-annotations.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                             [ ok ]
 * scala-2.12.4-enums.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                   [ ok ]
 * scala-2.12.4-genericNest.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                             [ ok ]
 * scala-2.12.4-jsoup-1.3.1.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                             [ ok ]
 * scala-2.12.4-macro210.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                [ ok ]
 * scala-2.12.4-methvsfield.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                             [ ok ]
 * scala-2.12.4-nest.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                    [ ok ]
 * scala-2.12.4-instrumented.jar BLAKE2B SHA512 size ;-) ...                                                                                                                                                                            [ ok ]
!!! ERROR: Couldn't find a VM dep
 * Unable to determine VM for building from dependencies:
NV_DEPEND: dev-java/ant-core:0
	dev-java/jline:2
	!binary? (
		=virtual/jdk-1.8*
		>=dev-java/sbt-0.13.13
		media-gfx/graphviz
	)
	binary? (
		>=virtual/jdk-1.8
	)
	app-arch/xz-utils:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
 * ERROR: dev-lang/scala-2.12.4::gentoo failed (setup phase):
 *   Failed to determine VM for building.
 *
 * Call stack:
 *             ebuild.sh, line  125:  Called pkg_setup
 *   scala-2.12.4.ebuild, line  101:  Called java-pkg-2_pkg_setup
 *     java-pkg-2.eclass, line   47:  Called java-pkg_init
 *   java-utils-2.eclass, line 2231:  Called java-pkg_switch-vm
 *   java-utils-2.eclass, line 2693:  Called die
 * The specific snippet of code:
 *   					die "Failed to determine VM for building."
 *
 * If you need support, post the output of `emerge --info '=dev-lang/scala-2.12.4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/scala-2.12.4::gentoo'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info =scala-2.12.4


$ eselect java-vm list
Available Java Virtual Machines:
  [1]   openjdk-8  system-vm
$ java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on
openjdk version "1.8.0_272"
OpenJDK Runtime Environment (build 1.8.0_272-b10)
OpenJDK 64-Bit Server VM (build 25.272-b10, mixed mode)

$ emerge -pqv '=dev-lang/scala-2.12.4::gentoo'
[ebuild   R   ] dev-lang/scala-2.12.4  USE="-binary* -doc -emacs -source"

$ emerge --info '=scala-2.12.4'
Portage 3.0.8 (python 3.7.9-final-0, default/linux/amd64/17.1/systemd, gcc-9.3.0, glibc-2.32-r2, 5.9.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.9.6-gentoo-x86_64-AMD_Ryzen_9_3900XT_12-Core_Processor-with-gentoo-2.7
KiB Mem:   131846516 total, 106728328 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 13 Nov 2020 20:45:01 +0000
Head commit of repository gentoo: 0811e7edc5bcf3f6b364bfd76f3b80bace7e079f
Timestamp of repository steam-overlay: Fri, 06 Nov 2020 22:05:28 +0000
Head commit of repository steam-overlay: 3dd4279a04e2ef34a3ab498e174535ac637c45ff

sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p6) 2.34.0
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          3.7.9::gentoo, 3.8.5::gentoo, 3.9.0::gentoo
dev-util/cmake:           3.17.4-r1::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.34-r2::gentoo
sys-devel/gcc:            9.3.0-r1::gentoo
sys-devel/gcc-config:     2.3.2::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r2::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync2.ru.gentoo.org/gentoo-portage/
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j24"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 berkdb bindist bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl systemd tcpd udev unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-lang/scala-2.12.4::gentoo was built with the following:
USE="binary -doc -emacs -source" ABI_X86="(64)"
Comment 1 Murph 2020-12-07 18:11:17 UTC
I'm hitting this too, on "dev-lang/scala-2.12.10::gentoo". Happy to paste any more system info / debug stuff if it helps.

>!!! ERROR: Couldn't find a VM dep
> * Unable to determine VM for building from dependencies:
>NV_DEPEND: dev-java/ant-core:0
>        dev-java/jline:2
>        !binary? (
>                >=virtual/jdk-1.8:*
>                >=dev-java/sbt-0.13.18:0
>                media-gfx/graphviz
>        )
>        binary? (
>                >=virtual/jdk-1.8:*
>        )
>        app-arch/xz-utils:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
> * ERROR: dev-lang/scala-2.12.10::gentoo failed (setup phase):
> *   Failed to determine VM for building.
> * 
> * Call stack:
> *              ebuild.sh, line  125:  Called pkg_setup
> *   scala-2.12.10.ebuild, line   79:  Called java-pkg-2_pkg_setup
> *      java-pkg-2.eclass, line   47:  Called java-pkg_init
> *    java-utils-2.eclass, line 2231:  Called java-pkg_switch-vm
> *    java-utils-2.eclass, line 2693:  Called die
> * The specific snippet of code:
> *                                      die "Failed to determine VM for building."
Comment 2 Zhixu Liu 2021-02-09 16:22:59 UTC
It's problem of package java-config, after rebuild java-config w/ following patch (revert to java-config-2.2.0-r4):

diff --git a/src/java_config_2/VersionManager.py b/src/java_config_2/VersionManager.py
index cb30e88..e8ea4a8 100644
--- a/src/java_config_2/VersionManager.py
+++ b/src/java_config_2/VersionManager.py
@@ -131,7 +131,18 @@ class VersionManager:
         # gjl does not use use flags
         try:
             use = os.environ["USE"]
-            atoms = dep_string_reduce(atoms, use)
+            #  Local import to avoid initializing portage elsewhere
+            try:
+                from portage.dep import use_reduce,paren_reduce
+            except ImportError:
+                from portage_dep import use_reduce,paren_reduce
+            from portage import flatten
+
+            # Normalize white space for Portage
+            atoms = " ".join(atoms.split())
+
+            # Remove conditional depends that are not turned on
+            atoms = " ".join(flatten(use_reduce(paren_reduce(atoms),uselist=use)))
         except KeyError:
             pass
         return atoms

problem fixed. I don't known the reason why java-config try to parse dep by itself.
Comment 3 Ivan J. 2021-04-05 09:50:41 UTC
Hi, this is also happening to me with 2.12.10
Comment 4 Andreas Sturmlechner gentoo-dev 2021-04-27 19:38:27 UTC
*** Bug 729722 has been marked as a duplicate of this bug. ***
Comment 5 Miroslav Šulc gentoo-dev 2021-06-19 07:45:11 UTC
currently the workaround is to use JAVA_PKG_FORCE_VM, that is:

JAVA_PKG_FORCE_VM=openjdk-8 emerge scala

use installed version of jdk 8 in the command if you don't have openjdk-8 installed. you can check that with the following command:

# eselect java-vm list
Available Java Virtual Machines:
  [1]   icedtea-8 
  [2]   icedtea-bin-8 
  [3]   openjdk-8 
  [4]   openjdk-11  system-vm
  [5]   openjdk-bin-8 
  [6]   openjdk-bin-11
Comment 6 Benda Xu gentoo-dev 2021-12-26 11:00:12 UTC
(In reply to Zhixu Liu from comment #2)
> It's problem of package java-config, after rebuild java-config w/ following
> patch (revert to java-config-2.2.0-r4):
> 
> diff --git a/src/java_config_2/VersionManager.py
> b/src/java_config_2/VersionManager.py
> index cb30e88..e8ea4a8 100644
> --- a/src/java_config_2/VersionManager.py
> +++ b/src/java_config_2/VersionManager.py
> @@ -131,7 +131,18 @@ class VersionManager:
>          # gjl does not use use flags
>          try:
>              use = os.environ["USE"]
> -            atoms = dep_string_reduce(atoms, use)
> +            #  Local import to avoid initializing portage elsewhere
> +            try:
> +                from portage.dep import use_reduce,paren_reduce
> +            except ImportError:
> +                from portage_dep import use_reduce,paren_reduce
> +            from portage import flatten
> +
> +            # Normalize white space for Portage
> +            atoms = " ".join(atoms.split())
> +
> +            # Remove conditional depends that are not turned on
> +            atoms = "
> ".join(flatten(use_reduce(paren_reduce(atoms),uselist=use)))
>          except KeyError:
>              pass
>          return atoms
> 
> problem fixed. I don't known the reason why java-config try to parse dep by
> itself.

Thank you for figuring it out!  See bug 464608 for the motivation.
Comment 7 Benda Xu gentoo-dev 2021-12-26 11:05:07 UTC
Hi Patrice,

Your commit https://gitweb.gentoo.org/proj/java-config.git/commit/?id=d9ac25402fa9ff918e1f1da4e3e0d97281e437c4 fixes this bug.  I will carry this patch into ::gentoo for the moment.  Let's remove it in the future for new java-config releases.

Benda
Comment 8 Larry the Git Cow gentoo-dev 2021-12-26 12:14:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a3d73b110504517e8ad9a2cfd0f2ef7a20b54bf

commit 6a3d73b110504517e8ad9a2cfd0f2ef7a20b54bf
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-12-26 12:11:08 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-12-26 12:14:13 +0000

    dev-lang/scala: reorganize DEPEND to let it build.
    
    virtual/jdk dependences is conditional on The USE=binary switch.  For
    scala-2.12.4, "=1.8" jdk version is a subset of >=1.8, USE=binary
    dependence is unconditional.  Likewise for 2.12.10, USE=-binary is also
    unconditional.
    
    This circumvents the bug in java-config for not parsing "!binary( )"
    structures correctly.
    
    Reference: https://gitweb.gentoo.org/proj/java-config.git/commit/?id=d9ac25402fa9ff918e1f1da4e3e0d97281e437c4
    Credits: Murph, Zhixu Liu, Ivan J.
    Reported-by: WGH
    Closes: https://bugs.gentoo.org/754393
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 dev-lang/scala/scala-2.12.10.ebuild | 7 ++-----
 dev-lang/scala/scala-2.12.4.ebuild  | 6 ++----
 2 files changed, 4 insertions(+), 9 deletions(-)