« Return to Thread: cairo and pycairo 0.6.0cvs win32 builds

Re: cairo and pycairo 0.6.0cvs win32 builds

by Vittorio Palmisano :: Rate this Message:

Reply to Author | View in Thread

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steve Chaplin ha scritto:

> Why does setup.py need:
> +import sys
>         +if sys.platform == 'win32':
>         +    include_dirs += get_include('freetype2')
>         +    library_dirs += get_lib_dirs('freetype2')
>         +    libraries += get_libs('freetype2') + ['gdi32','msimg32']
>        
> These cairo lines should pick up the freetype dependency
>         +include_dirs = get_include('cairo')
>         +library_dirs = get_lib_dirs('cairo')
>         +libraries = get_libs('cairo')
>        
> If its a problem with the names 'freetype' and 'freetype2' not matching
> then cairo or freetype should be patched.

Yes, I think it is a problem of freetype lib installed with mingw.

> I don't understand these lines:
>          PyTypeObject PycairoContext_Type = {
>         +#if defined(WIN32) || defined(__CYGWIN__)
>         +    PyObject_HEAD_INIT(NULL)
>         +#else /* ! WIN32 */
>              PyObject_HEAD_INIT(&PyType_Type)
>         -    0,                                  /* ob_size */
>         +#endif
>
> The line "PyObject_HEAD_INIT(&PyType_Type)" is used in
> Python-2.4.1/Objects/listobject.c (and many other *.c files) so it looks
> like a standard Python statement, why does it need to be changed?
>
> gcc on Linux handles it OK. mingw uses gcc so I'd expect it to handle it
> just the same.

On win32 with gcc version 3.4.4 (mingw special) I get this error:

cairo/pycairo-pattern.c:250: error: initializer element is not constant
cairo/pycairo-pattern.c:250: error: (near initialization for
`PycairoPattern_Type.ob_type')
cairo/pycairo-pattern.c:281: error: initializer element is not constant
cairo/pycairo-pattern.c:281: error: (near initialization for
`PycairoPattern_Type.tp_base')
error: command 'gcc' failed with exit status 1

a similar problem is reported here:
<http://sourceforge.net/mailarchive/forum.php?forum_id=4026&max_rows=25&style=nested&viewmonth=200504>


- --
/Vittorio Palmisano/
Home Page: http://redclay.altervista.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC+zhtpT6bvDtyXOIRArsGAJ42ODoJCb6kJl1owcxAG6TjkWqPpACfcTb1
lR+3Tjr3oiY/lPCdwGKYKLE=
=vIYb
-----END PGP SIGNATURE-----

_______________________________________________
cairo mailing list
cairo@...
http://lists.freedesktop.org/mailman/listinfo/cairo

 « Return to Thread: cairo and pycairo 0.6.0cvs win32 builds