[libvirt] A few small libvirt build issues

I've hit a few small build issues that I don't know how to fix. daemon/libvirtd.init isn't regenerated if ./configure is re-run. If I do: ./configure --prefix=/foo && make && ./configure --prefix=/bar && make daemon/libvirtd.init will reference /foo and not /bar. The logrotate files are affected as well. Second issue involves root squash homedir which I use regularly for development. If I ./configure && make -j4 && sudo make install, I get the following error: Making install in python make[1]: Entering directory `/mnt/storage.bos/boston/crobinso/sandbox/upstream/libvirt/libvirt.git/python' Making install in . make[2]: Entering directory `/mnt/storage.bos/boston/crobinso/sandbox/upstream/libvirt/libvirt.git/python' make[3]: Entering directory `/mnt/storage.bos/boston/crobinso/sandbox/upstream/libvirt/libvirt.git/python' test -z "/usr/lib64/python2.6/site-packages" || /bin/mkdir -p "/usr/lib64/python2.6/site-packages" /bin/sh ../libtool --mode=install /usr/bin/install -c libvirtmod.la '/usr/lib64/python2.6/site-packages' libtool: install: warning: relinking `libvirtmod.la' libtool: install: (cd /mnt/storage.bos/boston/crobinso/sandbox/upstream/libvirt/libvirt.git/python; /bin/sh /mnt/storage.bos/boston/crobinso/sandbox/upstream/libvirt/libvirt.git/libtool --silent --tag CC --mode=relink gcc -Wno-redundant-decls -g -O2 -module -avoid-version -shared -L../src/.libs -o libvirtmod.la -rpath /usr/lib64/python2.6/site-packages libvirtmod_la-libvirt-override.lo libvirtmod_la-typewrappers.lo libvirtmod_la-libvirt.lo ../src/libvirt.la -ldl ) mv: cannot move `libvirtmod.so' to `libvirtmod.soU': Permission denied libtool: install: error: relink `libvirtmod.la' with the above command before installing it My automake-fu is weak so I haven't had much luck decoding any of this. 'make install' seems to want to run that relink command every time, running it by hand doesn't help any. Anyone have any thoughts? Jim, Eric, I figure you guys would know best, so any input appreciated. Thanks, Cole

On 05/19/2010 03:29 PM, Cole Robinson wrote:
I've hit a few small build issues that I don't know how to fix.
daemon/libvirtd.init isn't regenerated if ./configure is re-run. If I do:
./configure --prefix=/foo && make && ./configure --prefix=/bar && make
daemon/libvirtd.init will reference /foo and not /bar. The logrotate files are affected as well.
I think this one can be solved by adding a dependency on config.status; testing my theory now, and hopefully I will have a patch in the near future.
Second issue involves root squash homedir which I use regularly for development. If I ./configure && make -j4 && sudo make install, I get the following error:
Making install in python make[1]: Entering directory `/mnt/storage.bos/boston/crobinso/sandbox/upstream/libvirt/libvirt.git/python' Making install in . make[2]: Entering directory `/mnt/storage.bos/boston/crobinso/sandbox/upstream/libvirt/libvirt.git/python' make[3]: Entering directory `/mnt/storage.bos/boston/crobinso/sandbox/upstream/libvirt/libvirt.git/python' test -z "/usr/lib64/python2.6/site-packages" || /bin/mkdir -p "/usr/lib64/python2.6/site-packages" /bin/sh ../libtool --mode=install /usr/bin/install -c libvirtmod.la '/usr/lib64/python2.6/site-packages' libtool: install: warning: relinking `libvirtmod.la'
Unfortunately, I don't know libtool as well as I'd like. Here, you may be better off asking on the bug-libtool@gnu.org list. I do know that GNU Coding Conventions state that 'make install' should not do any compilation or linking if 'make all' is up-to-date, but I also know that libtool has a documented bug of not being able to always obey that rule on some platforms, because it must do a relink as part of installation to get path dependencies right. On the other hand, I seem to recall that on Linux, where .so can be compiled with rpath information up front, libtool can be smart enough to avoid the relink, but I don't know the magic to make that happen. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Otherwise, './configure --prefix=/foo && make && ./configure --prefix=/bar && make' leaves the wrong files in libvirtd.init (/foo instead of /bar). * daemon/Makefile.am (libvirtd.init): Add dependency on config.status. Reported by Cole Robinson. --- Thanks for the simple recipe for testing; and I was correct that the fix was relatively simple (assuming, of course, that you consider autotools knowledge simple :) daemon/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 6f668ea..2f25c9d 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -239,7 +239,7 @@ uninstall-init: BUILT_SOURCES += libvirtd.init libvirt-guests.init -%.init: %.init.in +%.init: %.init.in $(top_srcdir)/config.status $(AM_V_GEN)sed \ -e s!\@localstatedir\@!@localstatedir@!g \ -e s!\@sbindir\@!@sbindir@!g \ -- 1.7.0.1

2010/5/21 Eric Blake <eblake@redhat.com>:
Otherwise, './configure --prefix=/foo && make && ./configure --prefix=/bar && make' leaves the wrong files in libvirtd.init (/foo instead of /bar).
* daemon/Makefile.am (libvirtd.init): Add dependency on config.status. Reported by Cole Robinson. ---
Thanks for the simple recipe for testing; and I was correct that the fix was relatively simple (assuming, of course, that you consider autotools knowledge simple :)
daemon/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 6f668ea..2f25c9d 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -239,7 +239,7 @@ uninstall-init:
BUILT_SOURCES += libvirtd.init libvirt-guests.init
-%.init: %.init.in +%.init: %.init.in $(top_srcdir)/config.status $(AM_V_GEN)sed \ -e s!\@localstatedir\@!@localstatedir@!g \ -e s!\@sbindir\@!@sbindir@!g \ -- 1.7.0.1
ACK. Matthias

Otherwise, VPATH builds fail with: make[1]: *** No rule to make target `libvirt-guests.init', needed by `all'. Regression introduced in commit 482e08a9. * daemon/Makefile.am (%.init): Look in correct place for config.status. --- Since this is a build-breaker (albeit only VPATH builds), and since I introduced the bug, I'm pushing this fix. daemon/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 2f25c9d..df34ef1 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -239,7 +239,7 @@ uninstall-init: BUILT_SOURCES += libvirtd.init libvirt-guests.init -%.init: %.init.in $(top_srcdir)/config.status +%.init: %.init.in $(top_builddir)/config.status $(AM_V_GEN)sed \ -e s!\@localstatedir\@!@localstatedir@!g \ -e s!\@sbindir\@!@sbindir@!g \ -- 1.7.0.1
participants (3)
-
Cole Robinson
-
Eric Blake
-
Matthias Bolte