[sheepdog] compile with libvirt 1.2.5

Hitoshi Mitake mitake.hitoshi at gmail.com
Thu Jun 12 04:43:02 CEST 2014


At Wed, 11 Jun 2014 13:10:10 +0400,
Vasiliy Tolstov wrote:
> 
> [1  <text/plain; UTF-8 (7bit)>]
> This is not enough, configure ok, but compile fails at:
> This is need to be replaced to DOG. Patch attached, can you post it to
> libvirt to include?

OK, I'll forward it to the libvirt list later.
# you can do it by yourself, of course :)

Thanks,
Hitoshi

> 
> Makefile:7843: recipe for target
> 'storage/libvirt_driver_storage_impl_la-storage_backend_sheepdog.lo'
> failed
> storage/storage_backend_sheepdog.c: In function
> 'virStorageBackendSheepdogRefreshAllVol':
> storage/storage_backend_sheepdog.c:153:46: error: 'COLLIE' undeclared
> (first use in this function)
>      virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "list",
> "-r", NULL);
>                                               ^
> storage/storage_backend_sheepdog.c:153:46: note: each undeclared
> identifier is reported only once for each function it appears in
> storage/storage_backend_sheepdog.c: In function
> 'virStorageBackendSheepdogRefreshPool':
> storage/storage_backend_sheepdog.c:198:32: error: 'COLLIE' undeclared
> (first use in this function)
>      cmd = virCommandNewArgList(COLLIE, "node", "info", "-r", NULL);
>                                 ^
> storage/storage_backend_sheepdog.c: In function
> 'virStorageBackendSheepdogDeleteVol':
> storage/storage_backend_sheepdog.c:224:46: error: 'COLLIE' undeclared
> (first use in this function)
>      virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "delete",
> vol->name, NULL);
>                                               ^
> storage/storage_backend_sheepdog.c: In function
> 'virStorageBackendSheepdogBuildVol':
> storage/storage_backend_sheepdog.c:269:46: error: 'COLLIE' undeclared
> (first use in this function)
>      virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "create",
> vol->name, NULL);
>                                               ^
> storage/storage_backend_sheepdog.c: In function
> 'virStorageBackendSheepdogRefreshVol':
> storage/storage_backend_sheepdog.c:354:46: error: 'COLLIE' undeclared
> (first use in this function)
>      virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "list",
> vol->name, "-r", NULL);
>                                               ^
> storage/storage_backend_sheepdog.c: In function
> 'virStorageBackendSheepdogResizeVol':
> storage/storage_backend_sheepdog.c:390:46: error: 'COLLIE' undeclared
> (first use in this function)
>      virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "resize",
> vol->name, NULL);
>                                               ^
> make[3]: *** [storage/libvirt_driver_storage_impl_la-storage_backend_sheepdog.lo]
> Error 1
> make[3]: *** Waiting for unfinished jobs....
> 
> 2014-06-11 12:51 GMT+04:00 Vasiliy Tolstov <v.tolstov at selfip.ru>:
> > Not tested, but i thinks that's enough:
> >
> > --- a/configure.ac  2014-06-11 12:51:22.852000000 +0400
> > +++ b/configure.ac  2014-06-11 12:52:21.452000000 +0400
> > @@ -1925,14 +1925,14 @@
> >
> >  if test "$with_storage_sheepdog" = "yes" ||
> >     test "$with_storage_sheepdog" = "check"; then
> > -  AC_PATH_PROG([COLLIE], [collie], [], [$PATH:/sbin:/usr/sbin])
> > +  AC_PATH_PROG([DOG], [dog], [], [$PATH:/sbin:/usr/sbin])
> >
> >    if test "$with_storage_sheepdog" = "yes"; then
> > -    if test -z "$COLLIE"; then
> > -      AC_MSG_ERROR([We need collie for Sheepdog storage driver])
> > +    if test -z "$DOG"; then
> > +      AC_MSG_ERROR([We need dog for Sheepdog storage driver])
> >      fi
> >    else
> > -    if test -z "$COLLIE"; then
> > +    if test -z "$DOG"; then
> >        with_storage_sheepdog=no
> >      fi
> >
> > @@ -1944,7 +1944,7 @@
> >    if test "$with_storage_sheepdog" = "yes"; then
> >      AC_DEFINE_UNQUOTED([WITH_STORAGE_SHEEPDOG], 1,
> >        [whether Sheepdog backend for storage driver is enabled])
> > -    AC_DEFINE_UNQUOTED([COLLIE],["$COLLIE"],[Location of collie program])
> > +    AC_DEFINE_UNQUOTED([DOG],["$DOG"],[Location of dog program])
> >    fi
> >  fi
> >  AM_CONDITIONAL([WITH_STORAGE_SHEEPDOG],
> >
> > 2014-06-11 12:48 GMT+04:00 Vasiliy Tolstov <v.tolstov at selfip.ru>:
> >> 2014-06-11 6:49 GMT+04:00 Hitoshi Mitake <mitake.hitoshi at gmail.com>:
> >>> Thanks for your report, can I see error messages?
> >>>
> >>> Thanks,
> >>> Hitoshi
> >>
> >>
> >> checking for collie... no
> >> configure: error: We need collie for Sheepdog storage driver
> >> As i see error in configure.ac:
> >> if test "$with_storage_sheepdog" = "yes" ||
> >>    test "$with_storage_sheepdog" = "check"; then
> >>   AC_PATH_PROG([COLLIE], [collie], [], [$PATH:/sbin:/usr/sbin])
> >>
> >>   if test "$with_storage_sheepdog" = "yes"; then
> >>     if test -z "$COLLIE"; then
> >>       AC_MSG_ERROR([We need collie for Sheepdog storage driver])
> >>     fi
> >>   else
> >>     if test -z "$COLLIE"; then
> >>       with_storage_sheepdog=no
> >>     fi
> >>
> >>     if test "$with_storage_sheepdog" = "check"; then
> >>       with_storage_sheepdog=yes
> >>     fi
> >>   fi
> >>
> >>   if test "$with_storage_sheepdog" = "yes"; then
> >>     AC_DEFINE_UNQUOTED([WITH_STORAGE_SHEEPDOG], 1,
> >>       [whether Sheepdog backend for storage driver is enabled])
> >>     AC_DEFINE_UNQUOTED([COLLIE],["$COLLIE"],[Location of collie program])
> >>   fi
> >> fi
> >>
> >> COLLIE needs to be replaced to DOG
> >>
> >> --
> >> Vasiliy Tolstov,
> >> e-mail: v.tolstov at selfip.ru
> >> jabber: vase at selfip.ru
> >
> >
> >
> > --
> > Vasiliy Tolstov,
> > e-mail: v.tolstov at selfip.ru
> > jabber: vase at selfip.ru
> 
> 
> 
> -- 
> Vasiliy Tolstov,
> e-mail: v.tolstov at selfip.ru
> jabber: vase at selfip.ru
> [2 sheepdog-0.8.x.patch <text/x-patch; US-ASCII (base64)>]
> --- a/configure.ac	2014-06-11 12:51:22.852000000 +0400
> +++ b/configure.ac	2014-06-11 12:52:21.452000000 +0400
> @@ -1925,14 +1925,14 @@
>  
>  if test "$with_storage_sheepdog" = "yes" ||
>     test "$with_storage_sheepdog" = "check"; then
> -  AC_PATH_PROG([COLLIE], [collie], [], [$PATH:/sbin:/usr/sbin])
> +  AC_PATH_PROG([DOG], [dog], [], [$PATH:/sbin:/usr/sbin])
>  
>    if test "$with_storage_sheepdog" = "yes"; then
> -    if test -z "$COLLIE"; then
> -      AC_MSG_ERROR([We need collie for Sheepdog storage driver])
> +    if test -z "$DOG"; then
> +      AC_MSG_ERROR([We need dog for Sheepdog storage driver])
>      fi
>    else
> -    if test -z "$COLLIE"; then
> +    if test -z "$DOG"; then
>        with_storage_sheepdog=no
>      fi
>  
> @@ -1944,7 +1944,7 @@
>    if test "$with_storage_sheepdog" = "yes"; then
>      AC_DEFINE_UNQUOTED([WITH_STORAGE_SHEEPDOG], 1,
>        [whether Sheepdog backend for storage driver is enabled])
> -    AC_DEFINE_UNQUOTED([COLLIE],["$COLLIE"],[Location of collie program])
> +    AC_DEFINE_UNQUOTED([DOG],["$DOG"],[Location of dog program])
>    fi
>  fi
>  AM_CONDITIONAL([WITH_STORAGE_SHEEPDOG],
> --- a/src/storage/storage_backend_sheepdog.c	2014-06-11 13:00:09.528000000 +0400
> +++ b/src/storage/storage_backend_sheepdog.c	2014-06-11 13:00:59.196000000 +0400
> @@ -150,7 +150,7 @@ virStorageBackendSheepdogRefreshAllVol(v
>      char **cells = NULL;
>      size_t i;
>  
> -    virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "list", "-r", NULL);
> +    virCommandPtr cmd = virCommandNewArgList(DOG, "vdi", "list", "-r", NULL);
>      virStorageBackendSheepdogAddHostArg(cmd, pool);
>      virCommandSetOutputBuffer(cmd, &output);
>      if (virCommandRun(cmd, NULL) < 0)
> @@ -195,7 +195,7 @@ virStorageBackendSheepdogRefreshPool(vir
>      char *output = NULL;
>      virCommandPtr cmd;
>  
> -    cmd = virCommandNewArgList(COLLIE, "node", "info", "-r", NULL);
> +    cmd = virCommandNewArgList(DOG, "node", "info", "-r", NULL);
>      virStorageBackendSheepdogAddHostArg(cmd, pool);
>      virCommandSetOutputBuffer(cmd, &output);
>      if (virCommandRun(cmd, NULL) < 0)
> @@ -221,7 +221,7 @@ virStorageBackendSheepdogDeleteVol(virCo
>  
>      virCheckFlags(0, -1);
>  
> -    virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "delete", vol->name, NULL);
> +    virCommandPtr cmd = virCommandNewArgList(DOG, "vdi", "delete", vol->name, NULL);
>      virStorageBackendSheepdogAddHostArg(cmd, pool);
>      int ret = virCommandRun(cmd, NULL);
>  
> @@ -266,7 +266,7 @@ virStorageBackendSheepdogBuildVol(virCon
>  
>      virCheckFlags(0, -1);
>  
> -    virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "create", vol->name, NULL);
> +    virCommandPtr cmd = virCommandNewArgList(DOG, "vdi", "create", vol->name, NULL);
>      virCommandAddArgFormat(cmd, "%llu", vol->target.capacity);
>      virStorageBackendSheepdogAddHostArg(cmd, pool);
>      if (virCommandRun(cmd, NULL) < 0)
> @@ -351,7 +351,7 @@ virStorageBackendSheepdogRefreshVol(virC
>      int ret;
>      char *output = NULL;
>  
> -    virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "list", vol->name, "-r", NULL);
> +    virCommandPtr cmd = virCommandNewArgList(DOG, "vdi", "list", vol->name, "-r", NULL);
>      virStorageBackendSheepdogAddHostArg(cmd, pool);
>      virCommandSetOutputBuffer(cmd, &output);
>      ret = virCommandRun(cmd, NULL);
> @@ -387,7 +387,7 @@ virStorageBackendSheepdogResizeVol(virCo
>  
>      virCheckFlags(0, -1);
>  
> -    virCommandPtr cmd = virCommandNewArgList(COLLIE, "vdi", "resize", vol->name, NULL);
> +    virCommandPtr cmd = virCommandNewArgList(DOG, "vdi", "resize", vol->name, NULL);
>      virCommandAddArgFormat(cmd, "%llu", capacity);
>      virStorageBackendSheepdogAddHostArg(cmd, pool);
>      int ret = virCommandRun(cmd, NULL);



More information about the sheepdog mailing list