Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911732 - dev-libs/weston-12.0.2 fails to compile with dev-lang/python-exec[-native-symlinks]
Summary: dev-libs/weston-12.0.2 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
Assignee: James Le Cuirot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 762406
  Show dependency tree
 
Reported: 2023-08-05 06:27 UTC by Agostino Sarubbo
Modified: 2023-08-07 13:47 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,50.05 KB, text/plain)
2023-08-05 06:27 UTC, Agostino Sarubbo
Details
1-meson-log.txt (1-meson-log.txt,41.09 KB, text/plain)
2023-08-05 06:27 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 2023-08-05 06:27:26 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-libs/weston-12.0.2 fails to compile with dev-lang/python-exec[-native-symlinks].
Discovered on: amd64 (internal ref: ci)

NOTE:
Please take a look at the tracker bug for more info.
Comment 1 Agostino Sarubbo gentoo-dev 2023-08-05 06:27:28 UTC
Created attachment 867075 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-08-05 06:27:29 UTC
Created attachment 867076 [details]
1-meson-log.txt

1-meson-log.txt
Comment 3 Agostino Sarubbo gentoo-dev 2023-08-05 06:27:30 UTC
Error(s) that match a know pattern:


meson.build:152:31: ERROR: <PythonExternalProgram 'python3' -> ['/var/tmp/portage/dev-libs/weston-12.0.2/temp/python3.12/bin/python3']> is not a valid python or it is missing distutils
Run-time dependency lcms2 found: NO (tried pkgconfig and cmake)
Comment 4 James Le Cuirot gentoo-dev 2023-08-07 12:58:24 UTC

*** This bug has been marked as a duplicate of bug 911748 ***
Comment 5 Agostino Sarubbo gentoo-dev 2023-08-07 13:01:00 UTC
not a duplicate.

I can reproduce at:
https://github.com/gentoo/gentoo/commit/286a7c3cf202ae0f130d0996a84ee224f1c3dfc3
Comment 6 James Le Cuirot gentoo-dev 2023-08-07 13:12:35 UTC
Hmm that's odd. Presumably /var/tmp/portage/dev-libs/weston-12.0.2/temp/python3.12/bin/python3 actually exists because it is created unconditionally by python-utils-r1.eclass and I don't think Meson would mention it otherwise. What does it contain? It's supposed to look like:

#!/bin/sh
exec "/usr/bin/python3.12" "${@}"
Comment 7 Agostino Sarubbo gentoo-dev 2023-08-07 13:25:32 UTC
(In reply to James Le Cuirot from comment #6)
> Hmm that's odd. Presumably
> /var/tmp/portage/dev-libs/weston-12.0.2/temp/python3.12/bin/python3 actually
> exists because it is created unconditionally by python-utils-r1.eclass and I
> don't think Meson would mention it otherwise. What does it contain? It's
> supposed to look like:
> 
> #!/bin/sh
> exec "/usr/bin/python3.12" "${@}"

The content of the file is the same, however, after the build fails I can reproduce the issue outside portage with:

 ~ $ /var/tmp/portage/dev-libs/weston-12.0.2/temp/python3.12/bin/python3 -c "import distutils"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'distutils'

After digging into it a bit deply I discovered that:

 ~ $ qlist -e python:3.11 | grep distutils | wc -l
373

 ~ $ qlist -e python:3.12 | grep distutils | wc -l
0

So the python3.12 installation is somehow broken? It does not contain anything related to distutils.
Comment 8 Ionen Wolkens gentoo-dev 2023-08-07 13:31:47 UTC
(In reply to Agostino Sarubbo from comment #5)
> not a duplicate.
> 
> I can reproduce at:
> https://github.com/gentoo/gentoo/commit/286a7c3cf202ae0f130d0996a84ee224f1c3dfc3
Seems to be missing python_check_deps()
Comment 9 Larry the Git Cow gentoo-dev 2023-08-07 13:45:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2447080d4df25f2c4428ca22b87d38bea2f5765e

commit 2447080d4df25f2c4428ca22b87d38bea2f5765e
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2023-08-07 13:43:34 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2023-08-07 13:44:59 +0000

    dev-libs/weston: Add mising python_check_deps function
    
    Closes: https://bugs.gentoo.org/911732
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 dev-libs/weston/weston-12.0.2.ebuild | 4 ++++
 dev-libs/weston/weston-9999.ebuild   | 4 ++++
 2 files changed, 8 insertions(+)
Comment 10 James Le Cuirot gentoo-dev 2023-08-07 13:47:22 UTC
Thanks. I forget that python_check_deps is still needed even in simple cases.

ago, distutils was dropped from Python 3.12 so what you saw is expected. Meson needs to address this so that setuptools is no longer needed as a workaround.