This is a bit of a weird one, but bear with me here. In #gentoo, we've spent a lot of time debugging people trying to get around circular dependencies with harfbuzz and freetype. This sometimes results in incomplete dependencies (because of use of --nodeps), like sys-libs/zlib[-abi_x86_32] when trying to install media-libs/freetype[abi_x86_32]. Obviously, "supporting" --nodeps isn't really possible, but we noticed something interesting during investigating these cases: the build would fail due to a multilib header mismatch, not because of the missing dependency itself. It appears media-libs/freetype will fallback to a bundled copy of zlib if --with-zlib=yes is not passed (https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/builds/unix/configure.raw#L346). TL;DR: Could we explicitly add --with-zlib so that we *always* use the system copy, and bail out if it's not available? This shouldn't make any difference to the actual installation of freetype given it's always required by the ebuild, but it makes debugging a lot easier.
(In reply to Sam James from comment #0) > [...] > It appears media-libs/freetype will fallback to a bundled copy of zlib if > --with-zlib=yes is not passed > (https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/builds/unix/ > configure.raw#L346). > (and if zlib isn't installed). If zlib is around for one multilib variant and not the other, it'll mix-and-match, hence the confusing build failure rather than failing during configure.
ping. This would help reduce confusion a fair bit when people are trying to get their way out of this rather common circular dependency. Any comments?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e50955de6b05b0e38dfdef3b07f58aac560397ca commit e50955de6b05b0e38dfdef3b07f58aac560397ca Author: Sam James <sam@gentoo.org> AuthorDate: 2021-12-03 18:52:49 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-12-03 18:52:49 +0000 media-libs/freetype: forbid use of internal/bundled zlib This makes error messages far more explicit if people are trying to circumvent the common circular dependency b/t harfbuzz + freetype but don't have zlib installed (possibly just missing for one ABI: abi_x86_32). No functional change for when zlib is installed as per the ebuild's dependencies. Closes: https://bugs.gentoo.org/808252 Signed-off-by: Sam James <sam@gentoo.org> media-libs/freetype/freetype-2.11.1.ebuild | 1 + media-libs/freetype/freetype-9999.ebuild | 1 + 2 files changed, 2 insertions(+)