Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 911732

Summary: dev-libs/weston-12.0.2 fails to compile with dev-lang/python-exec[-native-symlinks]
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: James Le Cuirot <chewi>
Status: RESOLVED FIXED    
Severity: normal CC: ionen
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 762406    
Attachments: build.log
1-meson-log.txt

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.