Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 800560 - app-text/foliate-2.6.4 fails to compile with dev-lang/python-exec[-native-symlinks]
Summary: app-text/foliate-2.6.4 fails to compile with dev-lang/python-exec[-native-sym...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 762406
  Show dependency tree
 
Reported: 2021-07-05 06:31 UTC by Agostino Sarubbo
Modified: 2022-02-21 05:51 UTC (History)
0 users

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


Attachments
build.log (build.log,75.14 KB, text/plain)
2021-07-05 06:31 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-07-05 06:31:29 UTC
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.
Comment 1 Agostino Sarubbo gentoo-dev 2021-07-05 06:31:32 UTC
Created attachment 721834 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2021-07-05 06:31:34 UTC
Possible context of error(s):

/usr/bin/env: ‘python3’: No such file or directory
Comment 3 Ulrich Müller gentoo-dev 2021-07-05 06:58:31 UTC
Why am I in CC of this bug?
Comment 4 Agostino Sarubbo gentoo-dev 2021-07-05 07:08:46 UTC
(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
Comment 5 Agostino Sarubbo gentoo-dev 2022-01-21 07:34:19 UTC
ci has reproduced this issue with version 2.6.4 - Updating summary.
Comment 6 Andrey Grozin gentoo-dev 2022-02-20 12:08:23 UTC
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.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-21 04:02:49 UTC
(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.
Comment 8 Larry the Git Cow gentoo-dev 2022-02-21 05:51:34 UTC
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(+)