Build libguestfs error with undefined reference to `guestfs_int_init_libvirt_backend'
Dear all, I am trying to build libguestfs library on my system : Ubuntu Server 12.04 x64bit on XEN hypervisor. I have followed all instructions on their homepage but whey i am trying to build the library make -> gives me the following error: libguestfs.so: undefined reference to `guestfs_int_init_libvirt_backend' Here is a sample code of the error : make[2]: Entering directory `/home/str/libguestfs-1.30.3/examples' CCLD create-disk ../src/.libs/libguestfs.so: undefined reference to `guestfs_int_init_libvirt_backend' collect2: ld returned 1 exit status make[2]: *** [create-disk] Error 1 make[2]: Leaving directory `/home/str/libguestfs-1.30.3/examples' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/str/libguestfs-1.30.3' make: *** [all] Error 2 I have already installed all the dependencies for the library [sudo apt-get build-dep libguestfs] and updated my automake version to 1.13[latest for ubuntu 12.04] as i have read on another redhat list post [this one : https://www.redhat.com/archives/libguestfs/2014-January/msg00015.html ] but still nothing.. I must be missing something ! I haven't done anything rather than ./configure && make Any tips/help would be appreciated. Stratos
On Thu, Oct 15, 2015 at 11:57:49PM +0300, Efstratios Skleparis wrote:
Dear all,
I am trying to build libguestfs library on my system : Ubuntu Server 12.04 x64bit on XEN hypervisor.
I have followed all instructions on their homepage but whey i am trying to build the library make -> gives me the following error: libguestfs.so: undefined reference to `guestfs_int_init_libvirt_backend'
Here is a sample code of the error :
make[2]: Entering directory `/home/str/libguestfs-1.30.3/examples' CCLD create-disk ../src/.libs/libguestfs.so: undefined reference to `guestfs_int_init_libvirt_backend' collect2: ld returned 1 exit status make[2]: *** [create-disk] Error 1 make[2]: Leaving directory `/home/str/libguestfs-1.30.3/examples' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/str/libguestfs-1.30.3' make: *** [all] Error 2
I have already installed all the dependencies for the library [sudo apt-get build-dep libguestfs] and updated my automake version to 1.13[latest for ubuntu 12.04] as i have read on another redhat list post [this one : https://www.redhat.com/archives/libguestfs/2014-January/msg00015.html ] but still nothing.. I must be missing something !
I haven't done anything rather than ./configure && make
Yup, this is actually a bug in the library. I'm guessing you have libvirt-dev installed, but it is some ancient version (less than 0.10.2 specifically). This means libvirt is compiled out of the library here: https://github.com/libguestfs/libguestfs/blob/677c721e85380fc54ae6d0bebe8851... but still referenced here: https://github.com/libguestfs/libguestfs/blob/677c721e85380fc54ae6d0bebe8851... You can just comment out lines 518-520 in the latter file to make it work. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
The attached patch may be a full fix. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
participants (2)
-
Efstratios Skleparis -
Richard W.M. Jones