[Pidgin] #3892: Syntax error before _X_SENTINEL

Pidgin trac at pidgin.im
Thu Nov 8 11:07:23 EST 2007


#3892: Syntax error before _X_SENTINEL
-------------------------------+--------------------------------------------
 Reporter:  andrixnet          |       Type:  patch
   Status:  new                |   Priority:  minor
Component:  plugins            |    Version:  2.2.2
 Keywords:  GTK+2 _X_SENTINEL  |    Pending:  0    
-------------------------------+--------------------------------------------
 '''REQUEST FOR PATCH'''

 Trying to compile Pidgin-2.2.0 (same with 2.1.0) on Slackware-11.0 I get
 repeated errors related to Xlib.h[[BR]]
 After some digging on the net, I found this on a forum from Zenwalk :
 [http://support.zenwalk.org/index.php?&topic=2134.msg11956]

 Following posts on that forum, I tried pasting this code in the pidgin
 source :

 {{{
 #if defined(__GNUC__) && (__GNUC__ >= 4)
 # define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
 # define _X_ATTRIBUTE_PRINTF(x,y)
 __attribute__((__format__(__printf__,x,y)))
 #else
 # define _X_SENTINEL(x)
 # define _X_ATTRIBUTE_PRINTF(x,y)
 #endif /* GNUC >= 4 */
 }}}

 It works. Though it's not a very elegant fix.

 Looking around GTK2 and X, I found the following :

 {{{
 A definition for _X_SENTINEL is in Xft/Xft.h however, this file doesn't
 seem to be included properly. Haven't tried to include this.

 One suggested fix was to add #include <X11/Xfuncproto.h> but it does not
 seem to work.

 I added the code above in the following places, just before # include
 <gdk/gdkx.h> :
 pidgin/pidgin.h
 pidging/eggtrayicon.h
 pidgin/plugins/gestures/strokedraw.c
 pidgin/gtksession.c

 }}}

 ----
 Is it a GTK bug or X bug?
 Anyway, I used this dirty fix so that I don't have to touch the system
 installed headers (so far they gave me no trouble).

 Finally, after these mods, compilation completed successfully, and pidgin
 works fine.

 Below is a snippet from the compilation error.

 ----

 {{{
 make[3]: Entering directory `/home/xxx/2/pidgin-2.2.2/pidgin'
 gcc -DHAVE_CONFIG_H -I. -I..  -DBR_PTHREADS=0 -DDATADIR=\"/usr/share\"
 -DLIBDIR=\"/usr/lib/pidgin/\" -DLOCALEDIR=\"/usr/share/locale\"
 -DSYSCONFDIR=\"/usr/etc\" -I../libpurple -I../libpurple/ -pthread
 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -Wall  -Waggregate-
 return -Wcast-align -Wdeclaration-after-statement -Wendif-labels -Werror-
 implicit-function-declaration -Wextra -Wno-sign-compare -Wno-unused-
 parameter -Winit-self -Wmissing-declarations -Wmissing-noreturn -Wmissing-
 prototypes -Wnested-externs -Wpointer-arith -Wundef -I/usr/include/gtk-2.0
 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/X11R6/include
 -I/usr/include/libpng12   -I/usr/include/dbus-1.0
 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0
 -I/usr/lib/glib-2.0/include    -I/usr/include/startup-notification-1.0
 -I/usr/include/libxml2   -DUSE_INTERNAL_LIBGADU   -g -g -O2 -MT
 eggtrayicon.o -MD -MP -MF .deps/eggtrayicon.Tpo -c -o eggtrayicon.o
 eggtrayicon.c
 In file included from /usr/include/gtk-2.0/gdk/gdkx.h:33,
                  from eggtrayicon.h:26,
                  from eggtrayicon.c:24:
 /usr/X11R6/include/X11/Xlib.h:3574: error: syntax error before
 "_X_SENTINEL"
 /usr/X11R6/include/X11/Xlib.h:3574: warning: type defaults to `int' in
 declaration of `_X_SENTINEL'
 /usr/X11R6/include/X11/Xlib.h:3574: warning: data definition has no type
 or storage class
 /usr/X11R6/include/X11/Xlib.h:3579: error: syntax error before
 "_X_SENTINEL"
 /usr/X11R6/include/X11/Xlib.h:3579: warning: type defaults to `int' in
 declaration of `_X_SENTINEL'
 /usr/X11R6/include/X11/Xlib.h:3579: warning: data definition has no type
 or storage class
 /usr/X11R6/include/X11/Xlib.h:3592: error: syntax error before
 "_X_SENTINEL"
 /usr/X11R6/include/X11/Xlib.h:3592: warning: type defaults to `int' in
 declaration of `_X_SENTINEL'
 /usr/X11R6/include/X11/Xlib.h:3592: warning: data definition has no type
 or storage class
 /usr/X11R6/include/X11/Xlib.h:3605: error: syntax error before
 "_X_SENTINEL"
 /usr/X11R6/include/X11/Xlib.h:3605: warning: type defaults to `int' in
 declaration of `_X_SENTINEL'
 /usr/X11R6/include/X11/Xlib.h:3605: warning: data definition has no type
 or storage class
 /usr/X11R6/include/X11/Xlib.h:3610: error: syntax error before
 "_X_SENTINEL"
 /usr/X11R6/include/X11/Xlib.h:3610: warning: type defaults to `int' in
 declaration of `_X_SENTINEL'
 /usr/X11R6/include/X11/Xlib.h:3610: warning: data definition has no type
 or storage class
 /usr/X11R6/include/X11/Xlib.h:3842: error: syntax error before
 "_X_SENTINEL"
 /usr/X11R6/include/X11/Xlib.h:3842: warning: type defaults to `int' in
 declaration of `_X_SENTINEL'
 /usr/X11R6/include/X11/Xlib.h:3842: warning: data definition has no type
 or storage class
 /usr/X11R6/include/X11/Xlib.h:3846: error: syntax error before
 "_X_SENTINEL"
 /usr/X11R6/include/X11/Xlib.h:3846: warning: type defaults to `int' in
 declaration of `_X_SENTINEL'
 /usr/X11R6/include/X11/Xlib.h:3846: warning: data definition has no type
 or storage class
 /usr/X11R6/include/X11/Xlib.h:3858: error: syntax error before
 "_X_SENTINEL"
 /usr/X11R6/include/X11/Xlib.h:3858: warning: type defaults to `int' in
 declaration of `_X_SENTINEL'
 /usr/X11R6/include/X11/Xlib.h:3858: warning: data definition has no type
 or storage class
 /usr/X11R6/include/X11/Xlib.h:3886: error: syntax error before
 "_X_SENTINEL"
 /usr/X11R6/include/X11/Xlib.h:3886: warning: type defaults to `int' in
 declaration of `_X_SENTINEL'
 /usr/X11R6/include/X11/Xlib.h:3886: warning: data definition has no type
 or storage class
 /usr/X11R6/include/X11/Xlib.h:3890: error: syntax error before
 "_X_SENTINEL"
 /usr/X11R6/include/X11/Xlib.h:3890: warning: type defaults to `int' in
 declaration of `_X_SENTINEL'
 /usr/X11R6/include/X11/Xlib.h:3890: warning: data definition has no type
 or storage class
 /usr/X11R6/include/X11/Xlib.h:3930: error: syntax error before
 "_X_SENTINEL"
 /usr/X11R6/include/X11/Xlib.h:3930: warning: type defaults to `int' in
 declaration of `_X_SENTINEL'
 /usr/X11R6/include/X11/Xlib.h:3930: warning: data definition has no type
 or storage class
 make[3]: *** [eggtrayicon.o] Error 1
 make[3]: Leaving directory `/home/xxx/2/pidgin-2.2.2/pidgin'
 make[2]: *** [all-recursive] Error 1
 make[2]: Leaving directory `/home/xxx/2/pidgin-2.2.2/pidgin'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/home/xxx/2/pidgin-2.2.2'
 make: *** [all] Error 2

 }}}

 Package versions :

 X11-6.9.0
 gtk+2-2.10.13

-- 
Ticket URL: <http://developer.pidgin.im/ticket/3892>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list