After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 348189 - Missing include and configure checks for cairo
Missing include and configure checks for cairo
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: general
2.15.x
Other Mac OS
: Normal normal
: ---
Assigned To: libwnck maintainers
libwnck maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-20 21:40 UTC by Daniel Macks
Modified: 2006-10-01 10:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Missing #include for cairo and missing configure checks for cairo and cairo-enabled gtk+ (999 bytes, patch)
2006-07-20 22:01 UTC, Daniel Macks
none Details | Review

Description Daniel Macks 2006-07-20 21:40:49 UTC
pager.c in libwnck-2.15.3 uses cairo and gdk_cairo symbols. There's no #include to declare the cairo ones, nor is there any ./configure check for presence of cairo and inclusion of its flags. There's also no ./configure check that gtk has cairo enabled. That means on my machine with cairo installed and with a gtk with cairo disabled, I successfully get through ./configure, and crash during compile:


 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/startup-notification-1.0 -I/sw/i
nclude/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include/pango-1.0 -I/usr/X11R6/
include -I/usr/X11R6/include/freetype2 -I/sw/include/gtk-2.0 -I/sw/include/atk-1
.0 -I/sw/lib/gtk-2.0/include -DG_LOG_DOMAIN=\"Wnck\" -I.. -DWNCK_I_KNOW_THIS_IS_
UNSTABLE -DWNCK_LOCALEDIR=\"/sw/share/locale\" -DSN_API_NOT_YET_FROZEN=1 -no-cpp
-precomp -I/sw/include -O3 -funroll-loops -fstrict-aliasing -Wall -MT pager.lo -
MD -MP -MF .deps/pager.Tpo -c pager.c  -fno-common -DPIC -o .libs/pager.o
pager.c: In function `draw_window':
pager.c:702: error: `cairo_t' undeclared (first use in this function)
pager.c:702: error: (Each undeclared identifier is reported only once
pager.c:702: error: for each function it appears in.)
pager.c:702: error: `cr' undeclared (first use in this function)
pager.c:712: warning: implicit declaration of function `gdk_cairo_create'
pager.c:713: warning: implicit declaration of function `cairo_rectangle'
pager.c:714: warning: implicit declaration of function `cairo_clip'
pager.c:720: warning: implicit declaration of function `cairo_set_source_rgba'
pager.c:728: warning: implicit declaration of function `cairo_fill'
pager.c:765: warning: implicit declaration of function `cairo_save'
pager.c:766: warning: implicit declaration of function `gdk_cairo_set_source_pix
buf'
pager.c:769: warning: implicit declaration of function `cairo_paint_with_alpha'
pager.c:770: warning: implicit declaration of function `cairo_restore'
pager.c:782: warning: implicit declaration of function `cairo_set_line_width'
pager.c:786: warning: implicit declaration of function `cairo_stroke'
pager.c:788: warning: implicit declaration of function `cairo_destroy'
pager.c: In function `wnck_pager_draw_workspace':
pager.c:937: error: `cairo_t' undeclared (first use in this function)
pager.c:937: error: `cr' undeclared (first use in this function)
pager.c:947: warning: implicit declaration of function `gdk_cairo_set_source_col
or'
pager.c:1014: warning: implicit declaration of function `cairo_set_source_rgb'
make[2]: *** [pager.lo] Error 1
Comment 1 Daniel Macks 2006-07-20 22:01:37 UTC
Created attachment 69286 [details] [review]
Missing #include for cairo and missing configure checks for cairo and cairo-enabled gtk+
Comment 2 Havoc Pennington 2006-07-21 01:20:17 UTC
Simply checking for gtk 2.8 should suffice no?

Also should be <cairo.h> not "cairo.h" (but doesn't gtk 2.8 include it anyhow?)
Comment 3 Daniel Macks 2006-07-21 02:23:36 UTC
I'm not really sure how the #include spaghetti in the gtk headers is arranged, as I'm still in a cairoless gtk-2.6 world:(

You're right, gtk 2.8 cannot be built without cairo support IIRC, so "gtk >= 2.8" is good enough to assure cairo. Probably left-over from before I realized just having cairo wasn't sufficient here.
Comment 4 Vincent Untz 2006-10-01 10:22:09 UTC
I've updated the gtk+ dep. Thanks!