https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: app-text/foliate-2.6.3 fails to compile with dev-lang/python-exec[-native-symlinks]. Discovered on: amd64 (internal ref: ci) NOTE: This machine uses GCC-11: https://gcc.gnu.org/gcc-11/porting_to.html Please take a look at the tracker bug for more info.
Created attachment 721834 [details] build.log build log and emerge --info
Possible context of error(s): /usr/bin/env: ‘python3’: No such file or directory
Why am I in CC of this bug?
(In reply to Ulrich Müller from comment #3) > Why am I in CC of this bug? because of this commit: https://github.com/gentoo/gentoo/commit/6a013dfb06be92029ca5e534af6bb1ed441dc270 Apparently the failure was not catched before while the commit looks to be irrilevant
ci has reproduced this issue with version 2.6.4 - Updating summary.
I wonder what is a reasonable way to fix this. The package uses meson. So, some python3 is definitely installed (at least the version used to run meson). The package contains the script build-aux/meson/postinstall.py which starts with #!/usr/bin/env python3. The ebuild inherits meson.eclass which inherits python-utils-r1.eclass. So, I could use python_fix_shebang. However, I don't know: fix to what? ${EPYTHON} and ${PYTHON} are not set (we are not in python-r1 or python-single-r1 or distutils-r1). I know no way to find a python version number which exists on the user's computer. E.g. the version of python used to run meson. Probably, it is the version selected by the user by eselect python. Is it possible go get this eselected version into the ebuild somehow? Then I could set ${EPYTHON} and use python_fix_shebang for build-aux/meson/postinstall.py.
(In reply to Andrey Grozin from comment #6) > I wonder what is a reasonable way to fix this. The package uses meson. So, > some python3 is definitely installed (at least the version used to run > meson). The package contains the script build-aux/meson/postinstall.py which > starts with #!/usr/bin/env python3. The ebuild inherits meson.eclass which > inherits python-utils-r1.eclass. So, I could use python_fix_shebang. > However, I don't know: fix to what? ${EPYTHON} and ${PYTHON} are not set (we > are not in python-r1 or python-single-r1 or distutils-r1). I know no way to > find a python version number which exists on the user's computer. E.g. the > version of python used to run meson. Probably, it is the version selected by > the user by eselect python. Is it possible go get this eselected version > into the ebuild somehow? Then I could set ${EPYTHON} and use > python_fix_shebang for build-aux/meson/postinstall.py. Just use python-any-r1 which will put a Python on PATH (it puts wrappers on PATH) and you'll be sorted. The idea is you should explicitly depend on Python appropriately rather than relying on the transitive Meson dependency. And the scripts called in the build system may not be compatible with all Python versions anyway.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=812baa73db4c66f05f2e2afd102ef7282074f74a commit 812baa73db4c66f05f2e2afd102ef7282074f74a Author: Andrey Grozin <grozin@gentoo.org> AuthorDate: 2022-02-21 05:51:02 +0000 Commit: Andrey Grozin <grozin@gentoo.org> CommitDate: 2022-02-21 05:51:02 +0000 app-text/foliate: ebuild improvements Closes: https://bugs.gentoo.org/800560 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andrey Grozin <grozin@gentoo.org> app-text/foliate/foliate-2.6.4-r1.ebuild | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)