I changed in make.conf: PYTHON_SINGLE_TARGET="python3_8" to PYTHON_SINGLE_TARGET="python3_9" virtualbox was rebuilt after that. Then I changed in make.conf: PYTHON_TARGETS="python3_8 python3_9" to PYTHON_TARGETS="python3_9" ================================================================= Package Settings ================================================================= app-emulation/virtualbox-6.1.20-r1::gentoo was built with the following: USE="alsa java opengl opus pam pulseaudio python qt5 sdk udev vnc -debug -doc -dtrace -headless (-libressl) -lvm -pax_kernel -vboxwebsrv" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_9 -python3_7 -python3_8" "[1] python3.9" was also set with eselect before depclean: >>> Calculating removal order... >>> These are the packages that would be unmerged: dev-lang/python selected: 3.8.9 protected: none omitted: 3.9.4 All selected packages: =dev-lang/python-3.8.9 >>> 'Selected' packages are slated for removal. >>> 'Protected' and 'omitted' packages will not be removed. Would you like to unmerge these packages? [Yes/No] >>> Waiting 5 seconds before starting... >>> (Control-C to abort)... >>> Unmerging in: 5 4 3 2 1 >>> Unmerging (1 of 1) dev-lang/python-3.8.9... Packages installed: 1340 Packages in world: 184 Packages in system: 43 Required packages: 1340 Number removed: 1 * GNU info directory index is up-to-date. !!! existing preserved libs: >>> package: dev-lang/python-3.8.9 * - /usr/lib64/libpython3.8.so.1.0 * used by /usr/lib64/virtualbox/VBoxPython3_8.so (app-emulation/virtualbox-6.1.20-r1) Use emerge @preserved-rebuild to rebuild packages using these libraries ls -l /usr/lib64/virtualbox/VBoxPython* -rwxr-x--- 1 root vboxusers 213616 26. Apr 04:09 /usr/lib64/virtualbox/VBoxPython3_8.so -rwxr-x--- 1 root vboxusers 213608 26. Apr 04:09 /usr/lib64/virtualbox/VBoxPython3_9.so -rwxr-x--- 1 root vboxusers 213616 26. Apr 04:09 /usr/lib64/virtualbox/VBoxPython.so VBoxPython.so and VBoxPython3_8.so have same size.
Maybe usage of python-single-r1 is wrong
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e7860b78e08743e7ba8a9d641a085e349811f83 commit 0e7860b78e08743e7ba8a9d641a085e349811f83 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-07-06 02:59:20 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-07-06 03:01:21 +0000 app-emulation/virtualbox: drop Python 3.10 for now Didn't really want to do this but it's going to take substantially more work to get it running. Two issues (as described in the ebuild comment I've added): 1. The build system (not just configure) does a huge amount of autodetection; 2. Its infra isn't set up to build Python 3.10+ yet (as in, no targets defined, and they're all manually written). And it doesn't seem to even use the result of configure? It'll take more work to get this done and dropping 3.10 for now, while it's unfortunate, means it's at least not in a broken state until then. I've left in the partial work commented out given it gets us part of the way there. As far as I can tell, the configure stuff isn't even used for the subsequent actual building of the modules. Bug: https://bugs.gentoo.org/856121 Bug: https://bugs.gentoo.org/785835 Signed-off-by: Sam James <sam@gentoo.org> .../files/virtualbox-6.1.34-r3-python.patch | 14 +++++ .../virtualbox/virtualbox-6.1.34-r3.ebuild | 64 +++++++++++++++------- 2 files changed, 58 insertions(+), 20 deletions(-)
Even with the changes so far, I think it's still going to end up using whichever impl it feels like (either the newest it recognises, or the oldest, depending on configure vs the Makefile stuff).
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dde6a6bd36cadd1c70d8ec3d3f956750231eeff commit 7dde6a6bd36cadd1c70d8ec3d3f956750231eeff Author: Sam James <sam@gentoo.org> AuthorDate: 2022-07-06 03:17:56 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-07-06 03:18:32 +0000 app-emulation/virtualbox: uncomment partial Python logic Went back and forth on this but I think it's worth hinting as much as possible for now, given it's completely guessing otherwise, and we can't easily just rip out / disable Python entirely until we fix this. Bug: https://bugs.gentoo.org/856121 Bug: https://bugs.gentoo.org/785835 Signed-off-by: Sam James <sam@gentoo.org> .../virtualbox/virtualbox-6.1.34-r3.ebuild | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fc46c8f5638d711c550447a86a13286bd79fe73 commit 1fc46c8f5638d711c550447a86a13286bd79fe73 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-07-06 04:44:34 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-07-06 06:05:17 +0000 app-emulation/virtualbox: force usage of selected Python; add Python 3.10 - Finish off the work from earlier (started in 0e7860b78e08743e7ba8a9d641a085e349811f83 and then 7dde6a6bd36cadd1c70d8ec3d3f956750231eeff) for forcing the right Python implementation to be used for USE=python/bindings builds. We now hijack the script that the Makefile calls to get the list of available interpreters (which is separate from the weird configure thing!) and just create a stub which outputs the paths for the corresponding implementation chosen via PYTHON_SINGLE_TARGET using the normal eclass machinery. - Add a sanity check in src_install for when USE=python for /usr/$(get_libdir)/virtualbox/VBoxPython*.so to minimise the risk of silently not building & not realising it. (Noticed risk of this when in the middle of this work & noticed that w/o the extra (see next point) Makefile targets, it ends up silently just not doing anything). - Import Arch Linux / upstream (on trunk) patches for Python 3.10 (thanks to Kerin Millar for the pointer on that bit). We're resigned to having to update the Makefile every time a new Python comes out, but it's at least only one place, and it's not trivial for us to change it given.. kbuild. (It's not just a list, but a bunch of variables which get defined for each target.) Closes: https://bugs.gentoo.org/856121 Closes: https://bugs.gentoo.org/785835 Signed-off-by: Sam James <sam@gentoo.org> .../files/virtualbox-6.1.34-r3-python3.10.patch | 122 +++++ .../virtualbox/virtualbox-6.1.34-r4.ebuild | 585 +++++++++++++++++++++ 2 files changed, 707 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=430e969f9794911dad71a7a38c02590c1cca505d commit 430e969f9794911dad71a7a38c02590c1cca505d Author: Sam James <sam@gentoo.org> AuthorDate: 2022-07-06 09:22:53 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-07-06 09:23:07 +0000 app-emulation/virtualbox: fix disabling Python bindings Bug: https://bugs.gentoo.org/856121 Closes: https://bugs.gentoo.org/785835 Signed-off-by: Sam James <sam@gentoo.org> .../{virtualbox-6.1.34-r4.ebuild => virtualbox-6.1.34-r5.ebuild} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)