Created attachment 761830 [details] Build log Hi! The fail part of the build log is this: Run-time dependency freetype2 found: NO (tried pkgconfig and cmake) Run-time dependency freetype2 found: NO (tried pkgconfig and cmake) Looking for a fallback subproject for the dependency freetype2 ../harfbuzz-3.1.1/meson.build:89:4: ERROR: Automatic wrap-based subproject downloading is disabled Any idea what may be causing this? The emerge output --tree output contained this: [ebuild N ] media-libs/harfbuzz-3.1.1:0/3.0.0::gentoo USE="cairo glib graphite icu introspection truetype -debug -doc -experimental -test" ABI_X86="32 (64) (-x32)" 0 KiB [binary R ] media-libs/freetype-2.11.0-r1-1:2::gentoo USE="X adobe-cff bzip2 cleartype-hinting harfbuzz* png static-libs -brotli -debug -doc -fontforge (-infinality) -utils" ABI_X86="32 (64) (-x32)" 0 KiB Best, Sebastian
Could you include: A full log can be found at /var/tmp/portage/media-libs/harfbuzz-3.1.1/work/harfbuzz-3.1.1-abi_x86_32.x86/meson-logs/meson-log.txt?
Hi Sam, I no longer have the original build file and after deleting the involved binary package in the mean time, the error no longer occurs in that setup, not sure why. Should we close the ticket?
I'm seeing a similar error when trying to build harfbuzz-3.1.2 with freetype-2.11.0-r1 installed on musl. Updating to freetype-2.11.1 fixes the issue. The circular deps here mean that if it were possible to force harfbuzz to be keyworded to match freetype keywording we could protect users from this issue.
(In reply to Sebastian Pipping from comment #2) > Hi Sam, I no longer have the original build file and after deleting the > involved binary package in the mean time, the error no longer occurs in that > setup, not sure why. Should we close the ticket? No worries! (In reply to Tom Gillespie from comment #3) > I'm seeing a similar error when trying to build harfbuzz-3.1.2 with > freetype-2.11.0-r1 installed on musl. Updating to freetype-2.11.1 fixes the > issue. The circular deps here mean that if it were possible to force > harfbuzz to be keyworded to match freetype keywording we could protect users > from this issue. It's not clear to me why that's needed though. I can't reproduce the issue if I downgrade and I don't see anything obvious in the commits. Obviously we could change the minimum version in the dependencies but I can't see any justification for doing that right now. Are you able to reproduce & grab the meson log?
tl;dr: harfbuzz meson assumes that harfbuzz.pc is already present if freetype +harfbuzz is installed. This is assumption is violated by binpkg installs. It is possible to install freetype with harfbuzz support enabled and package it. Once installed from a package harfbuzz will try to build with truetype support enabled, however meson assumes that /usr/lib/pkgconfig/harfbuzz.pc is already present on the system (how else would you have built freetype? who packages things?), however when installing freetype with harfbuzz support from a binpkg harfbuzz itself does not need to be present on the system. The solution is to install BOTH freetype -harfbuzz AND harfbuzz -truetype on the system. That way when rebuilding harfbuzz +truetype pkg-config called by meson can find harfbuzz.pc. For binpkg installs it is possible to install freetype +harfbuzz and then sequentially install harfbuzz -freetype followed immediately by harfbuzz +freetype. It might be possible to bypass this issue by somehow pointing pkg-config to the copy of harfbuzz.pc in the built tree?
Wonder if by chance https://github.com/harfbuzz/harfbuzz/commit/53a194aa3f5f7de0b40e879e41fcbe0de6e9fefe helps at all.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e5d8576d295164bc6dc9873e68ed94fd46968cf commit 9e5d8576d295164bc6dc9873e68ed94fd46968cf Author: Sam James <sam@gentoo.org> AuthorDate: 2022-11-10 05:13:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-11-10 05:14:03 +0000 media-libs/harfbuzz: backport fix for icu/freetype detection Bug: https://bugs.gentoo.org/830966 Closes: https://bugs.gentoo.org/880405 Closes: https://bugs.gentoo.org/880479 Thanks-to: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> .../files/harfbuzz-5.3.1-meson-freetype-icu.patch | 120 +++++++++++++++++++++ media-libs/harfbuzz/harfbuzz-5.3.1-r1.ebuild | 104 ++++++++++++++++++ 2 files changed, 224 insertions(+)
Thank you, Tom Gillespie, for your comment #5 on this topic. That has helped me tremendously. Unfortunately, this is a recurring problem. Every time either freetype or harfbuzz is updated, I have to follow that sequence of re-emerging to get past the blocking. It would be truly great if this problem were resolved either upstream or with creative ideation on the Gentoo level to avoid having to resort to these tricks.