You are not logged in.

#1 2018-08-31 02:08:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,042
Website

[SOLVED] fontconfig: failed to write cache

SOLVED Note: while there may not be a full solution yet, there is an epoch-bumped rollback in the repos and the issue is being handled by the relevant devs.  The original post follows:


I received the following error on an update today, and found that it replicates with each reinstall of fontconfig:

$ pacman -S fontconfig
warning: fontconfig-1:2.13.1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)       Old Version  New Version  Net Change

extra/fontconfig  1:2.13.1-1   1:2.13.1-1     0.00 MiB

Total Installed Size:  2.04 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                                                                [-----------------------------------------------------------------] 100%
(1/1) checking package integrity                                                                              [-----------------------------------------------------------------] 100%
(1/1) loading package files                                                                                   [-----------------------------------------------------------------] 100%
(1/1) checking for file conflicts                                                                             [-----------------------------------------------------------------] 100%
(1/1) checking available disk space                                                                           [-----------------------------------------------------------------] 100%
:: Processing package changes...
(1/1) reinstalling fontconfig                                                                                 [-----------------------------------------------------------------] 100%
Rebuilding fontconfig cache.../usr/share/fonts/100dpi: failed to write cache
/usr/share/fonts/75dpi: failed to write cache
/usr/share/fonts/Type1: failed to write cache
/usr/share/fonts/cantarell: failed to write cache
/usr/share/fonts/cyrillic: failed to write cache
/usr/share/fonts/encodings/large: failed to write cache
/usr/share/fonts/gsfonts: failed to write cache
/usr/share/fonts/local: failed to write cache
/usr/share/fonts/util: failed to write cache
 done.
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

This is the `fc-cache -rs` from fontconfig.install failing.  That command run on it's own indeed fails with the same errors, and running it with the v/verbose flag doesn't reveal anything meangful to me:

$ sudo fc-cache -rsv
/usr/share/fonts: caching, new cache contents: 0 fonts, 11 dirs
/usr/share/fonts/100dpi: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/100dpi: failed to write cache
/usr/share/fonts/75dpi: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/75dpi: failed to write cache
/usr/share/fonts/TTF: caching, new cache contents: 68 fonts, 0 dirs
/usr/share/fonts/Type1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/Type1: failed to write cache
/usr/share/fonts/cantarell: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cantarell: failed to write cache
/usr/share/fonts/cyrillic: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cyrillic: failed to write cache
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/encodings/large: failed to write cache
/usr/share/fonts/gsfonts: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/gsfonts: failed to write cache
/usr/share/fonts/local: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/local: failed to write cache
/usr/share/fonts/misc: caching, new cache contents: 18 fonts, 0 dirs
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/util: failed to write cache
/usr/local/share/fonts: skipping, no such directory
/usr/share/fonts/100dpi: skipping, looped directory detected
/usr/share/fonts/75dpi: skipping, looped directory detected
/usr/share/fonts/TTF: skipping, looped directory detected
/usr/share/fonts/Type1: skipping, looped directory detected
/usr/share/fonts/cantarell: skipping, looped directory detected
/usr/share/fonts/cyrillic: skipping, looped directory detected
/usr/share/fonts/encodings: skipping, looped directory detected
/usr/share/fonts/gsfonts: skipping, looped directory detected
/usr/share/fonts/local: skipping, looped directory detected
/usr/share/fonts/misc: skipping, looped directory detected
/usr/share/fonts/util: skipping, looped directory detected
/usr/share/fonts/encodings/large: skipping, looped directory detected
/var/cache/fontconfig: cleaning cache directory
fc-cache: failed

Searching for the error only turned up a thread and bug report from 12 years ago which didn't give me anything to go on (though I did check mtimes, and did `touch /usr/share/fonts/*` which did not help).

It seems the write fails only in directories that do not actually contain fonts.  So perhaps this is harmless - but it is new, and it doesn't seem fitting for the command to indicate failure (and exit with a non-zero exit code) if it is working as intended.

Last edited by Trilby (2018-09-04 01:50:02)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#2 2018-08-31 02:11:04

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 27,930
Website

Re: [SOLVED] fontconfig: failed to write cache

Can confirm.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-08-31 03:28:43

Batou
Member
Registered: 2017-01-03
Posts: 219

Re: [SOLVED] fontconfig: failed to write cache

Same here but slightly different fonts:

( 1/15) upgrading fontconfig                                                           [##################################################] 100%
Rebuilding fontconfig cache.../usr/share/fonts/100dpi: failed to write cache
/usr/share/fonts/75dpi: failed to write cache
/usr/share/fonts/cyrillic: failed to write cache
/usr/share/fonts/encodings/large: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/Asana-Math/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Pagella/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Termes/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/Latin-Modern/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/Neo-Euler/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/STIX-Web/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/TeX/woff: failed to write cache
/usr/share/fonts/ttf-emojione: failed to write cache
/usr/share/fonts/util: failed to write cache
 done.

and

sudo fc-cache -rsv
/usr/share/fonts: caching, new cache contents: 0 fonts, 13 dirs
/usr/share/fonts/100dpi: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/100dpi: failed to write cache
/usr/share/fonts/75dpi: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/75dpi: failed to write cache
/usr/share/fonts/OTF: caching, new cache contents: 23 fonts, 0 dirs
/usr/share/fonts/TTF: caching, new cache contents: 100 fonts, 0 dirs
/usr/share/fonts/cantarell: caching, new cache contents: 5 fonts, 0 dirs
/usr/share/fonts/cyrillic: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cyrillic: failed to write cache
/usr/share/fonts/emojione: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/encodings/large: failed to write cache
/usr/share/fonts/gsfonts: caching, new cache contents: 35 fonts, 0 dirs
/usr/share/fonts/mathjax: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/mathjax/HTML-CSS: caching, new cache contents: 0 fonts, 7 dirs
/usr/share/fonts/mathjax/HTML-CSS/Asana-Math: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/mathjax/HTML-CSS/Asana-Math/woff: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/mathjax/HTML-CSS/Asana-Math/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Pagella: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Pagella/woff: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Pagella/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Termes: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Termes/woff: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Termes/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/Latin-Modern: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/mathjax/HTML-CSS/Latin-Modern/woff: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/mathjax/HTML-CSS/Latin-Modern/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/Neo-Euler: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/mathjax/HTML-CSS/Neo-Euler/woff: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/mathjax/HTML-CSS/Neo-Euler/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/STIX-Web: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/mathjax/HTML-CSS/STIX-Web/woff: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/mathjax/HTML-CSS/STIX-Web/woff: failed to write cache
/usr/share/fonts/mathjax/HTML-CSS/TeX: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/mathjax/HTML-CSS/TeX/woff: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/mathjax/HTML-CSS/TeX/woff: failed to write cache
/usr/share/fonts/misc: caching, new cache contents: 111 fonts, 0 dirs
/usr/share/fonts/ttf-emojione: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/ttf-emojione: failed to write cache
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/util: failed to write cache
/usr/local/share/fonts: skipping, no such directory
/usr/share/fonts/100dpi: skipping, looped directory detected
/usr/share/fonts/75dpi: skipping, looped directory detected
/usr/share/fonts/OTF: skipping, looped directory detected
/usr/share/fonts/TTF: skipping, looped directory detected
/usr/share/fonts/cantarell: skipping, looped directory detected
/usr/share/fonts/cyrillic: skipping, looped directory detected
/usr/share/fonts/emojione: skipping, looped directory detected
/usr/share/fonts/encodings: skipping, looped directory detected
/usr/share/fonts/gsfonts: skipping, looped directory detected
/usr/share/fonts/mathjax: skipping, looped directory detected
/usr/share/fonts/misc: skipping, looped directory detected
/usr/share/fonts/ttf-emojione: skipping, looped directory detected
/usr/share/fonts/util: skipping, looped directory detected
/usr/share/fonts/encodings/large: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/Asana-Math: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Pagella: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Termes: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/Latin-Modern: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/Neo-Euler: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/STIX-Web: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/TeX: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/Asana-Math/woff: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Pagella/woff: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/Gyre-Termes/woff: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/Latin-Modern/woff: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/Neo-Euler/woff: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/STIX-Web/woff: skipping, looped directory detected
/usr/share/fonts/mathjax/HTML-CSS/TeX/woff: skipping, looped directory detected
/var/cache/fontconfig: cleaning cache directory
fc-cache: failed

However, user caches build fine.


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#4 2018-08-31 04:40:09

definitellynotspammer
Member
Registered: 2016-06-07
Posts: 27

Re: [SOLVED] fontconfig: failed to write cache

Same here

Offline

#5 2018-08-31 04:45:40

Hspasta
Member
Registered: 2011-12-24
Posts: 189
Website

Re: [SOLVED] fontconfig: failed to write cache

I see this as well.

:: Processing package changes...
(1/7) upgrading fontconfig                                                        [###############################################] 100%
Rebuilding fontconfig cache.../usr/share/fonts/cwtex-fangsong: failed to write cache
/usr/share/fonts/cwtex-kai: failed to write cache
/usr/share/fonts/cwtex-ming: failed to write cache
/usr/share/fonts/cwtex-yen: failed to write cache
/usr/share/fonts/cwtexhei: failed to write cache
/usr/share/fonts/encodings/large: failed to write cache
/usr/share/fonts/nanumgothic: failed to write cache
/usr/share/fonts/nanummyeongjo: failed to write cache
/usr/share/fonts/pompiere-: failed to write cache
/usr/share/fonts/raleway-dots-: failed to write cache
/usr/share/fonts/sue-ellen-francisco-: failed to write cache
/usr/share/fonts/util: failed to write cache
/usr/share/fonts/vidaloka-: failed to write cache
 done.

Offline

#6 2018-08-31 04:49:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 27,930
Website

Re: [SOLVED] fontconfig: failed to write cache

OK, we have established it is an issue. There is no need for any more "me too" posts.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2018-08-31 06:35:54

rgzfxf6bhu
Member
Registered: 2015-10-30
Posts: 87

Re: [SOLVED] fontconfig: failed to write cache

Offline

#8 2018-08-31 11:04:56

DarthMucus
Member
Registered: 2018-08-28
Posts: 19

Re: [SOLVED] fontconfig: failed to write cache

How big of an issue is it? I didn't look like the package upgrade failed. What is this cache that the write attempt failed on?

Offline

#9 2018-08-31 13:30:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,042
Website

Re: [SOLVED] fontconfig: failed to write cache

DarthMucus, if it is indeed only failing on directories that do not contain any fonts, then it should be pretty much harmless - it's just some noise from an awkwardly handled situation that should be cleaned up.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2018-08-31 16:55:26

Hendrikto
Member
Registered: 2018-01-18
Posts: 1

Re: [SOLVED] fontconfig: failed to write cache

Trilby wrote:

DarthMucus, if it is indeed only failing on directories that do not contain any fonts, then it should be pretty much harmless

This does not seem to be the case though. For me it failed on

/usr/share/fonts/util

, which is not empty.

Edit: Also mentioned here https://bugs.archlinux.org/task/59889#comment172682

Last edited by Hendrikto (2018-08-31 16:57:25)

Offline

#11 2018-08-31 19:20:41

LordAnarchist
Member
Registered: 2018-06-06
Posts: 14

Re: [SOLVED] fontconfig: failed to write cache

So guys,
How do you think we should solve this issue?

Offline

#12 2018-08-31 19:32:50

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 27,930
Website

Re: [SOLVED] fontconfig: failed to write cache

There is a bug report. It has been pushed upstream. Enough of the empty posting: https://wiki.archlinux.org/index.php/Co … mpty_posts


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#13 2018-08-31 23:36:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,042
Website

Re: [SOLVED] fontconfig: failed to write cache

Hendrikto wrote:
Trilby wrote:

DarthMucus, if it is indeed only failing on directories that do not contain any fonts, then it should be pretty much harmless

This does not seem to be the case though. For me it failed on

/usr/share/fonts/util

, which is not empty.

Edit: Also mentioned here https://bugs.archlinux.org/task/59889#comment172682

And that linked bug report post indicates that the directory does not contain any fonts.  Hence my point stands.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#14 2018-09-01 00:51:01

Ziusudra
Member
Registered: 2014-04-19
Posts: 119

Re: [SOLVED] fontconfig: failed to write cache

It's like Nicolai Dagestad (grandpa) says on the bug report - it's directories without a .uuid file. That also happens to be directories without fonts, except: /usr/share/fonts/encodings/large: failed to write cache

My /usr/share/fonts/encodings/ has encodings, a encodings.dir, a .uuid, no fonts - and there is no "failed to write cache" error.

My /usr/share/fonts/encodings/large/ has encodings, a encodings.dir, no .uuid, no fonts.

Last edited by Ziusudra (2018-09-01 01:14:14)

Offline

#15 2018-09-01 07:05:31

beta990
Member
Registered: 2011-07-10
Posts: 205

Re: [SOLVED] fontconfig: failed to write cache

Glad I'm not the only one, thanks for reporting it. smile

Offline

#16 2018-09-01 09:37:07

zed123
Member
Registered: 2018-01-26
Posts: 5

Re: [SOLVED] fontconfig: failed to write cache

My fonts are screwed in GNOME since the update yesterday and going back to another Btrfs snapshot doesn't change anything. I assume it's related to this issue and /var/cache/fontconfig since this is excluded from my snapshots. Does anyone else has the same issue?

Edit: One font in my GNOME theme was broken. Must be related to the fontconfig cache since it was ok yesterday...

Last edited by zed123 (2018-09-01 10:45:09)

Offline

#17 2018-09-01 13:32:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,042
Website

Re: [SOLVED] fontconfig: failed to write cache

zed123, do you get the above listed error for the directory that contains the font that is "broken"?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#18 2018-09-01 16:14:51

figue
Member
Registered: 2007-12-16
Posts: 49

Re: [SOLVED] fontconfig: failed to write cache

It seems that a workaround is:

sudo SOURCE_DATE_EPOCH=$(date +%s) fc-cache -rs

Offline

#19 2018-09-02 05:46:01

yan12125
Member
Registered: 2017-11-01
Posts: 12

Re: [SOLVED] fontconfig: failed to write cache

figue wrote:

It seems that a workaround is:

sudo SOURCE_DATE_EPOCH=$(date +%s) fc-cache -rs

As stated by Eli Schwartz at the bug report, this might not be a good workaround.

Offline

Board footer

Powered by FluxBB