xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Changes between Initial Version and Version 1 of Ticket #227

12/24/12 11:02:51 (8 years ago)
Antoine Martin


  • Ticket #227

    • Property Status changed from new to accepted
  • Ticket #227 – Description

    initial v1  
    11split from #147 (see also #226 for osx)
     3There are no official {{{(py)gtkglext}}} win32 builds available from gnome, trying various binary builds always leads to the same problem:
     5(python.exe:2224): GdkGLExt-WARNING **: cannot select DIB
     6(python.exe:2224): GdkGLExt-WARNING **: cannot create GdkGLPixmap
     8See ticket:147#comment:22
     9The problem is that all of those binary builds are well out of date - and completely undocumented. Not at all helpful for debugging things.
     15So we need to build from source, either:
     16* using [http://ingar.satgnu.net/devenv/mingw32/gtk.html mingw32] (alternative instructions in PDF attached to this ticket)
     17* cross-compiling using mingw32, this seems more popular - but a major hassle when straying outside the usual/expected dependencies (and we have a few)
     22'''ming32 native build'''
     23Unless otherwise stated, the configure step generally looks like this:
     25./configure --prefix=/mingw --build=mingw32
     27Often with {{{--disable-gtk-doc}}} added if possible.
     29* {{{zlib}}} can be built from source (with the caveat from the instructions above about {{{libz.dll.a}}} missing..)
     30* {{{pkg-config}}} and {{{glib}}} have a [http://www.mingw.org/wiki/Bootstrapping_GLIB_with_MinGW circular dependency] which means you are better off installing [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ binaries from gnome] (yuk)
     31* and then you might as well grab all of them from there: {{{cairo}}}, {{{freetype}}}, {{{expat}}}, {{{gettext}}}, {{{libxml2}}}, {{{fontconfig}}}, {{{pixman}}}, {{{cairo}}}
     32* as we will find out later on, there is no point in grabbing {{{libffi}}} (for building {{{glib}}}) since the binary archives are missing the pkg-config file... (and hacking one by hand is just asking for more trouble)
     33* then you want to grab: {{{gdk-pixbuf}}}, {{{atk}}}. We can use more [http://ftp.gnome.org/pub/gnome/binaries/win32/ gnome binaries] for this..
     34* then you need {{{gtk-doc}}} to build {{{gtkglext}}} and you cannot find an official one for win32 anywhere, and building from source obviously fails too - oh joy. And so the "recommended" way (judging from some mailing list posts) of dealing with this is to install a fake one - I'm not joking, see [http://git.gnome.org/browse/gtk-doc-stub/ gtk-doc-stub]. (again totally undocumented, even there)
     35* then you get an error telling you that {{{gtk}}} is not installed... sure it is. That's because {{{pango}}}'s pkg-config files aren't installed. So you must build {{{pango}}} from source to get them.
     36* but when you try to install {{{pango}}} from source, it complains that {{{glib}}} isn't the right version. And it isn't. That's because the binaries are well out of date. So now we have to build {{{glib}}} too, despite using binaries in the first steps.. (oh well, at least we have {{{pkg-config}}} installed now..)
     37* and to build {{{glib}}}, we need {{{libffi}}}, and as mentioned above, the binaries are incomplete, so we have to build that from source as well (see [https://mail.gnome.org/archives/vala-list/2012-September/msg00109.html How to compile glib using MingW under Windows]) - alternatively, we could use those magic environment variables to tell it where to find {{{libffi}}} - I didn't go down that route.
     38* and then glib complains about needing "{{{-march=i486}}}" or later, but how? Well, through {{{CFLAGS}}} of course (!):
     40export CFLAGS="-march=i686"
     41./configure --prefix=/mingw --build=mingw32 \
     42        --with-pcre=internal --with-threads=win32 --disable-gtk-doc
     44(which makes me think we should probably build everything with the same {{{CFLAGS}}}, oh well.. next time?)
     45* then the build proceeds.. for a while, until you get:
     47  GEN      gdbus-example-objectmanager-generated.h
     48/usr/bin/env: python2.5: No such file or directory
     49make[6]: *** [gdbus-example-objectmanager-generated.h] Error 127
     50make[6]: Leaving directory `/home/XP_Pro/glib-2.35.3/gio/tests/gdbus-object-mana
     53So it grabbed the wrong version of {{{Python}}} and not the one we have installed (how could it..), and since {{{Python}}} does not build on {{{MingW}}}, we have to point it to the version we want it to use (and hope for the best when it comes to mixing compilers...):
     55export PYTHON=C:\Python2.7\Python.exe
     56./configure (...)
     58* then we need cairo to build pango with the features we need, at least there is a [http://cairographics.org/end_to_end_build_for_win32/ build documentation page] available
     59* and cairo needs pixman and libpng.. (at this point you can be forgiven for thinking that this will never end)
     60* building cairo then fails with:
     62In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/
     64                 from cairo-missing.h:36,
     65                 from strndup.c:31:
     66c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/sys/types.h:118:18: no
     67te: previous declaration of 'ssize_t' was here
     68make[4]: *** [strndup.lo] Error 1
     70As per [http://comments.gmane.org/gmane.comp.lib.cairo/23255 this mailing list post] (which has a workaround)
     71* then we can build {{{pango}}}.
     72Note: ideally, we would like to have {{{librsvg}}} support, but this would also require building: {{{pangocairo}}} (a cycle!?), {{{gdk-pixbuf}}} and {{{libcroco}}}... meh.
     73* then we can finally try to build {{{gtkglext}}} with
     75./configure --prefix=/mingw --build=mingw32 \
     76        --disable-gtk-doc --with-gdktarget=win32
     78which then fails with:
     80font-pangoft2.c:14:28: fatal error: pango/pangoft2.h: No such file or directory
     81compilation terminated.
     82make[2]: *** [font_pangoft2-font-pangoft2.o] Error 1
     84Looks like we do need freetype after all, which must be built before cairo apparently..
     85* install freetype, rebuild cairo, rebuild pango, then try again
     86* it *should* now build (mostly)... but don't run the examples if you don't want your machine to crash.
     88Rant: why is this such a horrible mess?