[ekg2-devel] [PATCH] problem z kompilacją z gtk2-2.13+

Dominik 'Rathann' Mierzejewski dominik w greysector.net
Sob, 12 Lip 2008, 15:35:52 CEST


Witam.
Po upgrade gtk2 do 2.13.1 w Fedorze devel, ekg2 przestało się kompilować:

/bin/sh ../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -DDATADIR=\"/usr/share/ekg2\"  -fvisibility=hidden -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      -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -std=c99 -MT gtk_la-maingui.lo -MD -MP -MF .deps/gtk_la-maingui.Tpo -c -o gtk_la-maingui.lo `test -f 'maingui.c' || echo './'`maingui.c
 gcc -DHAVE_CONFIG_H -I. -I../.. -DDATADIR=\"/usr/share/ekg2\" -fvisibility=hidden -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 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -std=c99 -MT gtk_la-maingui.lo -MD -MP -MF .deps/gtk_la-maingui.Tpo -c maingui.c  -fPIC -DPIC -o .libs/gtk_la-maingui.o
maingui.c:233:2: warning: #warning "GTK issue."
maingui.c:310:2: warning: #warning "window_switch() XXX"
maingui.c:587:2: warning: #warning "mg_populate_userlist() hack, slowdown"
maingui.c:590:2: warning: #warning "xchat->ekg2, mg_populate_userlist() xchat here check if param is valid window_t, XXX"
maingui.c:749:2: warning: #warning "xchat->ekg2: mg_topdestroy_cb() BIG XXX"
maingui.c:803:2: warning: #warning "xchat->ekg2: mg_tab_close() XXX"
maingui.c:869:2: warning: #warning "Display question if user want to /save config"
maingui.c:877:2: warning: #warning "xchat->ekg2 XXX"
maingui.c:1002:2: warning: #warning "xchat->ekg2, removed support for generic tabs"
maingui.c:1012:2: warning: #warning "xchat->ekg2, removed support for generic tabs"
maingui.c:1419:2: warning: #warning "xchat->ekg2: mg_word_check() nice functionality XXX"
maingui.c:1428:2: warning: #warning "xchat->ekg2: mg_word_clicked() nice functionality XXX"
maingui.c:1499:2: warning: #warning "xchat->ekg2: g_signal_connect() \"drag_begin\", \"drag_drop\", \"drag_motion\", \"drag_end\", \"drag_data_received\" && gtk_drag_dest_set() do zaimplementowania"
maingui.c:1609:2: warning: #warning "xchat->ekg2: mg_sessionclick_cb() XXX, change session using this [like ^X] implement"
maingui.c:1816:2: warning: #warning "xchat->ekg2 mg_switch_tab_cb() mg_unpopulate()"
In file included from maingui.c:78:
xtext.h:243: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gtk_xtext_get_type'
maingui.c: In function 'mg_populate':
maingui.c:686: warning: implicit declaration of function 'gtk_xtext_get_type'
make[1]: *** [gtk_la-maingui.lo] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/ekg2-0.2-rc1/plugins/gtk'
make: *** [all] Error 2

Po dodaniu brakującego #define (który notabene istnieje w gtk/gtktypeutils.h,
ale pod #ifndef GTK_DISABLE_DEPRECATED) pojawia się następny błąd:

/bin/sh ../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -DDATADIR=\"/usr/share/ekg2\"  -fvisibility=hidden -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      -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -std=c99 -MT gtk_la-gtkutil.lo -MD -MP -MF .deps/gtk_la-gtkutil.Tpo -c -o gtk_la-gtkutil.lo `test -f 'gtkutil.c' || echo './'`gtkutil.c
 gcc -DHAVE_CONFIG_H -I. -I../.. -DDATADIR=\"/usr/share/ekg2\" -fvisibility=hidden -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 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -std=c99 -MT gtk_la-gtkutil.lo -MD -MP -MF .deps/gtk_la-gtkutil.Tpo -c gtkutil.c  -fPIC -DPIC -o .libs/gtk_la-gtkutil.o
In file included from /usr/include/gtk-2.0/gtk/gtk.h:222,
                 from /usr/include/gtk-2.0/gtk/gtksignal.h:33,
                 from /usr/include/gtk-2.0/gtk/gtkclist.h:35,
                 from gtkutil.c:30:
/usr/include/gtk-2.0/gtk/gtkctree.h:110: error: expected specifier-qualifier-list before 'GtkCList'
/usr/include/gtk-2.0/gtk/gtkctree.h:127: error: expected specifier-qualifier-list before 'GtkCListClass'
/usr/include/gtk-2.0/gtk/gtkctree.h:149: error: expected specifier-qualifier-list before 'GtkCListRow'
/usr/include/gtk-2.0/gtk/gtkctree.h:342: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gtk_ctree_node_get_cell_type'
gtkutil.c: In function 'gtkutil_button':
gtkutil.c:365: warning: comparison with string literal results in unspecified behavior
make[1]: *** [gtk_la-gtkutil.lo] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/ekg2-0.2-rc1/plugins/gtk'
make: *** [all] Error 2

... który z kolei można poprawić wyrzucając #include <gtk/gtkclist.h> z gtkutil.c.
Załączam łatkę, która robi powyższe rzeczy.

Pozdrawiam,
R.

-- 
Fedora http://fedoraproject.org/wiki/User:Rathann
Livna http://rpm.livna.org | MPlayer http://mplayerhq.hu
"Faith manages."
        -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
-------------- następna część ---------
diff -up ekg2-0.2-rc1/plugins/gtk/gtkutil.c.gtk ekg2-0.2-rc1/plugins/gtk/gtkutil.c
--- ekg2-0.2-rc1/plugins/gtk/gtkutil.c.gtk	2008-02-28 21:22:55.000000000 +0100
+++ ekg2-0.2-rc1/plugins/gtk/gtkutil.c	2008-07-12 14:57:55.000000000 +0200
@@ -26,7 +26,6 @@
 #include <fcntl.h>
 
 #include <gtk/gtkbutton.h>
-#include <gtk/gtkclist.h>
 #include <gtk/gtkscrolledwindow.h>
 #include <gtk/gtkmessagedialog.h>
 #include <gtk/gtkwindow.h>
diff -up ekg2-0.2-rc1/plugins/gtk/xtext.h.gtk ekg2-0.2-rc1/plugins/gtk/xtext.h
--- ekg2-0.2-rc1/plugins/gtk/xtext.h.gtk	2008-02-28 21:22:55.000000000 +0100
+++ ekg2-0.2-rc1/plugins/gtk/xtext.h	2008-07-12 14:51:49.000000000 +0200
@@ -29,6 +29,9 @@
 #define XTEXT_BG 35
 #define XTEXT_MARKER 36		/* for marker line */
 
+#ifdef GTK_DISABLE_DEPRECATED
+typedef GType            GtkType;
+#endif
 typedef struct _GtkXText GtkXText;
 typedef struct _GtkXTextClass GtkXTextClass;
 


Więcej informacji o liście dyskusyjnej ekg2-devel