! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
libexo-svn (trunk R21697) fails to compile the python bindings against pygtk-...
Status:
CLOSED: FIXED

Comments

Description Gergan Penkov 2006-05-16 09:00:36 CEST
the actual message is:
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -DHAVE_GNUC_VISIBILITY -DEXO_API_SUBJECT_TO_CHANGE -I.. -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/xfce4 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pygtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -fno-strict-aliasing -I/usr/include/python2.4 -march=athlon-xp -O2 -pipe -Wno-error -Wno-error -Wno-error -O0 -g3 -Werror -Wall -MT _exo_la-exomodule.lo -MD -MP -MF .deps/_exo_la-exomodule.Tpo -c exomodule.c  -fPIC -DPIC -o .libs/_exo_la-exomodule.o
exomodule.c:35: error: expected ')' before '->' token
exomodule.c:36: error: expected ')' before '->' token
exomodule.c:46: error: expected ')' before '->' token
exomodule.c:61: error: expected ')' before '->' token
make[4]: *** [_exo_la-exomodule.lo] Error 1
make[4]: Leaving directory `/var/tmp/portage/libexo-9999/work/libexo/python'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/libexo-9999/work/libexo/python'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/libexo-9999/work/libexo/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/libexo-9999/work/libexo'
make: *** [all] Error 2

now looking at the source around the lines 36-37 :
GtkTreePath *pygtk_tree_path_from_pyobject (PyObject    *object) G_GNUC_INTERNAL;
PyObject    *pygtk_tree_path_to_pyobject   (GtkTreePath *path) G_GNUC_INTERNAL;

extern PyMethodDef exo_functions[];


/* Unfortunately pygtk doesn't export the following functions,
 * that are required for the IconView, so we have to duplicate
 * them here.
 */
PyObject*
pygtk_tree_path_to_pyobject (GtkTreePath *path)
{
....

now from pygtk.h (2.9.0):
/* public functions */
#define pygdk_rectangle_from_pyobject (_PyGtk_API->rectangle_from_pyobject)
#define pygtk_tree_path_to_pyobject (_PyGtk_API->tree_path_to_pyobject)
#define pygtk_tree_path_from_pyobject (_PyGtk_API->tree_path_from_pyobject)

So I'll attach a patch (although I'm not sure how correct it is) to ifndef this parts of code to avoid the redefinition
Comment 1 Gergan Penkov 2006-05-16 09:02:10 CEST
Created attachment 551 
libexo-pygtk29.patch

well it works here, but I'm not that sure if it is fully correct
Comment 2 Benedikt Meurer editbugs 2006-05-16 15:10:15 CEST
Created attachment 552 
How about this one?

How about this patch? It simply checks whether the macros are already defined.
Comment 3 Gergan Penkov 2006-05-16 17:07:19 CEST
Works fine here, thanks.
Comment 4 Benedikt Meurer editbugs 2006-05-16 19:08:35 CEST
Committed with revision 21703.

2006-05-16	Benedikt Meurer <benny@xfce.org>

	* python/: Update python bindings to support compilation with PyGTK
	  2.9.0 and newer. Bug #1815.

Bug #1815

Reported by:
Gergan Penkov
Reported on: 2006-05-16
Last modified on: 2009-10-09

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Version:
0.3.1.7svn

Attachments

libexo-pygtk29.patch (2.46 KB, patch)
2006-05-16 09:02 CEST , Gergan Penkov
no flags
How about this one? (3.34 KB, patch)
2006-05-16 15:10 CEST , Benedikt Meurer
no flags

Additional information