Bug 8157

Summary: fontconfig always runs fc-cache, even when destdir is set...
Product: fontconfig Reporter: Jim Gettys <jg>
Component: libraryAssignee: Keith Packard <keithp>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: 2.3   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 8100    
Attachments: jhbuildrc file for modular build I'm using.

Description Jim Gettys 2006-09-06 13:54:17 UTC
Causing the build to fail on install, causing jhbuild to get upset.
Comment 1 Keith Packard 2006-09-06 19:42:45 UTC
It does work correctly for me, the Makefile.am file contains the following coe:

if CROSS_COMPILING
  RUN_FC_CACHE_TEST=false
else
  RUN_FC_CACHE_TEST=test -z "$(DESTDIR)"
endif

...

install-data-local:
...
        @(if $(RUN_FC_CACHE_TEST); then \
            echo " fc-cache/fc-cache -s -f -v"; \
            fc-cache/fc-cache -s -f -v; \
        else \
            echo "***"; \
            echo "*** Warning: fonts.cache not built"; \
            echo "***"; \
            echo "*** Generate this file manually on host system using fc-cache"; \
            echo "***"; \
        fi)

So, if DESTDIR is set to any non-empty string, fc-cache should not be run at
make install time. Perhaps the jhbuild system is *also* running fc-cache for
some reason?
Comment 2 Jim Gettys 2006-09-07 05:20:50 UTC
Created attachment 6863 [details]
jhbuildrc file for modular build I'm using.
Comment 3 Jim Gettys 2006-09-07 05:21:36 UTC
if [ -f ./fonts.conf ]; then \
          echo " /home/jg/bin/install-check -m 644 ./fonts.conf
/home/jg/xorg/etc/fonts/fonts.conf"; \
          /home/jg/bin/install-check -m 644 ./fonts.conf
/home/jg/xorg/etc/fonts/fonts.conf; \
        else if [ -f fonts.conf ]; then \
          echo " /home/jg/bin/install-check -m 644 fonts.conf
/home/jg/xorg/etc/fonts/fonts.conf"; \
          /home/jg/bin/install-check -m 644 fonts.conf
/home/jg/xorg/etc/fonts/fonts.conf; \
        fi; fi
 /home/jg/bin/install-check -m 644 ./fonts.conf /home/jg/xorg/etc/fonts/fonts.conf
 fc-cache/fc-cache -s -f -v
/usr/share/fonts: caching, 0 fonts, 2 dirs
/usr/share/fonts: failed to write cache
/usr/share/fonts/truetype: caching, 0 fonts, 26 dirs
/usr/share/fonts/truetype: failed to write cache
/usr/share/fonts/truetype/Garuda: caching, 4 fonts, 0 dirs
/usr/share/fonts/truetype/Garuda: failed to write cache
/usr/share/fonts/truetype/arphic: caching, 6 fonts, 0 dirs
/usr/share/fonts/truetype/arphic: failed to write cache
/usr/share/fonts/truetype/baekmuk: caching, 4 fonts, 0 dirs
/usr/share/fonts/truetype/baekmuk: failed to write cache
/usr/share/fonts/truetype/freefont: caching, 12 fonts, 0 dirs
/usr/share/fonts/truetype/freefont: failed to write cache
/usr/share/fonts/truetype/hp: caching, 6 fonts, 0 dirs
/usr/share/fonts/truetype/hp: failed to write cache
/usr/share/fonts/truetype/kochi: caching, 4 fonts, 0 dirs
/usr/share/fonts/truetype/kochi: failed to write cache
/usr/share/fonts/truetype/msttcorefonts: caching, 60 fonts, 0 dirs
/usr/share/fonts/truetype/msttcorefonts: failed to write cache
/usr/share/fonts/truetype/openoffice: caching, 1 fonts, 0 dirs
/usr/share/fonts/truetype/openoffice: failed to write cache
/usr/share/fonts/truetype/thai: caching, 34 fonts, 0 dirs
/usr/share/fonts/truetype/thai: failed to write cache
/usr/share/fonts/truetype/thryomanes: caching, 4 fonts, 0 dirs
/usr/share/fonts/truetype/thryomanes: failed to write cache
/usr/share/fonts/truetype/ttf-arabeyes: caching, 39 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-arabeyes: failed to write cache
/usr/share/fonts/truetype/ttf-bengali-fonts: caching, 7 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-bengali-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-bitstream-vera: caching, 10 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-bitstream-vera: failed to write cache
/usr/share/fonts/truetype/ttf-dejavu: caching, 21 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-dejavu: failed to write cache
/usr/share/fonts/truetype/ttf-devanagari-fonts: caching, 5 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-devanagari-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-gentium: caching, 4 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-gentium: failed to write cache
/usr/share/fonts/truetype/ttf-gujarati-fonts: caching, 5 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-gujarati-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-indic-fonts: caching, 0 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-indic-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-kannada-fonts: caching, 8 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-kannada-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-lao: caching, 1 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-lao: failed to write cache
/usr/share/fonts/truetype/ttf-malayalam-fonts: caching, 1 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-malayalam-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-mgopen: caching, 16 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-mgopen: failed to write cache
/usr/share/fonts/truetype/ttf-oriya-fonts: caching, 1 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-oriya-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-punjabi-fonts: caching, 2 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-punjabi-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-tamil-fonts: caching, 9 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-tamil-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-telugu-fonts: caching, 2 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-telugu-fonts: failed to write cache
/usr/share/fonts/type1: caching, 0 fonts, 1 dirs
/usr/share/fonts/type1: failed to write cache
/usr/share/fonts/type1/gsfonts: caching, 35 fonts, 0 dirs
/usr/share/fonts/type1/gsfonts: failed to write cache
/usr/X11R6/lib/X11/fonts: caching, 0 fonts, 4 dirs
/usr/X11R6/lib/X11/fonts: failed to write cache
/usr/X11R6/lib/X11/fonts/100dpi: caching, 0 fonts, 0 dirs
/usr/X11R6/lib/X11/fonts/100dpi: failed to write cache
/usr/X11R6/lib/X11/fonts/75dpi: caching, 0 fonts, 0 dirs
/usr/X11R6/lib/X11/fonts/75dpi: failed to write cache
/usr/X11R6/lib/X11/fonts/Type1: caching, 0 fonts, 0 dirs
/usr/X11R6/lib/X11/fonts/Type1: failed to write cache
/usr/X11R6/lib/X11/fonts/misc: caching, 15 fonts, 0 dirs
/usr/X11R6/lib/X11/fonts/misc: failed to write cache
/var/cache/fontconfig: not cleaning unwritable cache directory
/home/jg/git/fontconfig/fc-cache/.libs/lt-fc-cache: failed
make[2]: *** [install-data-local] Error 35
make[2]: Leaving directory `/home/jg/git/fontconfig'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/jg/git/fontconfig'
make: *** [install-recursive] Error 1
*** error during stage install of fontconfig: Error running make   install *** [1/1]
Comment 4 Keith Packard 2006-09-07 10:38:40 UTC
Ah, you aren't setting DESTDIR, you're using --prefix. Big difference. DESTDIR
says 'build for directory a, but install in directory b/a', used for creating
binary packages and the like. --prefix says 'build for directory a'; when no
DESTDIR is set at install time, it will install to directory a.

The problem here was just that the cache directory wasn't getting created at
install time.

Fixed in 4c34c0c52a4e943c6770a6178e5012a3d6fe96d0

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.