[libvirt] [PATCH] OpenNebula driver changes

Daniel P. Berrange berrange at redhat.com
Thu Jun 4 11:14:44 UTC 2009


On Wed, Jun 03, 2009 at 06:42:37PM +0200, Javier Fontan wrote:
> Hello,
> 
> The first patch makes OpenNebula driver compilable in recent codebase.
> The second one adds direct calls to xmlrpc library so it does not
> depend on OpenNebula libraries and can be licensed as LGPL.

This looks good. I'll just suggest that the driver is made to build by
default in configure.in, automatically looking for the xml-rpc libs
using pkg-config instead.

eg you should be able to use something like this

XMLRPC_REQUIRED=1.14.0

XMLRPC_CFLAGS=
XMLRPC_LIBS=
if test "x$with_one" = "xyes" -o "x$with_one" = "xcheck"; then
  PKG_CHECK_MODULES(XMLRPC, xmlrpc_client >= $XMLRPC_REQUIRED,
    [with_one=yes], [
    if test "x$with_one" = "xcheck" ; then
       with_one=no
    else
       AC_MSG_ERROR(
         [You must install XMLRPC-C >= $XMLRPC_REQUIRED to compile libvirt ONE driver])
    fi
  ])
  if test "x$with_one" = "xyes" ; then
    AC_DEFINE_UNQUOTED([HAVE_XMLRPC], 1,
      [whether One is used to broadcast server presense])
  fi
fi
AM_CONDITIONAL([HAVE_XMLRPC], [test "x$with_one" = "xyes"])
AC_SUBST([XMLRPC_CFLAGS])
AC_SUBST([XMLRPC_LIBS])


And change the 

AC_ARG_WITH([one],
[  --with-one              add ONE support (on)],[],[with_one=no])

To be

AC_ARG_WITH([one],
[  --with-one              add ONE support (on)],[],[with_one=check])






> I have compiled libvirt with the modifications without errors but with
> the current version I checked out from git repository I am having
> problems:
> 
> --8<------
> (LD) -o libvirtd libvirtd-event.o libvirtd-qemud.o libvirtd-remote.o
> libvirtd-remote_protocol.o
> ../src/.libs/libvirt_driver_storage.a(storage_backend.o): In function
> `virStorageBackendWaitForDevices':
> /home/jfontan/git/libvirt.git/src/storage_backend.c:262: undefined
> reference to `virNodeDeviceWaitForDevices'
> ------>8--

Hmm, did your build have the HAL driver enabled ?

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list