The package sys-apps/fwupd-1.6.1 fails to compile due to missing dependencies that are not included in the ebuild check. Reproducible: Always Steps to Reproduce: 1.Emerge sys-apps/fwupd-1.6.1 Actual Results: An unexpected error: meson.build:402:6: ERROR: Problem encountered: Error: missing dependency python gobject introspection (python3-gi) Expected Results: a compiled package Please see the attached build log.
Created attachment 716166 [details] meson-log.txt
Created attachment 716181 [details] emerge --info output
Looks like you attached meson-log.txt and not build.log.
Created attachment 716256 [details] build.log
Sorry, just attached the correct build.log
"Program python3.8 found: YES (/usr/bin/python3.8)" (...) Running command: /usr/bin/python3.8 po/test-deps --- stdout --- Error: missing dependency python gobject introspection (python3-gi) --- stderr --- Traceback (most recent call last): File "po/test-deps", line 17, in <module> gi.require_version("Pango", "1.0") NameError: name 'gi' is not defined I do indeed have python3.8 installed, but compiling fwupd and gobject-introspection with PYTHON_SINGLE_TARGET="python3.9"
I assume that dev-python/pygobject is also using python3_9, right? At the moment I don't understand how meson can switch to Python3.8.
OK, I am now able to reproduce. Caused by https://github.com/fwupd/fwupd/commit/1b396215d9396680b1b6b5c14c6f57f2226ff0a9.
Yes, pygobject is using python 3.9 Calculating dependencies... done! [ebuild R ] dev-python/pygobject-3.40.1:3::gentoo USE="cairo -examples -test" PYTHON_TARGETS="python3_9 (-python3_10) -python3_8" 0 KiB I have the following set in my make.conf and no overrides. PYTHON_TARGETS="python3_9" PYTHON_SINGLE_TARGET="python3_9"
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa0b9e87f41366e6cdaf517e7ebcc6df76300f7c commit fa0b9e87f41366e6cdaf517e7ebcc6df76300f7c Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2021-06-15 12:20:33 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2021-06-15 12:21:18 +0000 sys-apps/fwupd: fix Python detection Bug: https://bugs.gentoo.org/796143 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> ...-revert-Change-python-version-check-order.patch | 25 ++++++++++++++++++++++ sys-apps/fwupd/fwupd-1.6.1.ebuild | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-)
Is reverting the check correct? Is the python version that python3 points to (I guess set with 'eselect python') guaranteed to be equal to the PYTHON_SINGLE_TARGET value of the package?
(In reply to Kobboi from comment #11) > Is reverting the check correct? Is the python version that python3 points to > (I guess set with 'eselect python') guaranteed to be equal to the > PYTHON_SINGLE_TARGET value of the package? We discussed it in #gentoo-python and I think a different check may be needed.
It's correct for Gentoo because Python eclass will take care of "python3". Upstream has also reverted patch and came up with https://github.com/fwupd/fwupd/commit/f4ef486da80a3b5916f8a58f10a70f30cf05f756.
(In reply to Thomas Deutschmann from comment #13) > It's correct for Gentoo because Python eclass will take care of "python3". > What about -native-symlinks? > Upstream has also reverted patch and came up with > https://github.com/fwupd/fwupd/commit/ > f4ef486da80a3b5916f8a58f10a70f30cf05f756. This isn't a proper fix upstream though for non-Gentoo (and I don't think -native-symlinks). ---- For context for others in the bug: [12:40:50] <+Whissi> How is it possible that user switches to python3.8 when ebuild started with python3.9? -> https://796143.bugs.gentoo.org/attachment.cgi?id=716256 [12:41:12] <+Whissi> "user".. meson. [12:56:28] <@mgorny> Whissi: i'm going to guess something in meson hardcodes 3.8 [12:59:00] <+Whissi> Oh, "./meson.build:python3 = find_program('python3.8', 'python3', 'python3.9')" [12:59:15] <+Whissi> So if you have python3.8 around, it will be picked up first :/ [12:59:50] <+Whissi> \o/ - Just installing python3.8 will allow me to reproduce [13:01:23] <+Whissi> https://github.com/fwupd/fwupd/commit/1b396215d9396680b1b6b5c14c6f57f2226ff0a9 ... but why [13:03:37] <telans> Whissi: https://github.com/fwupd/fwupd/pull/3274#discussion_r642548028 [13:04:15] <telans> from one of the last superm1 reviews [13:05:15] <+Whissi> Thanks. [13:11:01] <+Whissi> Has anyone seen this *BSD problem already and can suggest a fix? [13:25:16] <@mgorny> Whissi: i'm 90% sure there's some -D to override this find [13:40:37] <+Whissi> Found meson.override_find_program but dunno how to use it via -D [14:12:33] Mode is +nt [14:25:54] AndrewAmmerlaan (~Thunderbi@gentoo/developer/andrewammerlaan) left IRC (Quit: AndrewAmmerlaan) [14:36:17] <@mgorny> hmm, wtf do they use find_program() and not that python finding shit... [14:36:27] <@mgorny> anyway, i'm not a meson expert [14:36:32] <@mgorny> Soap: ^ [14:37:21] <@Soap> yup [14:37:23] <@Soap> wrong [14:37:37] <@Soap> you need to find the python interpreter [14:37:51] <@Soap> i.e., you need to use meson's "python" module and invoke the interpreter from there [14:39:14] <@Soap> https://mesonbuild.com/Python-module.html
I am sorry? Package worked and still works with the reverted/new upstream fix perfectly fine with dev-lang/python-exec[-native-symlinks].
(In reply to Thomas Deutschmann from comment #15) > I am sorry? Package worked and still works with the reverted/new upstream > fix perfectly fine with dev-lang/python-exec[-native-symlinks]. It wasn't an accusation or something, I'm just saying it doesn't seem like it should work. I'm wondering if it just works by chance right now based on Meson's current logic for find_program? i.e. How should it actually know which Python version to use? Maybe I'm missing something though. https://mesonbuild.com/Reference-manual.html#find_program doesn't make it clear to me how it's working right now and choosing the right one.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=663a25c8d581d31ef58930aea642af90bbf1bdc8 commit 663a25c8d581d31ef58930aea642af90bbf1bdc8 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2021-06-15 22:45:53 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2021-06-15 22:53:46 +0000 sys-apps/fwupd: switch to upstream patch Bug: https://bugs.gentoo.org/796143 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> .../files/fwupd-1.6.1-fix-python-detection.patch | 51 ++++++++++++++++++++++ ...-revert-Change-python-version-check-order.patch | 25 ----------- sys-apps/fwupd/fwupd-1.6.1-r1.ebuild | 2 +- 3 files changed, 52 insertions(+), 26 deletions(-)
Let's move the discussion to IRC. Issue has been resolved, closing.
Note that (maybe because of the the temporary masking), a file collision has popped up in fwupd-efi: [7/7] /var/tmp/portage/sys-apps/fwupd-efi-1.0/work/fwupd-efi-1.0/efi/generate_binary.py efi/fwup.so efi/fwupdx64.efi --arch x86_64 --objcopy x86_64-pc-linux-gnu-objcopy ninja -v -j32 -l0 -C /var/tmp/portage/sys-apps/fwupd-efi-1.0/work/fwupd-efi-1.0-build install ninja: Entering directory `/var/tmp/portage/sys-apps/fwupd-efi-1.0/work/fwupd-efi-1.0-build' [0/1] /usr/lib/python-exec/python3.9/meson install --no-rebuild Installing efi/fwupdx64.efi to /var/tmp/portage/sys-apps/fwupd-efi-1.0/image/usr/libexec/fwupd/efi Installing /var/tmp/portage/sys-apps/fwupd-efi-1.0/work/fwupd-efi-1.0-build/meson-private/fwupd-efi.pc to /var/tmp/portage/sys-apps/fwupd-efi-1.0/image/usr/lib64/pkgconfig * Final size of build directory: 1420 KiB (1.3 MiB) * Final size of installed tree: 76 KiB * This package will overwrite one or more files that may belong to other * packages (see list below). * * Detected file collision(s): * * /usr/libexec/fwupd/efi/fwupdx64.efi * * Searching all installed packages for file collisions... * * Press Ctrl-C to Stop * * sys-apps/fwupd-1.5.9-r1:0::gentoo * /usr/libexec/fwupd/efi/fwupdx64.efi * * Package 'sys-apps/fwupd-efi-1.0' NOT merged due to file collisions. If * necessary, refer to your elog messages for the whole content of the * above message.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=306db48797ce6d97f663a05555af7aa7f790e9da commit 306db48797ce6d97f663a05555af7aa7f790e9da Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2021-06-16 09:27:19 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2021-06-16 09:27:38 +0000 sys-apps/fwupd-efi: set blocker on previous <sys-apps/fwupd-1.6.0 to aid upgrading Bug: https://bugs.gentoo.org/796143 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> sys-apps/fwupd-efi/fwupd-efi-1.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)