Richard W.M. Jones
2010-Mar-21 17:12 UTC
[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
Simson Garfinkel
2010-Mar-21 17:20 UTC
[Libguestfs] Observations on compiling on Mac OS X 10.5 (Leopard)
Hi, Richard. libtoolize is distributed, but it is distributed by Apple as glibtoolize. Go figure. In general, Apple is much more of a FreeBSD system than a Linux system. So the work here will help elsewhere. I use MacPorts to install a newer autoconf --- it gives me 2.64 in /opt/local/bin/autoconf. Please let me know if I can help you on this. On Mar 21, 2010, at 10:12 AM, Richard W.M. Jones wrote:> 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 > > _______________________________________________ > Libguestfs mailing list > Libguestfs at redhat.com > https://www.redhat.com/mailman/listinfo/libguestfs
Richard W.M. Jones
2010-Mar-23 21:55 UTC
[Libguestfs] NOTE: I have pushed the Mac OS X patches
I have pushed the Mac OS X patches. They work on OS X 10.5 and don't appear to break the Fedora builds either. ... however that's not the complete story for building on OS X. You need to remove the references to the po/ and images/ subdirectories. images/ cannot be built because it requires a cpio which can produce 'hmac' format files (ie. the ones which the kernel reads). The one on Mac OS X does not seem to be able to do this. OS X lacks mkisofs. This is required for a few important things like libguestfs-test-tool. I commented out this test in configure.ac. OS X lacks pkg-config. I also had to comment out these tests in configure.ac. Basically it then builds and runs with a Fedora appliance. I need to write the full documentation for how to compile/run it, but if you need immediate help, please ask on this list. http://rwmj.wordpress.com/2010/03/21/libguestfs-now-works-on-mac-os-x/ Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
Apparently Analagous Threads
- [PATCH libguestfs] build: daemon/do_debug: parameters aren't always unused
- [PATCH] automake: Admit defeat and use 'subdir-objects'.
- [PATCH libguestfs] build: enable automake's color-tests option
- [PATCH xf86-video-nouveau 00/17] autotools configuration cleanups
- [PATCH] build: Only add 'serial-tests' for automake >= 1.12.