Summary: | dev-lang/scala-2.12.4[-binary]: !! ERROR: Couldn't find a VM dep | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | WGH <wgh> |
Component: | Current packages | Assignee: | Java team <java> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fordfrog, jstein, kingjon3377, lssndrbarbieri, monsieurp, parazyd, sam, toralf |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=402315 https://bugs.gentoo.org/show_bug.cgi?id=733086 https://bugs.gentoo.org/show_bug.cgi?id=464608 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 732962 |
Description
WGH
2020-11-14 18:34:23 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."
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. Hi, this is also happening to me with 2.12.10 *** Bug 729722 has been marked as a duplicate of this bug. *** 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 (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. 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 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(-) |