Claudio Sasso
2018-Mar-29 08:51 UTC
[Libguestfs] Compilation on OL7.4 - Tests fail (possibly) due to libyajl
Richard W.M. Jones
2018-Mar-29 11:06 UTC
Re: [Libguestfs] Compilation on OL7.4 - Tests fail (possibly) due to libyajl
On Thu, Mar 29, 2018 at 10:51:46AM +0200, Claudio Sasso wrote:> The guestfsd executable in appliance/supermin.d/ seems to link yajl > correctly > $ cp -r libguestfs-1.38.0/appliance/supermin.d/*tar.gz /tmp/supermin.d/ > $ cd /tmp/supermin.d/ > $ for i in *tar.gz; do tar -xzf $i; done > $ ldd ./usr/sbin/guestfsdYou're nearly there with your analysis. The problem is that yajl isn't being copied into the appliance for some reason. Try doing: ./run virt-rescue --scratch ><rescue> ldd /usr/sbin/guestfsd and you should see the missing/broken dependency. This is controlled by appliance/packagelist (generated from appliance/packagelist.in). I'm guessing for some reason yajl does not appear in this file. You could add it to the file and then do: make -C appliance clean-supermin-appliance make -C appliance rm -rf tmp/.guestfs-* make quickcheck If that doesn't fix it then it's probably something to do with the yajl RPM itself. Perhaps the RPM metadata doesn't list all of the files in yajl or something like that, so supermin doesn't know what files to copy into the appliance. You'll probably need to run supermin by hand with extra -v options to see what's going on in this case. 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
Richard W.M. Jones
2018-Mar-29 12:25 UTC
Re: [Libguestfs] Compilation on OL7.4 - Tests fail (possibly) due to libyajl
[Let's keep replies on the list please] On Thu, Mar 29, 2018 at 02:16:31PM +0200, Claudio Sasso wrote:> Hi Richard, > > thanks for the suggestions; I think I have a more fundamental > problem here, as after I added yajl, it complained about hivex, then > about augeas. But for now I would be content with a working build, > and later address the underling root cause if any, so for now I am > adding them all; but I am stuck with libiconv as I have built it > manually, so it's not a package. What could be a "proper" way to add > it to the supermin image? > > $ make quickcheck > > ... > > + guestfsd --verbose > guestfsd: error while loading shared libraries: libiconv.so.2: > cannot open shared object file: No such file or directory > + sync > + test '' = 1 > + reboot -f > > $ ldd /tmp/supermin.d/usr/sbin/guestfsd > ... > > libiconv.so.2 => /home/vm/install/lib/libiconv.so.2 > (0x00007fc03464d000) > > I could not check the linkage with ./run virt-rescue --scratch, as > the shell appears to be blocked whatever command I type. Here's the > output (some of the errors may be the root cause of all that? on the > same system build 1.34 works, built following the same recipe): > > $ ./run virt-rescue --scratch > [ 0.168448] usbserial: usb_serial_init - usb_register failed > [ 0.169093] usbserial: usb_serial_init - returning with error -19 > supermin: mounting /proc > supermin: ext2 mini initrd starting up: 5.1.19 glibc > Starting /init script ... > [/usr/lib/tmpfiles.d/systemd.conf:11] Unknown group 'utmp'. > [/usr/lib/tmpfiles.d/systemd.conf:19] Unknown user 'systemd-network'. > [/usr/lib/tmpfiles.d/systemd.conf:20] Unknown user 'systemd-network'. > [/usr/lib/tmpfiles.d/systemd.conf:21] Unknown user 'systemd-network'. > [/usr/lib/tmpfiles.d/systemd.conf:25] Unknown group 'systemd-journal'. > [/usr/lib/tmpfiles.d/systemd.conf:26] Unknown group 'systemd-journal'. > starting version 219 > specified group 'input' unknown > /init: line 120: ip: command not found > /init: line 121: ip: command not found > mdadm: No arrays found in config file or automatically > WARNING: Failed to connect to lvmetad. Falling back to device > scanning. > mdadm: No arrays found in config file or automatically > [ > ] > guestfsd: error while loading shared libraries: libiconv.so.2: > cannot open shared object file: No such file or directory > > ------------------------------------------------------------ > > Welcome to virt-rescue, the libguestfs rescue shell. > > Note: The contents of / (root) are the rescue appliance. > You have to mount the guest’s partitions under /sysroot > before you can examine them. > > ><rescue> ldd /usr/sbin/guestfsd > .... wait forever ...There's obviously some big problem going on. You could try this: supermin5 --build \ /path/to/libguestfs/appliance/supermin.d \ -o /tmp/root -f chroot and see if /tmp/root/usr/lib64/libiconv.so.2 is being copied from the host. To find out why it's not working, keep adding -v options to the supermin command line to enable more and more debug, and compare it to the source: https://github.com/libguestfs/supermin/blob/master/src/mode_build.ml#L85 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
Maybe Matching Threads
- Re: Compilation on OL7.4 - Tests fail (possibly) due to libyajl
- Libvirt installion error: You must install the libyajl library & headers to compile libvirt
- Issue with virt-builder on Ubuntu 14.04
- [Error] guestfsd: /usr/lib/libaugeas.so.0: version `AUGEAS_0.16.0' not found (required by guestfsd)
- Re: [Error] guestfsd: /usr/lib/libaugeas.so.0: version `AUGEAS_0.16.0' not found (required by guestfsd)