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

[Libguestfs] Observations on compiling on Mac OS X 10.5 (Leopard)



I started with:
 - Mac OS X 10.5.8
 - Xcode installed
 - OCaml from GODI
 - qemu from git

autoconf is really ancient (2.61).  It doesn't have AM_SILENT_RULES
and although we tried to make things work when autoconf lacks this by
having:

  m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
  AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.

this nevertheless doesn't work.  I had to comment out these two lines
in both configure.ac and daemon/configure.ac.

There is no libtoolize.  I had to manually link build-aux/ltmain.sh ->
/usr/share/libtool/ltmain.sh

There is no autopoint.  I think this is the reason I had to manually
remove references to the po/ subdirectory.

There is no mkisofs.  I commented out the test for this in
configure.ac, but eventually I'll have to find out if this is
available for Mac OS X because it is relatively important (used by
libguestfs-test-tool amongst other things).

There is no qemu, but I was able to compile and use qemu from git.
There is an additional problem which is that 'qemu --help' opens (very
briefly) a toplevel window.  We run 'qemu --help' and 'qemu --version'
at configure time and at run time in order to determine qemu features
and version, so we'll need to add the '-nographic' option [patch
coming up].

I have added --disable-daemon and --disable-appliance options to
'configure' [patch coming up].

No pkgconfig, therefore no PKG_CHECK_MODULES.  I commented out these
two tests temporarily.

The shell which runs configure is not bash, and so it doesn't
understand the 'echo -n' flag that we use in the configure script.
For example:

  echo -n "OCaml bindings ...................... "
  if test "x$HAVE_OCAML_TRUE" = "x"; then echo "yes"; else echo "no"; fi

produces the output:

  -n OCaml bindings ...................... 
  yes

I was able to get all the way through
./configure --disable-appliance --disable-daemon
with the following results:

  Daemon .............................. no
  Appliance ........................... no
  QEMU ................................ /Users/rich/bin/qemu
  OCaml bindings ...................... yes
  Perl bindings ....................... no
  Python bindings ..................... no
  Ruby bindings ....................... yes
  Java bindings ....................... no
  Haskell bindings .................... no
  virt-inspector ...................... no
  virt-* tools ........................ no
  supermin appliance .................. no
  FUSE filesystem ..................... no

GODI has a strange layout for OCaml packages; a small OS X-specific
hack was required to src/generator.ml to cope with this.

OS X version of XDR doesn't support 64 bit / hyper type.  Known
problem and PortableXDR should be able to supply a replacement.  I
copied src/guestfs_protocol.[ch] from a Fedora machine temporarily,
but the complete solution is to use PortableXDR.

There's a few other portability problems in the code which I have
fixed [patches coming up].

Rich.

-- 
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.
http://et.redhat.com/~rjones/virt-top


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