Created attachment 51661 [details] patch to add freetype include paths for utils I encountered an issue building the utils: g++-4.5 -DHAVE_CONFIG_H -I. -I.. -I../poppler -I.. -I../goo -I../utils -I../poppler -I/usr/corp/pkgs/fontconfig/2.7.3-64/include -I/usr/corp/pkgs/cairo/1.10.0/include/cairo -I/usr/corp/pkgs/X11/R7.5-64/include -I/usr/corp/pkgs/glib/2.24.2/include -I/usr/corp/pkgs/gtk+/2.20.1/include -I/usr/corp/pkgs/pango/1.28.1/include -I/usr/corp/pkgs/cairo/1.10.0/include -I/usr/corp/pkgs/pixman/0.19.2/include -I/usr/corp/pkgs/libpng/1.2.40-64/include -I/usr/corp/pkgs/jpeg/6b-64/include -I/usr/corp/pkgs/atk/1.30.0/include -I/usr/corp/pkgs/freetype/2.3.7-64/include -I/usr/corp/pkgs/fontconfig/2.7.3-64/include -I/usr/corp/pkgs/zlib/1.2.x-64/include -I/usr/corp/pkgs/libiconv/1.13.1-64/include -I/usr/corp/pkgs/libexpat/2.0.1-64/include -I/usr/corp/pkgs/libxml2/2.7.6-64/include -I/usr/corp/pkgs/libqt/4.4.3/include -I/usr/corp/pkgs/lcms/1.19-64/include -I/usr/corp/pkgs/krb5/1.8.3/include -I/usr/corp/pkgs/openssl/0.9.8o/include -Wall -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common -O3 -march=x86-64 -Wall -ansi -MT pdftocairo.o -MD -MP -MF .deps/pdftocairo.Tpo -c -o pdftocairo.o pdftocairo.cc In file included from /usr/corp/pkgs/cairo/1.10.0/include/cairo/cairo-ft.h:46:0, from ../poppler/CairoOutputDev.h:38, from pdftocairo.cc:51: /usr/corp/pkgs/freetype/2.3.7-64/include/ft2build.h:56:38: fatal error: freetype/config/ftheader.h: No such file or directory The command line doesn't have the usual stuff from freetype's pkgconfig, which would be in $(FREETYPE_CFLAGS). Therefore the freetype dependency can't be resolved when building pdftocairo. (It appears the other utils don't depend on freetype.) I'm attaching a patch which works for me. I hope I analyzed the issue correctly. :-)
This is wrong, it is not us but cairo that uses freetype and thus the freetype include should come from pkg-config --cflags cairo as it does on my system -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 If it does not on yours, please close this bug as it is a local problem in your system. If your pkg-config for cairo contains freetype includes but the linking of pdftocairo does not, then say so as it would seem a bug somewhere in our building chain
Created attachment 51712 [details] [review] Include cairo dependecies in CAIRO_LIBS The problem is we should be including cairo-ft in the pkg-config test. Since the cairo backends are optional their library dependencies are not included in cairo.pc. eg $ pkg-config --libs cairo -lcairo $ pkg-config --libs cairo-ft -L/usr/lib/x86_64-linux-gnu -lcairo -lfreetype The attached patch includes cairo-ft in the PKG_CONFIG_MODULES check since the cairo freetype backend is required. It also checks for the optional cairo backends (ps/pdf/svg) and if found includes their dependencies CAIRO_LIBS.
Created attachment 51715 [details] [review] Include cairo freetype depencies in CAIRO_LIBS Updated patch to ensure the main library does not link to dependencies only used by pdftocairo.
I'm a bit confused by you saying "The command line doesn't have the usual stuff from freetype's pkgconfig" and then seeing that "-I/usr/corp/pkgs/freetype/2.3.7-64/include" is there. What other line should be there? i.e. in which folder does "freetype/config/ftheader.h" live in? Also, out of curiosity what kind of system is that?
Probably your distro patches pkg-config, see http://lists.freedesktop.org/archives/pkg-config/2009-February/000410.html and the answer.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.