After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 545410 - Cannot build fontconfig-2.6.0 on Fedora 9
Cannot build fontconfig-2.6.0 on Fedora 9
Product: jhbuild
Classification: Infrastructure
Component: general
Other All
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Reported: 2008-07-30 00:23 UTC by Patrick Hallinan
Modified: 2008-08-24 16:37 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Patrick Hallinan 2008-07-30 00:23:40 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
    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
    FFLAGS = -g -O2
    FREETYPE_CFLAGS = -I/freetype2 -I
    FREETYPE_LIBS = -L -Wl,--rpath -Wl, -lfreetype

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?

Other information:
Comment 1 Frederic Peters 2008-07-30 07:32:30 UTC
[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)
Comment 2 Patrick Hallinan 2008-07-30 12:38:11 UTC
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

[patrick@localhost gnome2]$ jhbuild run freetype-config --cflags

[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`
includedir=`pkg-config --variable includedir freetype2`
libdir=`pkg-config --variable libdir freetype2`
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'

Comment 3 Frederic Peters 2008-07-30 13:04:18 UTC
Okay, so there is a Fedora patch (freetype-multilib.patch) that does:

  +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?
Comment 4 Patrick Hallinan 2008-07-30 13:12:02 UTC

Name: FreeType 2
Description: A free, high-quality, and portable font engine.
Version: 9.16.3
Libs: -L${libdir} -lfreetype  
Cflags: -I${includedir}/freetype2 -I${includedir}
Comment 5 Frederic Peters 2008-07-30 13:17:46 UTC
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'))
Comment 6 Patrick Hallinan 2008-07-30 13:25:29 UTC
That did it.  fontconfig builds with that change.
Comment 7 Frederic Peters 2008-08-24 16:37:14 UTC
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