[cairo] building cairo with mingw
Maarten Bosmans
mkbosmans at gmail.com
Wed May 2 02:37:52 PDT 2012
2012/5/2 Cosmin Apreutesei <cosmin.apreutesei at gmail.com>:
> Hi,
> Anyone has a howto on building cairo with mingw32 ?
>
> Here's where I'm at:
>
> 1. installed mingw and msys (on winxp32)
Generally speaking, it's much easier to cross-compile from Linux using mingw32.
But as you seem to already have set it up under windows, this point is moot.
> 2. opened up a msys console
> 3. basic setup:
>
> export LIBRARY_PATH=/usr/local/lib
> export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
> export CFLAGS="-L/usr/local/lib -I/usr/local/lib"
For any pointers on which settings to use, you can look at the spec
files used by the windows:mingw project on the OpenSUSE Build Service.
https://build.opensuse.org/package/files?package=mingw32-cairo&project=windows%3Amingw%3Awin32
(packages for zlib and pixman can also be found there)
I just uploaded the latest cairo 1.12.2
> 4. downloaded latest zlib, pixman and cairo sources
>
> 5. built zlib (the ./configure script doesn't work anymore tells me to
> run the makefile directly):
>
> cd zlib
> make -f win32/Makefile.gcc
> INCLUDE_PATH=/usr/local/include LIBRARY_PATH=/usr/local/lib
> BINARY_PATH=/usr/local/bin make -f win32/Makefile.gcc install
>
> 6. built pixman:
>
> set -e
> cd pixman/pixman
> ./configure
> make
> make install
>
> Now pkg-config --list-all sees zlib and pixman.
>
> 6. tried to build cairo (minimalistic since I can't make it see zlib**):
> ** although I can see in /usr/local the files lib/libz.a,
> include/{zlib,zconf}.h and bin/zlib1.dll, configure says there's no
> zlib.h
>
> ./configure --disable-svg --disable-png --disable-ps --disable-pdf
> --disable-fc --disable-ft --disable-script --disable-interpreter
>
> Here's where I'm stuck:
>
> make[4]: Entering directory
> `/x/work.lua-gui-builder/luacairo-build/build/cairo/util/cairo-missing'
> CC strndup.lo
> In file included from strndup.c:31:0:
> cairo-missing.h:45:17: error: conflicting types for 'ssize_t'
> c:\mingw\bin\../lib/gcc/mingw32/4.6.1/../../../../include/sys/types.h:118:18:
> note: previous declaration of 'ssize_t' was here
> make[4]: *** [strndup.lo] Error 1
> make[4]: Leaving directory
> `/x/work.lua-gui-builder/luacairo-build/build/cairo/util/cairo-missing'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory
> `/x/work.lua-gui-builder/luacairo-build/build/cairo/util'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory
> `/x/work.lua-gui-builder/luacairo-build/build/cairo/util'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/x/work.lua-gui-builder/luacairo-build/build/cairo'
> make: *** [all] Error 2
Try using the latest cairo release, where this is already fixed.
> Any ideas?
> Thanks,
> Cosmin.
Maarten
More information about the cairo
mailing list