When attempting to emerge app-text/poppler-0.3.1, I encountered the following error message: /usr/include/ft2build.h:56:38: freetype/config/ftheader.h: No such file or directory I noticed that poppler-0.4.1 was released and it fixes: - Fix and simplify glib rotation API. - Fix build issue with freetype flags. http://poppler.freedesktop.org/ I was hoping that the 0.4.1 version would fix my problem. Reproducible: Always Steps to Reproduce: 1. emerge poppler-0.3.1 2. 3. Actual Results: I encounterd the following error: In file included from /usr/include/cairo/cairo-ft.h:47, from CairoFontEngine.h:15, from CairoFontEngine.cc:14: /usr/include/ft2build.h:56:38: freetype/config/ftheader.h: No such file or directory In file included from CairoFontEngine.h:15, from CairoFontEngine.cc:14: /usr/include/cairo/cairo-ft.h:48:10: #include expects "FILENAME" or <FILENAME> In file included from CairoFontEngine.h:15, from CairoFontEngine.cc:14: /usr/include/cairo/cairo-ft.h:60: error: `FT_Face' was not declared in this scope /usr/include/cairo/cairo-ft.h:61: error: expected primary-expression before "int" /usr/include/cairo/cairo-ft.h:61: error: initializer expression list treated as compound expression /usr/include/cairo/cairo-ft.h:63: error: `FT_Face' does not name a type In file included from CairoFontEngine.cc:14: CairoFontEngine.h:21: error: `FT_Library' has not been declared CairoFontEngine.h:21: error: ISO C++ forbids declaration of `lib' with no type CairoFontEngine.h:32: error: `FT_Face' does not name a type CairoFontEngine.h:51: error: expected `)' before "libA" CairoFontEngine.h:58: error: `FT_Library' does not name a type CairoFontEngine.cc:70: error: `FT_Library' has not been declared CairoFontEngine.cc:70: error: ISO C++ forbids declaration of `lib' with no type CairoFontEngine.cc: In constructor `CairoFont::CairoFont(GfxFont*, XRef*, int)': CairoFontEngine.cc:166: error: `face' undeclared (first use this function) CairoFontEngine.cc:166: error: (Each undeclared identifier is reported only once for each function it appears in.) CairoFontEngine.cc:166: error: `FT_New_Face' undeclared (first use this function) CairoFontEngine.cc:178: error: `FT_Get_Name_Index' undeclared (first use this function) CairoFontEngine.cc:252: error: `FT_LOAD_NO_HINTING' undeclared (first use this function) CairoFontEngine.cc:253: error: `FT_LOAD_NO_BITMAP' undeclared (first use this function) CairoFontEngine.cc:253: error: `cairo_ft_font_face_create_for_ft_face' cannot be used as a function CairoFontEngine.cc: In destructor `CairoFont::~CairoFont()': CairoFontEngine.cc:272: error: `face' undeclared (first use this function) CairoFontEngine.cc:272: error: `FT_Done_Face' undeclared (first use this function) CairoFontEngine.cc: In member function `long unsigned int CairoFont:: getGlyph(CharCode, Unicode*, int)': CairoFontEngine.cc:288: error: `FT_UInt' undeclared (first use this function) CairoFontEngine.cc:288: error: expected `;' before "gid" CairoFontEngine.cc:290: warning: comparison between signed and unsigned integer expressions CairoFontEngine.cc:291: error: `gid' undeclared (first use this function) CairoFontEngine.cc:291: error: expected `;' before "codeToGID" CairoFontEngine.cc:293: error: expected `;' before "code" CairoFontEngine.cc: At global scope: CairoFontEngine.cc:335: error: expected `)' before "libA" CairoFontEngine.cc:335: error: expected `,' or `;' before "libA" CairoFontEngine.cc: In member function `CairoFont* CairoFontEngine:: getFont(GfxFont*, XRef*)': CairoFontEngine.cc:379: error: `lib' undeclared (first use this function) make[3]: *** [CairoFontEngine.lo] Error 1 Expected Results: app-text/poppler should have emerged without a problem. wildstar poppler # emerge info Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1, 2.6. 12-gentoo-r9 i686) ================================================================= System uname: 2.6.12-gentoo-r9 i686 Intel(R) Pentium(R) 4 Mobile CPU 2.00GHz Gentoo Base System version 1.12.0_pre6 dev-lang/python: 2.2.3-r5, 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=pentium4m -mfpmath=sse,387 -mmmx -msse -msse2 -maccumulate- outgoing-args -minline-all-stringops -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /opt/openjms/config /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.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/ share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config / var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium4m -mfpmath=sse,387 -mmmx -msse -msse2 -maccumulate- outgoing-args -minline-all-stringops -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig buildpkg ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://gentoo.mirrors.pair.com/ http://www.gtlib.cc.gatech.edu/ pub/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.mirrors.pair. com/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/overlays/bmg-main /usr/local/overlays/bmg-gnome- current /usr/local/overlays/derek" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aalib adns alsa apm arts avi berkdb bitmap-fonts bonobo cdr crypt cups curl directfb dvd eds emboss encode esd fam flac foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imagemagick imlib ipv6 jack java jpeg junit ldap libg++ libwww mad mikmod motif mozilla mp3 mpeg mysql nas ncurses nls ogg oggvorbis opengl oss pam pdflib perl png postgres python quicktime readline samba scanner sdl slang spell sqlite ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts usb vorbis xine xml xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
I noticed that ft2build.h contains the following line: #include <freetype/config/ftheader.h> And on my system, /usr/include/freetype doesn't exist. I do have /usr/include/ freetype2/freetype which does indeed include a config/ftheader.h file. I "fixed" my problem by issuing the following command ln -s /usr/include/freetype2/freetype /usr/include/freetype After doing this, I was able to emerge app-text/poppler.
Created attachment 67037 [details] poppler-0.4.1.ebuild Updated ebuild for version 0.4.1 of poppler which was released on 08/24.
Created attachment 67038 [details] Output of Failed Attempt to emerge poppler-0.4.1
Now according to something I was reading when I was researching this problem: http://www.intevation.de/rt/webrt?serial_num=914&display=History > Your code looks for ft2build.h (which I think is in libfreetype6-dev.deb) > and installs into /usr/include. That file looks to: > #include <freetype/config/ftheader.h> > and there is a note saying that "/usr/local/include/freetype2" must be > in include path. On Debian, that should be changed to /usr/include/freetype2. > Anyway, the 2 absolute paths in question are: > /usr/include/ft2build.h > /usr/include/freetype2/freetype/config/ftheader.h > I can't find anyway to get configure to find both files, it dies on > one or the other. This is a bug in the Debian package; ft2build.h installs into the wrong place relative to the other freetype headers. Move ft2build.h to /usr/include/freetype2, then use: ./configure --with-freetype-includes=/usr/include/freetype2
Looks like this may have been identified upstream as well: https://bugs.freedesktop.org/show_bug.cgi?id=4272 For me, moving ft2build.h to the /usr/include/freetype2 directory did NOT resolve the problem - poppler still would not compile.
This doesn't seem to be a bug with poppler itself, just with the GTK test program included with it. I just added "--disable-gtk-test" to the configure arguments (myconf) and it installed fine. Evince builds against it and works perfectly.
Actually, I just realized the fix I posted won't solve the original reported problem (I never had the CairoFontEngine.cc problem), but combined with the freetype symlink it might do the trick.
These problems should be fixed by the patch included with poppler-0.4.1. The freetype2 include path needed to be in the include path for the build. Fixed in CVS.