[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Notes on cross-compiling the daemon (was: Re: [Libguestfs] Windows port of daemon?)

Notes on issues cross-compiling the daemon.

I installed the Fedora Windows cross compiler and
mingw32-portablexdr[1] and then did:

  cd daemon

* No custom format specifiers.  No replacement in Gnulib's printf
  either.  Bugger.

* No chroot.  That means that cases where we use CHROOT_IN/CHROOT_OUT
  have to be rewritten.  There's this almost laughable Windows library
  function which we might use:
  This one needs more thought.

* guestfsd.c socket code needs some attention.

* guestfsd.c: command* functions need a Win32 replacement.

* proto.c: Protocol code uses a select loop which could be replaced
  with a Win32 equivalent or (probably easier) we just use the Gnulib
  replacement select function.

* stubs.c: LVM tokenizing code is a bit broken for reasons I didn't
  look into very deeply.  We need to check for LVM availability in
  the appliance and disable all LVM-related code conditionally.

These functions are missing, but Gnulib provides replacements:

  + mkdtemp
  + fstatat (gnulib module: openat)
  + getline
  + glob
  + sleep
  + strchrnul

These functions are missing, and Gnulib provides no replacement
(but it really should do):

  - fstatvfs
  - futimens
  - posix_fallocate
  - pread
  - readlinkat
  - realpath
  - sync

I'll post a few patches shortly to fix some obviously broken things.
(A good thing about compiling for another platform is I've already
found some genuine mistakes in the code).


[1] mingw32-portablexdr from here:

Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]