freetype2 include issue

2,174 views
Skip to first unread message

Gallaecio

unread,
Jun 13, 2010, 11:18:35 AM6/13/10
to Racer Development
I made a PKGBUILD for Arch Linux, which consist in a script which
automates the process of making a package for Arch Linux from sources.
It works for me, but for some reason someone is getting this error:

g++ -DHAVE_CONFIG_H -I. -I../.. -g3 -O0 -Wall -I/usr/include/SDL -
D_GNU_SOURCE=1 -D_REENTRANT -I../.. -g3 -O0 -Wall -I/usr/include/SDL
-
D_GNU_SOURCE=1 -D_REENTRANT -march=i686 -mtune=generic -O2 -pipe -
MT
libui_a-MenuItem.o -MD -MP -MF .deps/libui_a-MenuItem.Tpo -c -o
libui_a-
MenuItem.o `test -f 'MenuItem.cpp' || echo './'`MenuItem.cpp
In file included from /usr/include/FTGL/ftgl.h:32:0,
from BasicFonts.h:17,
from BasicFonts.cpp:11:
/usr/include/ft2build.h:56:38: fatal error: freetype/config/
ftheader.h: No such
file or directory
compilation terminated.

I've searched the web and it looks like it is because g++ need some
extra text in the call so it searches for includes in /usr/include/
freetype2. I don't really know, but I wonder if you are able to fix it
and, if so, if you can tell me how so I modify the PKGBUILD so it
applies the patch before making.

James Legg

unread,
Jun 13, 2010, 1:09:28 PM6/13/10
to race...@googlegroups.com
On Sun, 2010-06-13 at 08:18 -0700, Gallaecio wrote:
> I made a PKGBUILD for Arch Linux, which consist in a script which
> automates the process of making a package for Arch Linux from sources.

Thank you!

> It works for me, but for some reason someone is getting this error:
>
> g++ -DHAVE_CONFIG_H -I. -I../.. -g3 -O0 -Wall -I/usr/include/SDL -
> D_GNU_SOURCE=1 -D_REENTRANT -I../.. -g3 -O0 -Wall -I/usr/include/SDL
> -
> D_GNU_SOURCE=1 -D_REENTRANT -march=i686 -mtune=generic -O2 -pipe -
> MT
> libui_a-MenuItem.o -MD -MP -MF .deps/libui_a-MenuItem.Tpo -c -o
> libui_a-
> MenuItem.o `test -f 'MenuItem.cpp' || echo './'`MenuItem.cpp
> In file included from /usr/include/FTGL/ftgl.h:32:0,
> from BasicFonts.h:17,
> from BasicFonts.cpp:11:
> /usr/include/ft2build.h:56:38: fatal error: freetype/config/
> ftheader.h: No such
> file or directory
> compilation terminated.
>
> I've searched the web and it looks like it is because g++ need some
> extra text in the call so it searches for includes in /usr/include/
> freetype2. I don't really know, but I wonder if you are able to fix it
> and, if so, if you can tell me how so I modify the PKGBUILD so it
> applies the patch before making.

I use pkg-config to find what compiler arguments to use for freetype2
and some other libraries. On my system it gives the compiler flags for
the needed include paths. However the flags seem to be missing above.
Does this command:
pkg-config --cflags freetype2
return a line including "-I" followed by wherever
freetype/config/ftheader.h is located? It could
be /usr/include/freetype2
if /usr/include/freetype2/freetype/config/ftheader.h exists.

If so, then I know it is something racer does wrong rather than
freetype2 or FTGL. From the error above it looks like pkgconfig either
returns nothing or gets ignored by racer's build system.

You could force an include directory into the compiler arguments with
CPP_FLAGS=-I/usr/include/freetype2 ./configure
instead of
./configure
for example, but that is a bit of a hack.

-James

Adrián Chaves Fernández

unread,
Jun 13, 2010, 2:04:43 PM6/13/10
to race...@googlegroups.com
> I use pkg-config to find what compiler arguments to use for freetype2
> and some other libraries. On my system it gives the compiler flags for
> the needed include paths. However the flags seem to be missing above.
> Does this command:
> pkg-config --cflags freetype2
> return a line including "-I" followed by wherever
> freetype/config/ftheader.h is located? It could
> be /usr/include/freetype2
> if /usr/include/freetype2/freetype/config/ftheader.h exists.

He says:
pkg-config --cflags freetype2
-I/usr/include/freetype2

> If so, then I know it is something racer does wrong rather than
> freetype2 or FTGL. From the error above it looks like pkgconfig either
> returns nothing or gets ignored by racer's build system.

I guess it could be the second, but the thing is it still works for me.

> You could force an include directory into the compiler arguments with
> CPP_FLAGS=-I/usr/include/freetype2 ./configure
> instead of
> ./configure
> for example, but that is a bit of a hack.

Thanks, I'll do that then.

signature.asc

Gallaecio

unread,
Jun 17, 2010, 8:52:30 AM6/17/10
to Racer Development
Finally, it came out it was a missing build dependency: glproto (Arch
Linux packaging). I'll just add it to the PKGBUILD. Thanks for the
help, and for the great job you are doing.
Reply all
Reply to author
Forward
0 new messages