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 581895 - pygoocanvas-0.14.0: goocanvasmodule.c:38: error: too few arguments to function 'Pycairo_CAPI->Pattern_FromPattern'
pygoocanvas-0.14.0: goocanvasmodule.c:38: error: too few arguments to functio...
Status: RESOLVED FIXED
Product: pygoocanvas
Classification: Deprecated
Component: general
0.14.x
Other Linux
: Normal normal
: ---
Assigned To: Gian Mario Tagliaretti
Gian Mario Tagliaretti
Depends on:
Blocks:
 
 
Reported: 2009-05-08 16:27 UTC by Jeff Kowalczyk
Modified: 2009-06-10 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jeff Kowalczyk 2009-05-08 16:27:07 UTC
Emerging pygoocanvas on Gentoo Linux ~x86 as dependency of pitivi. pygoocanvas Error per subject line.
Cairo and pycairo package versions and configuration as follows:
# emerge cairo pycairo -pv
[ebuild   R   ] x11-libs/cairo-1.8.6-r1  USE="X cleartype glitz opengl svg xcb -debug -directfb -doc" 0 kB
[ebuild   R   ] dev-python/pycairo-1.8.4  USE="-examples" 0 kB

Error detail:
libtool: compile:  i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/usr/include/python2.6 -I/usr/include/pygtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/goocanvas-1.0 -I/usr/include/gtk-2.0 -I/usr/include/cairo -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pycairo -O2 -march=i686 -pipe -Wall -std=c9x -fno-strict-aliasing -MT goocanvasmodule_la-goocanvasmodule.lo -MD -MP -MF .deps/goocanvasmodule_la-goocanvasmodule.Tpo -c goocanvasmodule.c  -fPIC -DPIC -o .libs/goocanvasmodule_la-goocanvasmodule.o
/usr/lib/python2.6/site-packages/gtk-2.0/codegen/definitions.py:42: DeprecationWarning: object.__init__() takes no parameters
  str.__init__(self, type_name)
goocanvasmodule.c: In function '_cairo_pattern_from_gvalue':
goocanvasmodule.c:38: error: too few arguments to function 'Pycairo_CAPI->Pattern_FromPattern'
make[2]: *** [goocanvasmodule_la-goocanvasmodule.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
Could not write virtual accessor method GooCanvasItem.get_child_property: No ArgType for GValue*
Could not write virtual accessor method GooCanvasItem.set_child_property: No ArgType for const-GValue*
Could not write virtual accessor method GooCanvasItem.get_items_at: No ArgType for GList*
Could not write virtual accessor method GooCanvasItem.child_notify: No ArgType for GParamSpec*
Could not write interface proxy GooCanvasItem.get_child_property: No ArgType for GValue*
Could not write interface proxy GooCanvasItem.set_child_property: No ArgType for const-GValue*
Could not write interface proxy GooCanvasItem.get_transform_for_child: No ArgType for cairo_matrix_t*
Could not write interface proxy GooCanvasItem.get_items_at: No ArgType for GList*
Could not write interface proxy GooCanvasItem.get_transform: No ArgType for cairo_matrix_t*
Could not write interface proxy GooCanvasItem.set_transform: No ArgType for cairo_matrix_t*
Could not write interface proxy GooCanvasItem.child_notify: No ArgType for GParamSpec*
Could not write virtual accessor method GooCanvasItemModel.get_child_property: No ArgType for GValue*
Could not write virtual accessor method GooCanvasItemModel.set_child_property: No ArgType for const-GValue*
Could not write virtual accessor method GooCanvasItemModel.child_notify: No ArgType for GParamSpec*
Could not write interface proxy GooCanvasItemModel.get_child_property: No ArgType for GValue*
Could not write interface proxy GooCanvasItemModel.set_child_property: No ArgType for const-GValue*
Could not write interface proxy GooCanvasItemModel.get_transform: No ArgType for cairo_matrix_t*
Could not write interface proxy GooCanvasItemModel.set_transform: No ArgType for cairo_matrix_t*
Could not write interface proxy GooCanvasItemModel.child_notify: No ArgType for GParamSpec*
Could not write function goo_canvas_parse_path_data: No ArgType for GArray*
Could not write function goo_canvas_create_path: No ArgType for GArray*
Warning: Constructor for GooCanvas needs to be updated to new API
         See http://live.gnome.org/PyGTK_2fWhatsNew28#update-constructors
***INFO*** The coverage of global functions is 66.67% (4/6)
***INFO*** The coverage of methods is 100.00% (134/134)
***INFO*** The coverage of virtual proxies is 100.00% (7/7)
***INFO*** The coverage of virtual accessors is 89.06% (57/64)
***INFO*** The coverage of interface proxies is 78.95% (45/57)
make[2]: Leaving directory `/var/tmp/portage/dev-python/pygoocanvas-0.14.0/work/pygoocanvas-0.14.0'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-python/pygoocanvas-0.14.0/work/pygoocanvas-0.14.0'
make: *** [all] Error 2
Comment 1 Gian Mario Tagliaretti 2009-05-08 19:25:03 UTC
(In reply to comment #0)

> goocanvasmodule.c: In function '_cairo_pattern_from_gvalue':
> goocanvasmodule.c:38: error: too few arguments to function
> 'Pycairo_CAPI->Pattern_FromPattern'

PyCairo broke the API fixing a bug that we spotted:
https://bugs.freedesktop.org/show_bug.cgi?id=18947

Comment 2 Edward Hervey 2009-05-08 19:40:21 UTC
great... pycairo modified their public API (pycairo/pycairo.h). It's no longer API/ABI compatible.

Several options :
* pycairo devs revert that and make a brown-paper-bag release (unlikely?)
* ... not much else

The problem is that, since it's not a standard versioned shared library (/usr/include/libXXX.so.1.8.4) ... we can't link against a specific version so that we can have code that detects against which version it's compiled and adjust the code.

 Oh, and it also causes segfaults if you update just pycairo to the latest version :)

Comment 3 Daniel Macks 2009-06-09 03:18:15 UTC
And now building pygoocanvas fails to build for me with an error of too *many* arguments! I'm trying pygoocanvas-0.14.1, which passes a second arg, and I have pycairo-1.8.2, which prototypes for a single arg. I guess the interface-break doesn't occur until after 1.8.2, so (assuming they intend to keep this new protoype), pygoo needs to configure-check for a pycairo version that has it. "Thanks pycairo!"
Comment 4 Gian Mario Tagliaretti 2009-06-10 17:15:07 UTC
It cannot be, this is the prototype in 1.8.2

PyObject *
PycairoPattern_FromPattern (cairo_pattern_t *pattern, PyObject *base)

same in 1.8.0

PyObject *
PycairoPattern_FromPattern (cairo_pattern_t *pattern, PyObject *base)

while in 1.6.4

PyObject *
PycairoPattern_FromPattern (cairo_pattern_t *pattern)

that's why I put 1.8.0 as minimum requirement

m4_define(pycairo_required_version, 1.8.0)

PKG_CHECK_MODULES(PYGOOCANVAS, [ dnl
                         pygtk-2.0 >= pygtk_required_version,
                         goocanvas >= goocanvas_required_version,
                         pycairo >= pycairo_required_version
                         ])

You are somehow configuring against a version > 1.8.0 but building on a different version
Comment 5 Daniel Macks 2009-06-10 17:46:33 UTC
Fink's pycairo-py26-1.8.2-1 installed my pycairo.h, which has:

    PyObject *(*Pattern_FromPattern)(cairo_pattern_t *pattern);

That prototype matches what's in http://cairographics.org/releases/pycairo-1.8.2.tar.gz with md5=bbfc0c2fef08dfb0c5b8baa5f0b67a87 and also in the 1.8.0 tarball.
Comment 6 Gian Mario Tagliaretti 2009-06-10 18:45:08 UTC
Daniel I'm very sorry you are right, he forgot to update the public prototype, I was looking at the .c file.

I will have to require 1.8.4 in pygoocanvas.

Thanks