Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 734604 - dev-java/openjfx-11.0.8_p2 - pkg_setup(): ERROR: java-pkg_switch-vm: Failed to determine VM for building
Summary: dev-java/openjfx-11.0.8_p2 - pkg_setup(): ERROR: java-pkg_switch-vm: Failed t...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-29 18:58 UTC by John Blbec
Modified: 2020-07-31 20:12 UTC (History)
1 user (show)

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


Attachments
emerge --info (emerge-info.txt,5.61 KB, text/plain)
2020-07-29 18:58 UTC, John Blbec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Blbec 2020-07-29 18:58:00 UTC
Created attachment 651462 [details]
emerge --info

it always fails with:

 * Package:    dev-java/openjfx-11.0.8_p2
 * Repository: gentoo
 * Maintainer: gyakovlev@gentoo.org java@gentoo.org
 * USE:        abi_x86_64 amd64 cpu_flags_x86_sse2 elibc_glibc kernel_linux media userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * java-pkg_build-vm-from-handle: No vm found for handles: openjdk-11 openjdk-bin-11
 * java-pkg_switch-vm: No VM found for handles: openjdk-11 openjdk-bin-11
 * ERROR: dev-java/openjfx-11.0.8_p2::gentoo failed (setup phase):
 *   java-pkg_switch-vm: Failed to determine VM for building
 * 
 * Call stack:
 *                  ebuild.sh, line  125:  Called pkg_setup
 *   openjfx-11.0.8_p2.ebuild, line  120:  Called java-pkg-2_pkg_setup
 *          java-pkg-2.eclass, line   47:  Called java-pkg_init
 *        java-utils-2.eclass, line 2193:  Called java-pkg_switch-vm
 *        java-utils-2.eclass, line 2636:  Called die
 * The specific snippet of code:
 *                                      die "${FUNCNAME}: Failed to determine VM for building"
 * 

--- my java-vm ---

$ eselect java-vm list
Available Java Virtual Machines:
grep: /usr/share/java-config-2/vm/openjdk-11: No such file or directory
grep: /usr/share/java-config-2/vm/openjdk-bin-11: No such file or directory
  [1]   icedtea-bin-8  system-vm
  [2]   openjdk-11  user-vm
  [3]   openjdk-bin-11 

so what package should create /usr/share/java-config-2/vm/openjdk-11 and /usr/share/java-config-2/vm/openjdk-bin-11?

generaly speaking it is a pain to install openjdk and openjfx on gentoo as a replacement for oracle-jdk :-/
Comment 1 John Blbec 2020-07-29 18:59:16 UTC
$ echo $JAVA_HOME
/home/rpolasek/.gentoo/java-config-2/current-user-vm
Comment 2 John Blbec 2020-07-29 19:37:11 UTC
why is gentoo-vm useflag masked?
Comment 3 John Blbec 2020-07-29 19:38:39 UTC
(a meant gentoo-vm useflag for openjdk and opendjk-bin)
Comment 4 Georgy Yakovlev archtester gentoo-dev 2020-07-31 07:33:41 UTC
it's only masked for openjdk version 11.
it's masked to prevent build failures. Ebuilds and eclasses are not updated to work with it properly. Sometimes it works, sometimes it does not.

Please remove local hacks and user vm and try again. OpenJFX should build even if you don't have gentoo-vm flag enabled.

Also, if you are not ready to deal with bugs (A LOT OF THEM) - don't enable gentoo-vm useflag on openjdk-11 and if you still enabled it - don't set it as system vm.

if you need java11 - just call by full path.
Comment 5 John Blbec 2020-07-31 08:25:23 UTC
i agree with you - it should work but it doesn't work. that's why i've raised this ticket so please don't change it as resolved :-(
Comment 6 Georgy Yakovlev archtester gentoo-dev 2020-07-31 09:10:56 UTC
it was a test-request, not resolved and refused.
It's common to close bugs for test request when user's system is the problem.
If you test and it still does not work - we can always reopen.



please fix 'eselect java-vm list' first

it outputs garbage, and it's the reason of your problems.
I don't know what you did and how you got this error.


Here's approx steps you should take:

clean up system from manually created files.
Don't use user vm and remove ~/.gentoo/java-config-2 directory.
After that disable gentoo-vm useflag.

next proceed with:
> emerge -C openjdk:11
> emerge --oneshot openjdk-bin:11
> emerge --oneshot openjfx
> emerge openjdk:11


this should get you working openjdk:11 with openjfx.
Comment 7 Georgy Yakovlev archtester gentoo-dev 2020-07-31 09:13:18 UTC
also reinstall openjdk-bin  without gentoo-vm flag, if you have it enabled.
Comment 8 John Blbec 2020-07-31 18:46:29 UTC
ok it works. why it is so complicated?
Comment 9 Georgy Yakovlev archtester gentoo-dev 2020-07-31 20:11:20 UTC
Because nobody really works on getting java11 and later supported, and tools have bugs, this is exactly why gentoo-vm is masked. Manpower problem.

Also since java11 lacking module support jfx has to be compiled and linked in at build time and not later.
That’s why there are so many steps.
Comment 10 Georgy Yakovlev archtester gentoo-dev 2020-07-31 20:12:54 UTC
And btw, you can remove openjdk-bin after you’ve built non-bin version. It’s only needed on 1st build.