Issue: x11-libs/pango-1.48.4 fails to compile.
Discovered on: amd64 (internal ref: ci)
This machine uses GCC-11: https://gcc.gnu.org/gcc-11/porting_to.html
If you think this is a GCC-11 related issue, please block bug 732706.
Created attachment 705897 [details]
build log and emerge --info
Possible context of error(s):
mv: cannot stat '/var/tmp/portage/x11-libs/pango-1.48.4/image/usr/share/doc/pango': No such file or directory
Specific to USE=-gtk-doc, haven't looked in-depth but maybe the newly added mv line needs to be guarded behind it.
Created attachment 705978 [details, diff]
I also hit this bug, bug there is another problem from disabling gtk-doc. When disabled, gi-docgen is not installed as a dependency, which causes pango to build and install its own copy of gi-docgen. (It still doesn't use it to create the documentation files, so the original build failure in this bug still happens.) This creates file conflicts that prevent installing gi-docgen later.
This problem seems to be avoided when Python modules are missing, so it's an automagic "feature":
> Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
> Looking for a fallback subproject for the dependency gi-docgen
> |Executing subproject gi-docgen method meson
> |Project name: gi-docgen
> |Project version: 2021.1
> |Program python3 (jinja2, markdown, markupsafe, pygments, toml, typogrify) found: NO modules: jinja2, markupsafe
> |../pango-1.48.4/subprojects/gi-docgen/meson.build:10:0: Exception: python3 is missing modules: markdown, pygments, toml, typogrify
> Subproject subprojects/gi-docgen is buildable: NO (disabling)
> Dependency gi-docgen from subproject subprojects/gi-docgen found: NO (subproject failed to configure)
Maybe the easiest way to avoid this is to just delete the subproject. That seems to fix all cases for me.
The subprojects folder does not need to be deleted, because the meson.eclass is setting --wrap-mode nodownload by default, which permits falling back to the subprojects. Which is to say it's a self-made problem. ;)
If --wrap-mode nofallback was used instead, it will just disable the missing functinality. Personally I think that's a bug in meson.eclass, because we should by default never use bundled dependencies. And, if somehow that became necessary, the particular ebuild can always opt-in by setting --wrap-mode nodownload and using SRC_URI if necessary. But I find it unlikely to be needed, since by design subprojects must have their own build system or at least a meson.build file, meaning it should be relatively easy to package any missing dependencies.
(In reply to Niklāvs Koļesņikovs from comment #5)
> If --wrap-mode nofallback was used instead, it will just disable the missing
> functinality. Personally I think that's a bug in meson.eclass, because we
> should by default never use bundled dependencies. And, if somehow that
> became necessary, the particular ebuild can always opt-in by setting
> --wrap-mode nodownload and using SRC_URI if necessary. But I find it
> unlikely to be needed, since by design subprojects must have their own build
> system or at least a meson.build file, meaning it should be relatively easy
> to package any missing dependencies.
It would be difficult to prove that no ebuilds currently in the gentoo repo are reliant on the current wrap-mode setting. If we change it, that might introduce breakage in other packages.
Does passing --wrap-mode nofallback in the pango ebuild suffice?
It replaces the "rm -r" part of the patch with, IMO, a cleaner fix. The "if use gdk-doc" part is still needed. I have filed bug 788154 for the general issue and discussed it in detail there.
The bug has been closed via the following commit(s):
Author: David Michael <firstname.lastname@example.org>
AuthorDate: 2021-05-04 12:57:11 +0000
Commit: Matt Turner <email@example.com>
CommitDate: 2021-05-04 19:21:04 +0000
x11-libs/pango: Fix USE=-gtk-doc issues
This prevents pango from installing its own bundled gi-docgen when
it's not installed as a dependency, and it avoids trying to rename
a missing documentation directory.
Signed-off-by: David Michael <firstname.lastname@example.org>
Signed-off-by: Matt Turner <email@example.com>
x11-libs/pango/pango-1.48.4.ebuild | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
*** Bug 788451 has been marked as a duplicate of this bug. ***