Supplied by Pene on IRC who got libguestfs to compile and run on
Mac OS X 10.9 with qemu 1.6.0. My notes in [] below.
Rich.
libguestfs on Mac OS X, recipe so far:
--------------------------------------
- libtool-kill-dependency_libs.sh: replace chmod --reference="$output.tmp"
"$output" -> chmod `stat -f "%p" "$output.tmp"` "$output"
- src/proto.c: replace if (!(*xdrp) (&xdr, args)) -> if (!(*xdrp) (&xdr, args,
0))
- src/proto.c: replace if (xdrp && ret && !xdrp (&xdr, ret)) -> if (xdrp && ret
&& !xdrp (&xdr, ret, 0))
- src/launch-direct.c: comment out - if (qemu_supports (g, data,
"-nodefaults")) ADD_CMDLINE ("-nodefaults");
[This works around a qemu bug:
qemu: qemu_mutex_lock: Invalid argument
when using the -nodefaults parameter]
- fuse/guestunmount.c: replace execlp ("fusermount", "fusermount", "-u",
mountpoint, NULL); -> execlp ("/sbin/umount", "fusermount", mountpoint, NULL);
- fuse/guestunmount.c: replace execlp ("/sbin/fuser", "fuser", "-v", "-m",
mountpoint, NULL); -> execlp ("/usr/bin/fuser", "fuser", "-c", mountpoint,
NULL);
- gnulib/lib/error.c: replace extern char *program_name; -> extern char
*program_name = "libguestfs";
- gnulib/lib/open_memstream.c: add from
http://lists.gnu.org/archive/html/bug-gnulib/2010-04/msg00379.html, remove
check for #if !HAVE_FUNOPEN
- gnulib/lib/stdio.in.h, gnulib/lib/Makefile.in: add new open_memstream.c
[Mac OS X lacks open_memstream and gnulib doesn't supply it. Note
that open_memstream is part of POSIX so this is a bug in OS X]
- configure with: ./configure --disable-appliance --disable-daemon
--disable-probes --disable-ruby --disable-php CFLAGS="-I/opt/local/include"
LDFLAGS="-L/opt/local/lib" LIBS="-lintl"
FUSE_CFLAGS="-I/usr/local/include/osxfuse/fuse -D_FILE_OFFSET_BITS=64"
FUSE_LIBS="-losxfuse"
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs