Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509938 - media-libs/fontconfig should run fc-cache for all multilib ABIs
Summary: media-libs/fontconfig should run fc-cache for all multilib ABIs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Multilib team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-05-09 21:00 UTC by David Leverton
Modified: 2014-05-10 21:57 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fontconfig-multilib-cache.patch (fontconfig-multilib-cache.patch,931 bytes, patch)
2014-05-09 21:00 UTC, David Leverton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Leverton 2014-05-09 21:00:53 UTC
Created attachment 376638 [details, diff]
fontconfig-multilib-cache.patch

The fontconfig cache is arch-dependent (or at least word size and endian-dependent - my /var/cache/fontconfig contains files ending in both -le32d4.cache-4 and -le64.cache-4), therefore multilib builds should regenerate it for all ABIs, not just the main one.

This caused a specific problem for me when building multilib pango for the first time and running the 32-bit test-pangocairo-threads test - 100 threads all simultaneously trying to read every font on the system without the aid of a suitable cache turns out to be not so good for RAM usage.  However, it's probably better in general to have the cache for alternative ABIs, not just for that reason.

The attached patch, modelled on the pango-querymodules handling in x11-libs/pango, does this by installing fc-cache for all ABIs and running it for all of them in pkg_postinst.  Ideally the fc-cache call in font.eclass would be updated as well, but I'm not quite sure of a clean way to do that.  I'm also not sure if it's slightly overkill for x86+x32+amd64 or MIPS o32+n32+n64 builds - it might be that only two versions of the cache are needed rather than all three, but I don't have any such systems to test with.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-10 21:57:27 UTC
+*fontconfig-2.11.1-r1 (10 May 2014)
+
+  10 May 2014; Michał Górny <mgorny@gentoo.org> +fontconfig-2.11.1-r1.ebuild:
+  Rebuild font cache for all ABIs, bug #509938.

Thanks for the patch. I've modified it a bit since nowadays you can safely use ${CHOST}-prefixed tools indep of ABI count.