[Libguestfs] Fixes from the patch queue of the Debian package

Richard W.M. Jones rjones at redhat.com
Fri Mar 8 12:49:30 UTC 2013


The problem is:

top_srcdir=$(pwd)/..; top_builddir=$(pwd)/..; export ARCHFLAGS="-arch $(uname -m)"; mkdir -p ./ext/guestfs; cd ./ext/guestfs; ruby /home/rjones/d/libguestfs/ruby/ext/guestfs/extconf.rb --with-_guestfs-include=$top_srcdir/src:$top_builddir --with-_guestfs-lib=$top_builddir/src/.libs
checking for guestfs.h... yes
checking for guestfs_create() in -lguestfs... yes
checking for rb_hash_lookup()... no                <---- note
checking for rb_define_alloc_func()... no          <---- note
checking for rb_alloc_func_t... yes
creating extconf.h
creating Makefile

This appears to be caused by the relative placement of the have_func()
calls and setting CFLAGS.  I moved the CFLAGS setting afterwards and
it magically fixed itself and now works:

https://github.com/libguestfs/libguestfs/commit/0ee24ccf8adb080260a5bb4260593cafe7bc016d

Note I also added back the #include <config.h>.  Although that header
no longer contains HAVE_* definitions related to Ruby, it does contain
a few things like _GNU_SOURCE which we might need, and in any case
including it doesn't seem to break anything.

Thanks,

Rich.

-- 
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




More information about the Libguestfs mailing list