MinGW (Windows) cross-compilation of dbus/windbus

Richard W.M. Jones rjones at redhat.com
Mon Nov 3 08:46:31 PST 2008

[I'm cross-posting this to the dbus & windbus mailing lists because
I'm not sure what the status of dbus/windbus integration is at the

Fedora are currently sponsoring a project to package the MinGW
cross-compiler and a selection of libraries.  The idea is that you can
build and test Windows software without needing to use Windows at all;
and you can continue using ordinary Unix build systems (autoconf,
make, etc).  More about that here: http://fedoraproject.org/wiki/MinGW

As a result I've packaged up dbus, since it's a significant dependency
for many desktop programs.  I started with windbus, since that seems
to be the "official" port of dbus to Windows (AIUI).

Windbus seems to prefer to use cmake.  To make windbus build using the
ordinary dbus build system (automake etc), I needed this patch:


    - patch against recent SVN windbus for building C dbus library

    - RPM spec file (ie. build instructions)

    - nearly-working patch for dbuscxx, you can ignore this for now

The C library patch isn't really great at the moment.  In particular I
just removed unneeded Unix source files.  A better way is to include
both Unix and Win source files and make sure each source file is
defended by either #ifdef WIN32 .. #endif or #ifndef WIN32 .. #endif
as appropriate.  If that work were done, then this patch stands a good
chance of building correctly on both Unix and Windows systems.

So my questions:

(1) Is windbus the 'official' Win port?

(2) What are the plans for finally integrating windbus into main dbus

(3) Is a cross-compilation approach better for the Unix developers?

(4) Are the Unix dbus developers interested in using a reworked,
correct version of the above patch, and continuing development of it
using a cross-compiler (not needing Windows to build or test)?  In
general terms, all you need to do from your Linux system is:

  ./configure --host=i686-pc-mingw32 ; make
  wine ./bus/dbus-daemon.exe


Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.

More information about the dbus mailing list