Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#192 ftheader.h not found

v1.0_(example)
closed-fixed
nobody
None
5
2015-01-12
2014-06-12
hk298
No

I'm trying to recompile xfe 1.37. If I build libfox (1.6.50) with "--with-xft=no" then I find the fonts in xfe unbearably ugly. If I build fox with "--with-xft=yes" or use a stock libfox from my distro (1.6.49), then xfe's configure script complains about not finding ftheader.h. It's looking for it in "freetype/config". My system (Mint 17 (Ubuntu 14.04)) has this header file in "freetype2/config". After creating a symbolic link I was able to compile again, but maybe someone could look into a better fix.

Discussion

  • J G Miller
    J G Miller
    2014-06-23

    I am also affected by this bug on Linux Mint 17 and it is probably present on all Debian derivatives because the freetype headers are in freetype2 not freetype.

    The configure script does succesfully find freetype-config and gets the correct CFLAGS and LDFLAGS

    configure:14949: found /usr/bin/freetype-config
    configure:14960: result: freetype-config
    configure:14977: checking freetype/config/ftheader.h usability
    configure:14977: g++ -c  -I/usr/local/X11R6/include/fox-1.6 -I/usr/include/freetype2 -I/usr/local/include -I/usr/local/X11R6/include conftest.cpp >&5
    conftest.cpp:198:38: fatal error: freetype/config/ftheader.h: No such file or directory
    #include <freetype/config/ftheader.h>
    

    All that is needed to fix this problem is for the erroneous path element freetype to be dropped from the header line check and ftheader.h will be found thanks to the CFLAG include
    -I/usr/include/freetype2

    So the cure for the problem is to change, in confifgure.ac, the line from

    AC_CHECK_HEADER(freetype/config/ftheader.h,,AC_MSG_ERROR("ftheader.h not found"))
    

    to

    AC_CHECK_HEADER(config/ftheader.h,,AC_MSG_ERROR("ftheader.h not found"))
    

    and then run autogen.sh to recreate configure and then re-run configure (possibly needing to remove the subdirectory autom4te.cache or you will see no difference).

    Creating a hack symlink /usr/include/freetype2 to /usr/include/freetype should NEVER be necessary.

    Thankfully it looks like non of the source code has "freetype/" hardcoded in on an #include line.

     
    Last edit: J G Miller 2014-06-23
  • J G Miller
    J G Miller
    2014-06-28

    I wrote in the message above:

    "it is probably present on all Debian derivatives because the freetype headers are in freetype2 not freetype."

    This is INCORRECT (just plain wrong in fact).

    Further investigation reveals that on

    Debian 7 with

    Package: libfreetype6-dev
    Maintainer: Steve Langasek vorlon@debian.org
    Source: freetype
    Version: 2.4.9-1.1

    and on Linux Mint 16 (derived from Ubuntu 13.10) with

    Package: libfreetype6-dev
    Origin: Ubuntu
    Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
    Source: freetype
    Version: 2.4.12-0ubuntu1.1

    the header files are under /usr/include/freetype2/freetype

    But on the newer Linux Mint 17 (derived from Ubuntu 14.04) which has

    Package: libfreetype6-dev
    Origin: Ubuntu
    Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
    Source: freetype
    Version: 2.5.2-1ubuntu2.2

    the header files are directly under /usr/include/freetype2 and there is no freetype sub-directory.

    I do not know why the change was made nor why they packager did not include a courtesy link freetype -> . in the freetype2 directory to avoid this problem until other software code has had sufficient time to adapt to the change for using the headers directly under

    /usr/include/freetype2

    rather than

    /usr/include/freetype2/freetype

     
    Last edit: J G Miller 2014-06-28
  • None
    None
    2014-12-27

    Gentoo:

    • Package: x11-misc/xfe-1.34

    Configuring source in /var/tmp/portage/x11-misc/xfe-1.34/work/xfe-1.34 ...
    * econf: updating xfe-1.34/config.sub with /usr/share/gnuconfig/config.sub
    * econf: updating xfe-1.34/config.guess with /usr/share/gnuconfig/config.guess
    ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --libdir=/usr/lib64 --enable-minimalflags --enable-nls --enable-sn --disable-debug
    [...]
    checking for fxfindfox in -lFOX-1.6... yes
    checking for ANSI C header files... (cached) yes
    checking how to run the C++ preprocessor... x86_64-pc-linux-gnu-g++ -E
    checking fox-1.6/fx.h usability... yes
    checking fox-1.6/fx.h presence... yes
    checking for fox-1.6/fx.h... yes
    checking for fox-config-1.6... no
    checking for fox-1.6-config... fox-1.6-config
    checking whether FOX was compiled with Xft support... yes
    checking for freetype-config... freetype-config
    checking freetype/config/ftheader.h usability... no
    checking freetype/config/ftheader.h presence... no
    checking for freetype/config/ftheader.h... no
    configure: error: "ftheader.h not found"

    locate ftheader.h
    /usr/include/freetype2/config/ftheader.h

     
  • Roland Baudin
    Roland Baudin
    2015-01-12

    This is fixed in Xfe 1.40.
    Thanks for the bug report.
    RB

     
  • Roland Baudin
    Roland Baudin
    2015-01-12

    • status: open --> closed-fixed