[libvirt] Build issue with libvirt 0.9.8

Hi, When building libvirt 0.9.8 with jhbuild, I have now reproduced twice some issue during the build. Namely, after successfully building and installing libvirt 0.9.8, when I try to run virsh, I get: virsh: /home/teuf/jhbuild-boxes/opt/lib64/libvirt.so.0: version `LIBVIRT_PRIVATE_0.9.7' not found (required by /home/teuf/jhbuild-boxes/opt/lib64/libvirt-qemu.so.0) This happens when I start from a clean prefix (no libvirt in it), then I install 0.9.7, and then I try to install 0.9.8 on top of it. If I rebuild libvirt-0.9.8 once more this goes away, so this is not a blocking problem for me. I have checked that libvirt-qemu.so.0 is the 0.9.8 version, I have looked in the build logs and in Makefile.am and everything looks correct to me, so I was wondering if anyone had any explanation for this behaviour. Once again, it's easy to workaround so it's not a big issue, but I'm mentioning it in case there would something obvious I missed. I put the build logs at http://people.gnome.org/~teuf/libvirt-0.9.7 and http://people.gnome.org/~teuf/libvirt-0.9.8 Christophe

On Fri, Dec 09, 2011 at 11:43:21AM +0100, Christophe Fergeau wrote:
Hi,
When building libvirt 0.9.8 with jhbuild, I have now reproduced twice some issue during the build. Namely, after successfully building and installing libvirt 0.9.8, when I try to run virsh, I get:
virsh: /home/teuf/jhbuild-boxes/opt/lib64/libvirt.so.0: version `LIBVIRT_PRIVATE_0.9.7' not found (required by /home/teuf/jhbuild-boxes/opt/lib64/libvirt-qemu.so.0)
This happens when I start from a clean prefix (no libvirt in it), then I install 0.9.7, and then I try to install 0.9.8 on top of it. If I rebuild libvirt-0.9.8 once more this goes away, so this is not a blocking problem for me.
I have checked that libvirt-qemu.so.0 is the 0.9.8 version, I have looked in the build logs and in Makefile.am and everything looks correct to me, so I was wondering if anyone had any explanation for this behaviour. Once again, it's easy to workaround so it's not a big issue, but I'm mentioning it in case there would something obvious I missed.
I put the build logs at http://people.gnome.org/~teuf/libvirt-0.9.7 and http://people.gnome.org/~teuf/libvirt-0.9.8
There is something odd about the way it is being built: Notice where it installs the library: Making install in src make[1]: Entering directory `/home/teuf/jhbuild-boxes/sources/libvirt-0.9.8/src' make install-am make[2]: Entering directory `/home/teuf/jhbuild-boxes/sources/libvirt-0.9.8/src' make[3]: Entering directory `/home/teuf/jhbuild-boxes/sources/libvirt-0.9.8/src' test -z "/home/teuf/jhbuild-boxes/opt/lib64" || /bin/mkdir -p "/home/teuf/jhbuild-boxes/opt/_jhbuild/root-libvirt/home/teuf/jhbuild-boxes/opt/lib64" /bin/sh ../libtool --mode=install /home/teuf/.local/bin/install-check libvirt.la libvirt-qemu.la '/home/teuf/jhbuild-boxes/opt/_jhbuild/root-libvirt/home/teuf/jhbuild-boxes/opt/lib64' And now where virsh thinks the library should have been installed: Making install in tools make[1]: Entering directory `/home/teuf/jhbuild-boxes/sources/libvirt-0.9.8/tools' make install-am make[2]: Entering directory `/home/teuf/jhbuild-boxes/sources/libvirt-0.9.8/tools' make[3]: Entering directory `/home/teuf/jhbuild-boxes/sources/libvirt-0.9.8/tools' test -z "/home/teuf/jhbuild-boxes/opt/bin" || /bin/mkdir -p "/home/teuf/jhbuild-boxes/opt/_jhbuild/root-libvirt/home/teuf/jhbuild-boxes/opt/bin" /bin/sh ../libtool --mode=install /home/teuf/.local/bin/install-check virsh '/home/teuf/jhbuild-boxes/opt/_jhbuild/root-libvirt/home/teuf/jhbuild-boxes/opt/bin' libtool: install: warning: `../src/libvirt.la' has not been installed in `/home/teuf/jhbuild-boxes/opt/lib64' libtool: install: warning: `../src/libvirt-qemu.la' has not been installed in `/home/teuf/jhbuild-boxes/opt/lib64' libtool: install: warning: `/home/teuf/jhbuild-boxes/sources/libvirt-0.9.8/src/libvirt.la' has not been installed in `/home/teuf/jhbuild-boxes/opt/lib64' libtool: install: /home/teuf/.local/bin/install-check .libs/virsh /home/teuf/jhbuild-boxes/opt/_jhbuild/root-libvirt/home/teuf/jhbuild-boxes/opt/bin/virsh Finally right at the end: I: 41 files remaining from previous build .... I: Deleted: '/home/teuf/jhbuild-boxes/opt/lib64/libvirt.so.0.9.7' I: Deleted: '/home/teuf/jhbuild-boxes/opt/lib64/libvirt-qemu.so.0.9.7' The combination of these 3 sets of messages, makes me think you have confused libtool into linking to the old binary What arguments are you passing to 'configure' and what if any variables are you passing to 'make install' ? I can't reproduce any problem myself if I do cd libvirt-0.9.7 ./configure --prefix=/tmp/libvirt make make install cd ../libvirt-0.9.8 ./configure --prefix=/tmp/libvirt make make install Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Hi, On Fri, Dec 09, 2011 at 11:18:48AM +0000, Daniel P. Berrange wrote:
There is something odd about the way it is being built:
The combination of these 3 sets of messages, makes me think you have confused libtool into linking to the old binary
What arguments are you passing to 'configure' and what if any variables are you passing to 'make install' ?
Yes, jhbuild is being a bit convoluted when building things, it uses ./configure --prefix $prefix ..., but then it does a make install DESTDIR=$prefix/_jhbuild (or something like this), and then it moves the files to the right place in $prefix after cleaning up the old version of the library that might be there. I just tried without using jhbuild to build libvirt, but just the tarballs, and I can reproduce when using make install DESTDIR=... and then cleaning $prefix from libvirt libs, and then copying what's in DESTDIR to $prefix. Not sure it's worth spending a lot of time on this convoluted scenario :) Christophe

On Fri, Dec 09, 2011 at 02:18:02PM +0100, Christophe Fergeau wrote:
Hi,
On Fri, Dec 09, 2011 at 11:18:48AM +0000, Daniel P. Berrange wrote:
There is something odd about the way it is being built:
The combination of these 3 sets of messages, makes me think you have confused libtool into linking to the old binary
What arguments are you passing to 'configure' and what if any variables are you passing to 'make install' ?
Yes, jhbuild is being a bit convoluted when building things, it uses ./configure --prefix $prefix ..., but then it does a make install DESTDIR=$prefix/_jhbuild (or something like this), and then it moves the files to the right place in $prefix after cleaning up the old version of the library that might be there. I just tried without using jhbuild to build libvirt, but just the tarballs, and I can reproduce when using make install DESTDIR=... and then cleaning $prefix from libvirt libs, and then copying what's in DESTDIR to $prefix. Not sure it's worth spending a lot of time on this convoluted scenario :)
I looked some more into it, and I think what happens is that: - libvirt.so gets installed to $DESTDIR/$libdir - libvirt-qemu.so gets relinked by libtool during installation, but uses libvirt from $libdir for this relink - $libdir/libvirt.so gets replaced with $DESDIR/$libdir/libvirt.so - libvirt-qemu.so now has some references to a library that has now disappeared http://www.gnu.org/software/libtool/manual/html_node/Install-mode.html seems to indicate this scenario cannot be supported correctly :( "For systems where fast installation can not be turned on, relinking may be needed. In this case, a ‘DESTDIR’ install will fail. Currently it is not generally possible to install into a temporary staging area that contains needed third-party libraries which are not yet visible at their final location. " (I think linux doesn't have fast installation) Christophe
participants (2)
-
Christophe Fergeau
-
Daniel P. Berrange