Bug 22090

Summary: poppler glib breaks due to hardcoding G_DISABLE_SINGLE_INCLUDES
Product: poppler Reporter: Christian Persch (GNOME) <chpe>
Component: glib frontendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium CC: pierre42d
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Christian Persch (GNOME) 2009-06-04 11:54:27 UTC
poppler-glib depends on glib >= 2.6. configure always adds -DG_DISABLE_SINGLUE_INCLUDES to the CFLAGS used to compile poppler-glib. However, when compiling e.g. with glib 2.18 with gtk 2.12 (which is the combination that's used in maemo5 beta SDK), this breaks poppler-glib compilation due to the headers of this gtk version not being prepared for G_DISABLE_SINGLUE_INCLUDES while the glib version is:

In file included from /usr/include/gtk-2.0/gdk/gdkspawn.h:26,
                 from /usr/include/gtk-2.0/gdk/gdk.h:52,
                 from ../../../sources/poppler-0.11.0/glib/poppler-page.h:27,
                 from ../../../sources/poppler-0.11.0/glib/poppler.h:121,
                 from ../../../sources/poppler-0.11.0/glib/poppler-action.h:23,
                 from poppler-enums.c:9:
/usr/include/glib-2.0/glib/gspawn.h:22:2: error: #error "Only <glib.h> can be included directly."


The fix is to not add this define unless the glib version is >= 2.18 and the gtk+ version >= 2.14 (IIRC; someone should double-check this).
Comment 1 Tobias Mueller 2009-06-13 06:02:43 UTC
According to the releasenotes for poppler-0.11 this is fixed:

glib:
	 * Optional content support
	 * More work on Annotations support
	 * Improvements to the demo
	 * Documentation improvements
	 * Fix build when compiling with GTK_DISABLE_SINGLE_INCLUDES

Comment 2 Christian Persch (GNOME) 2009-06-13 06:31:49 UTC
No it isn't. This is a different issue, see comment 0.
Comment 3 Carlos Garcia Campos 2009-11-15 02:34:57 UTC
*** Bug 25064 has been marked as a duplicate of this bug. ***
Comment 4 Carlos Garcia Campos 2010-01-07 02:10:11 UTC
Fixed in git master now. 

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.