GNOME Bugzilla – Bug 545410
Cannot build fontconfig-2.6.0 on Fedora 9
Last modified: 2008-08-24 16:37:14 UTC
Please describe the problem: I assume that I am probably doing something wrong. If I download fontconfig-2.6.0 and do "./configure", and "make" it builds. If I try to build if from jhbuild ("jhbuild build fontconfig") it fails. I diff'd the Makefile and I pasted below what I hope are the relevant parts. This is the error: In file included from ../fontconfig/fcfreetype.h:27, from fcftint.h:26, from fcfreetype.c:48: /usr/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory Makefile created by ./configure: FC_CACHEDIR = NONE/var/cache/fontconfig FC_DEFAULT_FONTS = /usr/share/fonts FC_FONTDATE = Mon Jul 28 12:41:17 EDT 2008 FC_FONTPATH = FFLAGS = -g -O2 FREETYPE_CFLAGS = -I/usr/include/freetype2 FREETYPE_LIBS = -lfreetype Makefile created by jhbuild: FC_CACHEDIR = /home/patrick/opt/gnome2/var/cache/fontconfig FC_DEFAULT_FONTS = /usr/share/fonts FC_FONTDATE = Mon Jul 28 12:44:04 EDT 2008 FC_FONTPATH = FFLAGS = -g -O2 FREETYPE_CFLAGS = -I/freetype2 -I FREETYPE_LIBS = -L -Wl,--rpath -Wl, -lfreetype .jhbuildrc: checkoutroot = os.path.expanduser('~/repo/gnome2') prefix = '/opt/gnome2' addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'lib', 'pkgconfig')) addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'share', 'pkgconfig')) os.environ['INSTALL'] = os.path.expanduser('~/bin/install-check') Steps to reproduce: 1. Install Fedora 9 2. Install jhbuild from svn 3. Use the config file above Actual results: fontconfig build fails Expected results: Does this happen every time? yes Other information:
[note I told you report this against fontconfig] configure will output a line about freetype-config, such as: checking for freetype-config... /usr/bin/freetype-config what is its content on your computer? What is the output of this command: (replace path with the one given above) /usr/bin/freetype-config --cflags What is the output of this command: jhbuild run freetype-config --cflags What is the output of this command: head -n 20 /usr/bin/freetype-config | tail (note the PKG_CONFIG_PATH lines in your jhbuildrc are not necessary)
configure outputed this line about freetype-config (same as yours): checking for freetype-config... /usr/bin/freetype-config [patrick@localhost gnome2]$ /usr/bin/freetype-config --cflags -I/usr/include/freetype2 [patrick@localhost gnome2]$ jhbuild run freetype-config --cflags -I/usr/include/freetype2 [patrick@localhost gnome2]$ head -n 20 /usr/bin/freetype-config | tail prefix=`pkg-config --variable prefix freetype2` exec_prefix=`pkg-config --variable exec_prefix freetype2` exec_prefix_set=no includedir=`pkg-config --variable includedir freetype2` libdir=`pkg-config --variable libdir freetype2` enable_shared=yes wl=-Wl, hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
Okay, so there is a Fedora patch (freetype-multilib.patch) that does: (...) -includedir=@includedir@ -libdir=@libdir@ +includedir=`pkg-config --variable includedir freetype2` +libdir=`pkg-config --variable libdir freetype2` (...) and the problem is certainly there; but I still cannot explain why "jhbuild run freetype-config --cflags" gives you that value, while the same command run in the fontconfig configure script doesn't. I'll try to setup such a build environment; could you locate a file called freetype2.pc and paste its content here?
/usr/lib64/pkgconfig/freetype2.pc: prefix=/usr exec_prefix=/usr libdir=/usr/lib64 includedir=/usr/include Name: FreeType 2 Description: A free, high-quality, and portable font engine. Version: 9.16.3 Requires: Libs: -L${libdir} -lfreetype Cflags: -I${includedir}/freetype2 -I${includedir}
Oh, you could add this to ~/.jhbuildrc; probably caused by the way Fedora does multilib support: addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'lib64', 'pkgconfig'))
That did it. fontconfig builds with that change.
I am closing this bug report as there is nothing obvious that jhbuild could do to workaround that fedora patch. I added the information to http://live.gnome.org/JhbuildIssues/fontconfig