[cairo] PyCairo - Crash on Windows build, in either zlib or PyCairo

CJ Kucera pez at apocalyptech.com
Mon Mar 23 08:31:04 PDT 2009


CJ Kucera wrote:
> It turns out that it's actually quite simple, so long as you don't waste
> a lot of time trying to get the autoconf stuff working in a MinGW
> environment, which is where I had spent most of my time.  The page that
> I found which was the most helpful:

And, what the hell, since I documented everything else - I had gotten
the autoconf/MinGW stuff working *almost* properly.  Getting file paths
to work properly was the biggest problem...  If you use backslashes (as
in usual Windows pathnames), you've got to be careful to escape them
properly ("C:\\Python26\\lib", etc), but even that tends to lead to
problems, so it's better to use forward slashes, which looks a bit odd
("C:/Python26/lib" for instance).  Then even once you do THAT, I had to
manually fix some stuff in the generated Makefiles.

I also had to specfiy CPPFLAGS="-IC:/Python26/include" while running
'configure' in order to get it to recognize that I had Python installed.

With PyCairo itself, I also had to update the Makefile to specify an
absolute path to libtool, because it was trying to execute "../libtool"
and apparently libtool requires being executed with an absolute path.

Anyway, once you do all of that and get it running, you can "make" and
"make install" without problems, but the only library which ends up
getting created is "_cairo.a", which does get installed into the proper
site-packages dir ("C:\Python26\lib\site-packages\cairo\_cairo.a"), but
it does *not* generate the "_cairo.pyd" file which Python needs to
actually load the cairo library.

It was while trying to the figure out how to get autoconf to generate
the .pyd that I had stumbled across the page I previously mentioned,
which turned out to be a lot simpler and more robust all around.

So yeah, there you go.  :)

-CJ

-- 
WOW: Flemmy            |   "Happiness isn't good enough for me!  I
pez at apocalyptech.com   |              demand euphoria!"
24.24.2.3171           |                  - Calvin


More information about the cairo mailing list