Libvirt recently moved from yajl (another JSON library) to json-c,
because yajl is dead upstream.
So that we are using just one JSON library (eg. in Linux distros), I
also moved libguestfs, guestfs-tools and virt-v2v over to using
json-c. This change takes effect in:
- libguestfs >= 1.55.1 (development branch)
- guestfs-tools >= 1.53.4 (development branch)
- virt-v2v >= 2.7.1 (development branch)
(Previous versions like the just released stable libguestfs 1.54.x and
virt-v2v 2.6.x branches are NOT changed, and will still require Jansson).
That's the easy bit.
The _complicated_ bit is what happens if you mix up old libguestfs
with new guestfs-tools or virt-v2v (probably the other way round too,
but I didn't test that). It depends if you're using Jansson >= 2.14
or older Jansson. If using Jansson >= 2.14, you can freely mix
old/new packages. (The reason is to do with symbol versioning
introduced in Jansson 2.14).
If using Jansson < 2.14 then you'll hit this error caused by a
conflicting symbol across the Jansson and json-c libraries:
qemu-img info: JSON output did not contain ‘format’ key
If you see that error happening it's because you're mixing old and new
libguestfs, guestfs-tools, virt-v2v, AND using Jansson < 2.14. The
solution is not to mix them, or if you can't do that, update to the
latest Jansson and recompile everything.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW