[libvirt] Re: [PATCH 0/3] A small example program

Jim Meyering jim at meyering.net
Fri Jan 30 13:10:58 UTC 2009


Hi David,

I've just applied your 3 patches and built the example.
That went fine.  Then I tried to run it like this:

     $ LIBVIRT_DEBUG=1 libvirtd 2> log & pid=$!
     $ ./hellolibvirt
     Attempting to connect to hypervisor
     Connected to hypervisor at "qemu:///session"
? -> Failed to get hypervisor version
     Disconnected from hypervisor
     [Exit 1]

There was plenty in the log:

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: log-installed-libvirtd
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090130/2ba9c471/attachment-0001.ksh>
-------------- next part --------------

Then I repeated with the just-built libvirtd,
instead of the installed one, but then I get a new error:

     $ kill $pid
     $ LIBVIRT_DEBUG=1 ../../qemud/libvirtd 2> log &
     $ ./hellolibvirt
     Attempting to connect to hypervisor
     Connected to hypervisor at "qemu:///session"
? -> libvir: error : Unknown failure
     Failed to get hypervisor version
     Disconnected from hypervisor
     [Exit 1]

This is on F10 x86_64.
Does the above work for you?

Also, please change examples/hellolibvirt/Makefile.am to
use $(...) rather than the obsolete @...@ notation.
I.e., just apply the following to the rest when you squash those
commits into one.
Yes, I know there are quite a few existing uses of @...@,
and I even wrote a patch to remove them, but made the mistake
of also fixing some minor quoting bugs along the way, and haven't
gotten around to separating it into two change sets.

Finally, please add examples/hellolibvirt/hellolibvirt
to the top-level .cvsignore and rerun sync-vcs-ignore-files
to regenerate .gitignore and .hgignore to match.

>From 27f0007067280e4fa93b8c1d3c1c203314bde285 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Fri, 30 Jan 2009 10:02:51 +0100
Subject: [PATCH] use $(var), rather than obsolete @var@ notation

---
 examples/hellolibvirt/Makefile.am |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/hellolibvirt/Makefile.am b/examples/hellolibvirt/Makefile.am
index 6ef2cc8..489bf8b 100644
--- a/examples/hellolibvirt/Makefile.am
+++ b/examples/hellolibvirt/Makefile.am
@@ -1,5 +1,5 @@
-INCLUDES = -I at top_srcdir@/include
+INCLUDES = -I$(top_srcdir)/include
 noinst_PROGRAMS = hellolibvirt
 hellolibvirt_CFLAGS = $(WARN_CFLAGS)
 hellolibvirt_SOURCES = hellolibvirt.c
-hellolibvirt_LDADD = @top_builddir@/src/libvirt.la
+hellolibvirt_LDADD = $(top_builddir)/src/libvirt.la
--
1.6.1.2.418.gd79e6


More information about the libvir-list mailing list