[Libguestfs] supermin and dpkg-divert

Hilko Bengen bengen at hilluzination.de
Sat Mar 8 21:18:41 UTC 2014


While trying to run libguestfs tests after building with
"--enable-appliance --with-supermin-extra-options=--use-installed", I
ran into a peculiar error message in the c-api test:

,----
| libguestfs: error: strings: /abssymlink: strings: error while loading
| shared libraries: libbfd-2.24-multiarch.so: cannot open shared object
| file: No such file or directory
`----

The problem here is that I have the binutils-multiarch package installed
which has used dpkg-divert(8) to override the "regular" binutils
binaries.

,----
| $ dpkg-divert --list /usr/bin/strings
| diversion of /usr/bin/strings to /usr/bin/strings.single by binutils-multiarch
`----

I have been able to reproduce the problem with a minimal appliance
(again, with binutils-multiarch installed):

,----
| $ supermin --prepare bash binutils coreutils libc-bin -o supermin.d --use-installed
| $ cp init.tar supermin.d
| $ supermin --build --format ext2 supermin.d -o appliance.d
| $ qemu-system-x86_64 \
| >     -display none \
| >     -serial stdio \
| >     -kernel appliance.d/kernel \
| >     -initrd appliance.d/initrd \
| >     -append 'console=ttyS0' \
| >     -drive file=appliance.d/root,format=raw,if=virtio
| [...]
| I have no name!@(none):/# ldd /usr/bin/strings
| 	linux-vdso.so.1 (0x00007fffb1944000)
| 	libbfd-2.24-multiarch.so => not found
| 	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f16c7429000)
| 	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f16c7210000)
| 	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f16c6e67000)
| 	/lib64/ld-linux-x86-64.so.2 (0x00007f16c762f000)
`----

Here are some patches that have fixed the issue for me.

Cheers,
-Hilko




More information about the Libguestfs mailing list