From what I understand I have my flags set up such that vim build build against Python 3.6, however when I run vim it seems to be built agains Python 3.7: ``` # equery u vim [ Legend : U - final flag setting for installation] [ : I - package is installed with flag ] [ Colors : set, unset ] * Found these USE flags for app-editors/vim-8.1.1846: U I - - X : Link console vim against X11 libraries to enable title and clipboard features in xterm + + acl : Add support for Access Control Lists - - cscope : Enable cscope interface - - debug : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gent oo.org/wiki/Project:Quality_Assurance/Backt races - - gpm : Add support for sys-libs/gpm (Console-based mouse driver) - - lua : Enable Lua scripting support - - luajit : Use dev-lang/luajit instead of dev-lang/lua (ineffective with USE=-lua) - - minimal : Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features) + + nls : Add Native Language Support (using gettext - GNU locale utilities) - - perl : Add optional support/bindings for the Perl language + + python : Add optional support/bindings for the Python language - - python_single_target_python2_7 : Build for Python 2.7 only - - python_single_target_python3_5 : Build for Python 3.5 only + + python_single_target_python3_6 : Build for Python 3.6 only - - python_single_target_python3_7 : Build for Python 3.7 only - - python_targets_python2_7 : Build with Python 2.7 - - python_targets_python3_5 : Build with Python 3.5 + + python_targets_python3_6 : Build with Python 3.6 - - python_targets_python3_7 : Build with Python 3.7 - - racket : Enable support for Scheme using dev-scheme/racket + + ruby : Add support/bindings for the Ruby language - - sound : Enable sound support - - tcl : Add support the Tcl language - - terminal : Enable terminal emulation support - - vim-pager : Install vimpager and vimmanpager links ``` ``` # vim -c ':py3 import sys; print(sys.version)' 3.7.4 (default, Jul 15 2019, 11:13:52) [GCC 9.1.0] ``` This is particularly an issue for me because I have a BINHOST that has *both* 3.6 and 3.7 installed but other systems that only have 3.6 installed, and so ":py3" on those systems fail. ``` # vim -c ':py3 import sys; print(sys.version)' Error detected while processing /home/marduk/.vimrc: line 20: E370: Could not load library libpython3.7m.so.1.0 E263: Sorry, this command is disabled, the Python library could not be loaded. ```
Confirming this. After removing python3.6: !!! existing preserved libs: >>> package: dev-lang/python-3.6.10-r2 * - /usr/lib64/libpython3.6m.so.1.0 * used by /usr/bin/vim (app-editors/vim-8.2.0360) $ emerge -qpv app-editors/vim [ebuild R ] app-editors/vim-8.2.0360 USE="acl nls perl python -X -cscope -debug -gpm -lua -luajit -minimal -racket -ruby (-selinux) -sound -tcl -terminal -vim-pager" PYTHON_SINGLE_TARGET="python3_7 -python3_6 (-python3_8)"
I think the problem is: $(use_with python python3-command $(type -P $(eselect python show --python3)))
Created attachment 636702 [details] vim-8.2.0360.ebuild.patch Use ${PYTHON} variable exported by python eclasses.
Created attachment 636704 [details] vim-8.2.0360.ebuild.patch
I encountered the same issue, only the other way around. My system was updated from python 3.6 to 3.7, but vim was still compiled with python3.6m, because of course I only change the eselect setting after the whole update was complete.
Sorry for the noise, but I just noticed this applies to vim and gvim separately. I need to recompile both to work around this issue.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fb8f74b3454aab69dddd132bad5d1b656ef85cb commit 4fb8f74b3454aab69dddd132bad5d1b656ef85cb Author: Patrice Clement <monsieurp@gentoo.org> AuthorDate: 2020-07-04 20:38:21 +0000 Commit: Patrice Clement <monsieurp@gentoo.org> CommitDate: 2020-07-04 20:38:41 +0000 app-editors/vim: get python3 interpreter using ${PYTHON} variable. Patch courtesy of Alexander Tsoy <alexander@tsoy.me>. Closes: https://bugs.gentoo.org/692226 Package-Manager: Portage-2.3.99, Repoman-2.3.23 Signed-off-by: Patrice Clement <monsieurp@gentoo.org> app-editors/vim/vim-8.2.0814.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e0cc4defd62bddc9e3b0e59984ee98f32035027 commit 1e0cc4defd62bddc9e3b0e59984ee98f32035027 Author: Patrice Clement <monsieurp@gentoo.org> AuthorDate: 2020-07-04 20:35:21 +0000 Commit: Patrice Clement <monsieurp@gentoo.org> CommitDate: 2020-07-04 20:38:41 +0000 app-editors/gvim: get python3 interpreter using ${PYTHON} variable. Patch courtesy of Alexander Tsoy <alexander@tsoy.me>. Bug: https://bugs.gentoo.org/692226 Package-Manager: Portage-2.3.99, Repoman-2.3.23 Signed-off-by: Patrice Clement <monsieurp@gentoo.org> app-editors/gvim/gvim-8.2.0814.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)