Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57783 - xfree with Freetype 2.1.9 causes GTK+ compilation failure
Summary: xfree with Freetype 2.1.9 causes GTK+ compilation failure
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
: 75703 114119 117896 (view as bug list)
Depends on:
Reported: 2004-07-20 15:32 UTC by Craig Bradney
Modified: 2006-01-09 16:51 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---

Possible fix (xfree-freetype-2.patch,377 bytes, patch)
2004-12-25 16:36 UTC, Andrew Bevitt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Bradney 2004-07-20 15:32:22 UTC
As a Scribus developer, I was happy to see FT 2.1.9 in portage, albeit masked. It compiles and runs perfectly. Scribus can now use Outline fonts again properly as this is one of the things finally fixed after it was broken in 2.1.4. KDE runs and looks fine. However, GTK apps look a bit ugly and I thought I would try rebuilding GTK+ 2.4.1. Results below...

Reproducible: Always
Steps to Reproduce:

Actual Results:  
-I../.. -I../../gdk -I../../gdk -DG_DI                          
-DG_DISABLE_CAST_CHECKS -pthread -I/usr/in                          
clude/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0
-I/usr/X11R6/include -I/usr/include/freetype2 -I                          
/usr/X11R6/include -march=pentium4 -O2 -pipe -fomit-frame-pointer -Wall -MT
gdkasync.lo -MD -MP -MF .deps/gdkasync.T                           po -c
gdkasync.c  -fPIC -DPIC -o .libs/gdkasync.o
In file included from /usr/X11R6/include/X11/Xft/Xft.h:35,
                 from ../../gdk/x11/gdkdrawable-x11.h:35,
                 from ../../gdk/x11/gdkwindow-x11.h:30,
                 from gdkprivate-x11.h:36,
                 from gdkx.h:78,
                 from gdkasync.c:49:
/usr/include/freetype2/freetype/freetype.h:20:2: #error "`ft2build.h' hasn't
been included yet!"
/usr/include/freetype2/freetype/freetype.h:21:2: #error "Please always use
macros to include FreeType header files."
/usr/include/freetype2/freetype/freetype.h:22:2: #error "Example:"
/usr/include/freetype2/freetype/freetype.h:23:2: #error "  #include <ft2build.h>"
/usr/include/freetype2/freetype/freetype.h:24:2: #error "  #include FT_FREETYPE_H"
make[4]: *** [gdkasync.lo] Error 1
make[4]: Leaving directory `/var/tmp/portage/gtk+-2.4.1/work/gtk+-2.4.1/gdk/x11'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/gtk+-2.4.1/work/gtk+-2.4.1/gdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/gtk+-2.4.1/work/gtk+-2.4.1/gdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gtk+-2.4.1/work/gtk+-2.4.1'
make: *** [all] Error 2

!!! ERROR: x11-libs/gtk+-2.4.1 failed.
!!! Function src_compile, Line 66, Exitcode 2
!!! (no error message)

Expected Results:  
I expected it to build.. but wasnt surprised. Perhaps GTK 2.4.4 is required but
right now I cant try it out. Anyway.. this is also a note to say FT 2.1.9 builds
perfectly. For now I have reverted to FT 2.1.5-r1.

Portage 2.0.50-r9 (default-x86-2004.0, gcc-3.3.3, glibc-,
System uname: 2.6.7-gentoo-r11 i686 Intel(R) Pentium(R) 4 CPU 2.66GHz
Gentoo Base System version 1.4.16
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
FEATURES="autoaddcvs ccache sandbox"
USE="X acpi alsa apache2 apm arts avi berkdb bonobo cdr crypt cups dvd encode
esd foomaticdb footmaticdb gd gdbm gif gphoto2 gpm gtk gtk2 gtkhtml guile imlib
java jpeg kde lcms libg++ libwww linguas_de linguas_en_GB linguas_fr mad mikmod
mmx motif mozilla moznocompose moznoirc moznomail mpeg mysql ncurses nls odbc
oggvorbis opengl oss pam pcmcia pdflib perl png ppds python qt quicktime radeon
readline samba sdl slang slp spell sse ssl svga tcltk tcpd tiff truetype usb x86
xml xml2 xmms xv zlib"
Comment 1 Craig Bradney 2004-07-21 10:30:38 UTC
AFAIK, 2.1.8+ have a different location for header files which is more than likely the reason for this issue, which is why I thought the newer GTK might have a chance of compilation. Maybe someone can try this.
Comment 2 foser (RETIRED) gentoo-dev 2004-08-03 06:57:51 UTC
i thought 2.4.1 already used the fixed include scheme (?) apparently it doesn't.

Should be easy to patch... someone has some spare time to diff it up ?
Comment 3 Patrik Kullman 2004-09-22 04:26:47 UTC
Works with Gtk+-2.4.9-r1 renamed to 2.4.10 and removal of the 2.4.9 security patch.

Didn't try with 2.4.9-r1, but should work?
Comment 4 Benoit Boissinot 2004-12-19 13:38:16 UTC
i think this should now be closed (i had no problem with x11-libs/gtk+-2.4.14 and media-libs/freetype-2.1.9)


Comment 5 Craig Bradney 2004-12-19 14:42:06 UTC
Quite possibly
Comment 6 Dominik Stadler (RETIRED) gentoo-dev 2004-12-20 14:10:22 UTC
For me it still fails with freetype-2.1.9 and gtk+-2.4.14, I  had gtk+-2.4.14 installed successfully before upgrading to freetype-2.1.9...

I get the exact same error as in the original comment in this Bug.
Comment 7 Dominik Stadler (RETIRED) gentoo-dev 2004-12-20 14:20:56 UTC
The offending file, /usr/X11R6/include/X11/Xft/Xft.h, seems to be not contained in gtk+, but rather in xfree. 

Maybe this only works with xorg-x11, but not with the older xfree?
Comment 8 Mike Gardiner (RETIRED) gentoo-dev 2004-12-21 00:10:27 UTC
I can't confirm this, gtk+-2.4.14 build fine for me with freetype-2.1.9.

centic, can you post something breaking and your emerge info? I suspect x11 related problems though...
Comment 9 foser (RETIRED) gentoo-dev 2004-12-21 05:50:00 UTC
gtk+-2.4.9 and up are confirmed using the correct include lines, so that doesn't make this a blocker for #49494 anymore.

I'm leaving this open because of centics report.
Comment 10 Dominik Stadler (RETIRED) gentoo-dev 2004-12-24 05:05:53 UTC
I am still having the error when emerging gtk+-2.4.14, the file that breaks is /usr/X11R6/include/X11/Xft/Xft.h, which is part of x11-base/xfree. 

The output during building is:
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_CAST_CHECKS -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/X11R6/include -march=pentium4 -O2 -pipe -fomit-frame-pointer -Wall -MT gdkasync.lo -MD -MP -MF .deps/gdkasync.Tpo -c gdkasync.c  -fPIC -DPIC -o .libs/gdkasync.o
In file included from /usr/X11R6/include/X11/Xft/Xft.h:35,
                 from ../../gdk/x11/gdkdrawable-x11.h:35,
                 from ../../gdk/x11/gdkwindow-x11.h:30,
                 from gdkprivate-x11.h:36,
                 from gdkx.h:78,
                 from gdkasync.c:49:
/usr/include/freetype2/freetype/freetype.h:20:2: #error "`ft2build.h' hasn't been included yet!"
/usr/include/freetype2/freetype/freetype.h:21:2: #error "Please always use macros to include FreeType header files."
/usr/include/freetype2/freetype/freetype.h:22:2: #error "Example:"
/usr/include/freetype2/freetype/freetype.h:23:2: #error "  #include <ft2build.h>"
/usr/include/freetype2/freetype/freetype.h:24:2: #error "  #include FT_FREETYPE_H"
make[4]: *** [gdkasync.lo] Error 1
make[4]: Leaving directory `/var/tmp/portage/gtk+-2.4.14/work/gtk+-2.4.14/gdk/x11'

emerge info:
Portage 2.0.51-r8 (gcc34-x86-2004.2, gcc-3.4.3, glibc-, 2.6.9-ck3 i686)
System uname: 2.6.9-ck3 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.3.4,dev-lang/python-2.2.3-r5 [2.3.4 (#1, Sep 28 2004, 22:57:25)]
dev-lang/python:     2.3.4, 2.2.3-r5
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r2, 1.4_p6, 1.9.3, 1.6.3, 1.7.9
sys-devel/libtool:   1.5.10-r2
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
FEATURES="autoaddcvs candy ccache cvs distlocks noauto noinfo sandbox strict userpriv"
USE="X aalib acpi acpi4linux alsa apache2 apm arts audiofile avi berkdb bitmap-fonts bluetooth caps cddb cdparanoia cdr clamav crypt cups curl dba dga divx4linux dvd encode esd exif f77 fftw flac foomaticdb foreign-package foreign-sysvinit fortran freetype gd gdbm gif gimp gimpprint gphoto2 gpm gtk gtk2 guile imagemagick imlib ipv6 jack java jpeg jpeg2k junit kde libg++ libwww lzw mad maildir mbox mikmod mmx mng monkey motif moznomail mpeg mpi mysql nas ncurses nls nocardbus nvidia oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline ruby samba scanner sdl session slang sox speex spell sqlite sse ssl svg svga tcltk tcpd tetex tiff truetype type1 usb videos wmf x86 xml xml2 xv zlib linguas_de"

I suspect that switching to xoxorg-x11 instead of xfree would solve that problem. I will try that in the next few days and report back.
Comment 11 Andrew Bevitt 2004-12-25 16:36:45 UTC
Created attachment 46887 [details, diff]
Possible fix

x11-base/xfree is being removed in roughly a week (ie ~ 1st jan 05)
This is definately an xfree only issue, it doesnt effect xorg-x11.

This patch, might (really it only looks at Xft.h), fix this compile problem,
but really I havent tested this or anything, it just looks right.

You'll need to apply it as root from / with :
patch -Np0 < /path/to/xfree-freetype-2.patch
Comment 12 foser (RETIRED) gentoo-dev 2004-12-28 06:51:31 UTC
I was under the impression most xfree already had this correct all along (?)
Comment 13 Donnie Berkholz (RETIRED) gentoo-dev 2004-12-28 11:33:12 UTC
The freetype in xfree is probably so old that it didn't have that issue. Anyhow, this is a WONTFIX as far as I'm concerned, since xfree is gone in 3-4 days. But it's nice to have that patch as a reference for anyone else still using xfree.
Comment 14 foser (RETIRED) gentoo-dev 2005-01-03 10:04:15 UTC
*** Bug 75703 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2005-12-01 02:25:21 UTC
*** Bug 114119 has been marked as a duplicate of this bug. ***
Comment 16 John N. Laliberte (RETIRED) gentoo-dev 2006-01-09 16:51:16 UTC
*** Bug 117896 has been marked as a duplicate of this bug. ***