[libvirt] Problem compiling latest code from libvirt CVS

I am trying to build the latest libvirt checked out from CVS this morning, but I get an error message. I ran ./autostart, ./configure and then make. Any idea what the problem here could be? gcc -DHAVE_CONFIG_H -I. -I.. -I../gnulib/lib -I../gnulib/lib -I../include -I../include -I../src -I/usr/include/libxml2 -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -DLOCAL_STATE_DIR="\"/usr/local/var\"" -DSYSCONF_DIR="\"/usr/local/etc\"" -DQEMUD_PID_FILE="\"\"" -DREMOTE_PID_FILE="\"/usr/local/var/run/libvirtd.pid\"" -DGETTEXT_PACKAGE=\"libvirt\" -g -O2 -MT libvirtd-remote_protocol.o -MD -MP -MF .deps/libvirtd-remote_protocol.Tpo -c -o libvirtd-remote_protocol.o `test -f 'remote_protocol.c' || echo './'`remote_protocol.c mv -f .deps/libvirtd-remote_protocol.Tpo .deps/libvirtd-remote_protocol.Po /bin/sh ../mylibtool --tag=CC --mode=link gcc -I../gnulib/lib -I../gnulib/lib -I../include -I../include -I../src -I/usr/include/libxml2 -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -DLOCAL_STATE_DIR="\"/usr/local/var\"" -DSYSCONF_DIR="\"/usr/local/etc\"" -DQEMUD_PID_FILE="\"\"" -DREMOTE_PID_FILE="\"/usr/local/var/run/libvirtd.pid\"" -DGETTEXT_PACKAGE=\"libvirt\" -g -O2 -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -o libvirtd libvirtd-event.o libvirtd-qemud.o libvirtd-remote.o libvirtd-remote_protocol.o -lxml2 -lgnutls -lpthread -lsasl2 ../src/libvirt_driver_qemu.la ../src/libvirt_driver_lxc.la ../src/libvirt_driver_uml.la ../src/libvirt_driver_storage.la ../src/libvirt_driver_network.la ../src/libvirt.la ../gnulib/lib/libgnu.la -lpthread (LD) -o libvirtd libvirtd-event.o libvirtd-qemud.o libvirtd-remote.o libvirtd-remote_protocol.o ../src/.libs/libvirt_driver_storage.a(storage_backend.o): In function `virStorageBackendWaitForDevices': /home/af/vepa/libvirt/libvirt/src/storage_backend.c:262: undefined reference to `virNodeDeviceWaitForDevices' collect2: ld returned 1 exit status make[3]: *** [libvirtd] Error 1

Fischer, Anna wrote:
I am trying to build the latest libvirt checked out from CVS this morning, but I get an error message. I ran ./autostart, ./configure and then make.
Any idea what the problem here could be?
I just did a CVS checkout and build which succeeded. I'm not sure what the ./autostart you refer to is. Did you mean autogen.sh? The steps I used to get a successful build are: cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs login cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs co libvirt cd libvirt/ ./autogen.sh make Can you try those in a temp directory to see if they work for you?
gcc -DHAVE_CONFIG_H -I. -I.. -I../gnulib/lib -I../gnulib/lib -I../include -I../include -I../src -I/usr/include/libxml2 -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -DLOCAL_STATE_DIR="\"/usr/local/var\"" -DSYSCONF_DIR="\"/usr/local/etc\"" -DQEMUD_PID_FILE="\"\"" -DREMOTE_PID_FILE="\"/usr/local/var/run/libvirtd.pid\"" -DGETTEXT_PACKAGE=\"libvirt\" -g -O2 -MT libvirtd-remote_protocol.o -MD -MP -MF .deps/libvirtd-remote_protocol.Tpo -c -o libvirtd-remote_protocol.o `test -f 'remote_protocol.c' || echo './'`remote_protocol.c mv -f .deps/libvirtd-remote_protocol.Tpo .deps/libvirtd-remote_protocol.Po /bin/sh ../mylibtool --tag=CC --mode=link gcc -I../gnulib/lib -I../gnulib/lib -I../include -I../include -I../src -I/usr/include/libxml2 -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -DLOCAL_STATE_DIR="\"/usr/local/var\"" -DSYSCONF_DIR="\"/usr/local/etc\"" -DQEMUD_PID_FILE="\"\"" -DREMOTE_PID_FILE="\"/usr/local/var/run/libvirtd.pid\"" -DGETTEXT_PACKAGE=\"libvirt\" -g -O2 -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -o libvirtd libvirtd-event.o libvirtd-qemud.o libvirtd-remote.o libvirtd-remote_pr ot ocol.o -lxml2 -lgnutls -lpthread -lsasl2 ../src/libvirt_driver_qemu.la ../src/libvirt_driver_lxc.la ../src/libvirt_driver_uml.la ../src/libvirt_driver_storage.la ../src/libvirt_driver_network.la ../src/libvirt.la ../gnulib/lib/libgnu.la -lpthread (LD) -o libvirtd libvirtd-event.o libvirtd-qemud.o libvirtd-remote.o libvirtd-remote_protocol.o ../src/.libs/libvirt_driver_storage.a(storage_backend.o): In function `virStorageBackendWaitForDevices': /home/af/vepa/libvirt/libvirt/src/storage_backend.c:262: undefined reference to `virNodeDeviceWaitForDevices' collect2: ld returned 1 exit status make[3]: *** [libvirtd] Error 1
This function was touched recently by the NPIV commit, so it's possible that you have stale build files lying around. You could also try a make clean && make to see if that fixes the problem. Dave

Subject: Re: [libvirt] Problem compiling latest code from libvirt CVS
I am trying to build the latest libvirt checked out from CVS this morning, but I get an error message. I ran ./autostart, ./configure and
Fischer, Anna wrote: then make.
Any idea what the problem here could be?
I just did a CVS checkout and build which succeeded. I'm not sure what the ./autostart you refer to is. Did you mean autogen.sh?
Yes, sorry, that is what I meant!
The steps I used to get a successful build are:
cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs login cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs co libvirt cd libvirt/ ./autogen.sh make
Yep, I did exactly the same.
Can you try those in a temp directory to see if they work for you?
gcc -DHAVE_CONFIG_H -I. -I.. -I../gnulib/lib -I../gnulib/lib - I../include -I../include -I../src -I/usr/include/libxml2 -Wall - Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs - Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings - Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno- sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous- unwind-tables -DLOCAL_STATE_DIR="\"/usr/local/var\"" - DSYSCONF_DIR="\"/usr/local/etc\"" -DQEMUD_PID_FILE="\"\"" - DREMOTE_PID_FILE="\"/usr/local/var/run/libvirtd.pid\"" - DGETTEXT_PACKAGE=\"libvirt\" -g -O2 -MT libvirtd-remote_protocol.o -MD -MP -MF .deps/libvirtd-remote_protocol.Tpo -c -o libvirtd- remote_protocol.o `test -f 'remote_protocol.c' || echo './'`remote_protocol.c mv -f .deps/libvirtd-remote_protocol.Tpo .deps/libvirtd- remote_protocol.Po /bin/sh ../mylibtool --tag=CC --mode=link gcc -I../gnulib/lib - I../gnulib/lib -I../include -I../include -I../src - I/usr/include/libxml2 -Wall -Wformat -Wformat-security -Wmissing- prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast- align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline - Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -DLOCAL_STATE_DIR="\"/usr/local/var\"" - DSYSCONF_DIR="\"/usr/local/etc\"" -DQEMUD_PID_FILE="\"\"" - DREMOTE_PID_FILE="\"/usr/local/var/run/libvirtd.pid\"" - DGETTEXT_PACKAGE=\"libvirt\" -g -O2 -Wall -Wformat -Wformat-security - Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow - Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes - Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 - fexceptions -fasynchronous-unwind-tables -o libvirtd libvirtd- event.o libvirtd-qemud.o libvirtd-remote.o libvirtd-remote_pr ot ocol.o -lxml2 -lgnutls -lpthread -lsasl2 ../src/libvirt_driver_qemu.la ../src/libvirt_driver_lxc.la ../src/libvirt_driver_uml.la ../src/libvirt_driver_storage.la ../src/libvirt_driver_network.la ../src/libvirt.la ../gnulib/lib/libgnu.la -lpthread (LD) -o libvirtd libvirtd-event.o libvirtd-qemud.o libvirtd-remote.o libvirtd-remote_protocol.o ../src/.libs/libvirt_driver_storage.a(storage_backend.o): In function `virStorageBackendWaitForDevices': /home/af/vepa/libvirt/libvirt/src/storage_backend.c:262: undefined reference to `virNodeDeviceWaitForDevices' collect2: ld returned 1 exit status make[3]: *** [libvirtd] Error 1
This function was touched recently by the NPIV commit, so it's possible that you have stale build files lying around. You could also try a make clean && make to see if that fixes the problem.
I also did a make clean and a new make several times. It does not make a difference. I built a different libvirt version from source (the package you can download from libvirt.org) before on that same machine. Is it possible that something from that is still lying around and conflicting now? How can I clean that up? Where do I have to look for this? Is it looking up somewhere other than in the source directory for things to build against? Thanks, Anna

On Fri, Jun 05, 2009 at 01:01:59PM +0000, Fischer, Anna wrote:
I am trying to build the latest libvirt checked out from CVS this morning, but I get an error message. I ran ./autostart, ./configure and then make.
Any idea what the problem here could be?
gcc -DHAVE_CONFIG_H -I. -I.. -I../gnulib/lib -I../gnulib/lib -I../include -I../include -I../src -I/usr/include/libxml2 -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -DLOCAL_STATE_DIR="\"/usr/local/var\"" -DSYSCONF_DIR="\"/usr/local/etc\"" -DQEMUD_PID_FILE="\"\"" -DREMOTE_PID_FILE="\"/usr/local/var/run/libvirtd.pid\"" -DGETTEXT_PACKAGE=\"libvirt\" -g -O2 -MT libvirtd-remote_protocol.o -MD -MP -MF .deps/libvirtd-remote_protocol.Tpo -c -o libvirtd-remote_protocol.o `test -f 'remote_protocol.c' || echo './'`remote_protocol.c mv -f .deps/libvirtd-remote_protocol.Tpo .deps/libvirtd-remote_protocol.Po /bin/sh ../mylibtool --tag=CC --mode=link gcc -I../gnulib/lib -I../gnulib/lib -I../include -I../include -I../src -I/usr/include/libxml2 -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -DLOCAL_STATE_DIR="\"/usr/local/var\"" -DSYSCONF_DIR="\"/usr/local/etc\"" -DQEMUD_PID_FILE="\"\"" -DREMOTE_PID_FILE="\"/usr/local/var/run/libvirtd.pid\"" -DGETTEXT_PACKAGE=\"libvirt\" -g -O2 -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -o libvirtd libvirtd-event.o libvirtd-qemud.o libvirtd-remote.o libvirtd-remote_prot ocol.o -lxml2 -lgnutls -lpthread -lsasl2 ../src/libvirt_driver_qemu.la ../src/libvirt_driver_lxc.la ../src/libvirt_driver_uml.la ../src/libvirt_driver_storage.la ../src/libvirt_driver_network.la ../src/libvirt.la ../gnulib/lib/libgnu.la -lpthread (LD) -o libvirtd libvirtd-event.o libvirtd-qemud.o libvirtd-remote.o libvirtd-remote_protocol.o ../src/.libs/libvirt_driver_storage.a(storage_backend.o): In function `virStorageBackendWaitForDevices': /home/af/vepa/libvirt/libvirt/src/storage_backend.c:262: undefined reference to `virNodeDeviceWaitForDevices' collect2: ld returned 1 exit status make[3]: *** [libvirtd] Error 1
Can you send the end of the 'configure' output, starting from where it says: configure: configure: Configuration summary configure: ===================== configure: I'd guess there is some combination of build options you have that is causing the problem. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Subject: Re: [libvirt] Problem compiling latest code from libvirt CVS
I am trying to build the latest libvirt checked out from CVS this morning, but I get an error message. I ran ./autostart, ./configure and
On Fri, Jun 05, 2009 at 01:01:59PM +0000, Fischer, Anna wrote: then make.
Any idea what the problem here could be?
gcc -DHAVE_CONFIG_H -I. -I.. -I../gnulib/lib -I../gnulib/lib -
mv -f .deps/libvirtd-remote_protocol.Tpo .deps/libvirtd- remote_protocol.Po /bin/sh ../mylibtool --tag=CC --mode=link gcc -I../gnulib/lib - I../gnulib/lib -I../include -I../include -I../src - I/usr/include/libxml2 -Wall -Wformat -Wformat-security -Wmissing-
ocol.o -lxml2 -lgnutls -lpthread -lsasl2 ../src/libvirt_driver_qemu.la ../src/libvirt_driver_lxc.la ../src/libvirt_driver_uml.la ../src/libvirt_driver_storage.la ../src/libvirt_driver_network.la ../src/libvirt.la ../gnulib/lib/libgnu.la -lpthread (LD) -o libvirtd libvirtd-event.o libvirtd-qemud.o libvirtd-remote.o
I../include -I../include -I../src -I/usr/include/libxml2 -Wall - Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs - Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings - Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno- sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous- unwind-tables -DLOCAL_STATE_DIR="\"/usr/local/var\"" - DSYSCONF_DIR="\"/usr/local/etc\"" -DQEMUD_PID_FILE="\"\"" - DREMOTE_PID_FILE="\"/usr/local/var/run/libvirtd.pid\"" - DGETTEXT_PACKAGE=\"libvirt\" -g -O2 -MT libvirtd-remote_protocol.o -MD -MP -MF .deps/libvirtd-remote_protocol.Tpo -c -o libvirtd- remote_protocol.o `test -f 'remote_protocol.c' || echo './'`remote_protocol.c prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast- align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline - Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -DLOCAL_STATE_DIR="\"/usr/local/var\"" - DSYSCONF_DIR="\"/usr/local/etc\"" -DQEMUD_PID_FILE="\"\"" - DREMOTE_PID_FILE="\"/usr/local/var/run/libvirtd.pid\"" - DGETTEXT_PACKAGE=\"libvirt\" -g -O2 -Wall -Wformat -Wformat-security - Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow - Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes - Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 - fexceptions -fasynchronous-unwind-tables -o libvirtd libvirtd- event.o libvirtd-qemud.o libvirtd-remote.o libvirtd-remote_prot libvirtd-remote_protocol.o
../src/.libs/libvirt_driver_storage.a(storage_backend.o): In function `virStorageBackendWaitForDevices': /home/af/vepa/libvirt/libvirt/src/storage_backend.c:262: undefined reference to `virNodeDeviceWaitForDevices' collect2: ld returned 1 exit status make[3]: *** [libvirtd] Error 1
Can you send the end of the 'configure' output, starting from where it says:
configure: configure: Configuration summary configure: ===================== configure:
I'd guess there is some combination of build options you have that is causing the problem.
I am running ./configure without any options. Here the output: configure: configure: Configuration summary configure: ===================== configure: configure: Drivers configure: configure: Xen: yes configure: Proxy: yes configure: QEMU: yes configure: UML: yes configure: OpenVZ: yes configure: VBox: yes configure: LXC: yes configure: ONE: no configure: Test: yes configure: Remote: yes configure: Network: yes configure: Libvirtd: yes configure: netcf: no configure: configure: Storage Drivers configure: configure: Dir: yes configure: FS: yes configure: NetFS: yes configure: LVM: yes configure: iSCSI: yes configure: SCSI: yes configure: Disk: no configure: configure: Security Drivers configure: configure: SELinux: yes configure: configure: Driver Loadable Modules configure: configure: dlopen: no configure: configure: Libraries configure: configure: libxml: -I/usr/include/libxml2 -lxml2 configure: gnutls: -lgnutls -lpthread configure: sasl: -lsasl2 configure: avahi: no configure: polkit: no configure: selinux: -lselinux configure: numactl: no configure: xen: -lxenstore configure: hal: no configure: devkit: no configure: netcf: no configure: configure: Test suite configure: configure: Coverage: no configure: Alloc OOM: no configure: configure: Miscellaneous configure: configure: Debug: yes configure: Warnings: maximum configure: Readline: no configure:

On Fri, Jun 05, 2009 at 02:41:25PM +0000, Fischer, Anna wrote:
Subject: Re: [libvirt] Problem compiling latest code from libvirt CVS
I am trying to build the latest libvirt checked out from CVS this morning, but I get an error message. I ran ./autostart, ./configure and
On Fri, Jun 05, 2009 at 01:01:59PM +0000, Fischer, Anna wrote: then make.
Any idea what the problem here could be?
../src/.libs/libvirt_driver_storage.a(storage_backend.o): In function `virStorageBackendWaitForDevices': /home/af/vepa/libvirt/libvirt/src/storage_backend.c:262: undefined reference to `virNodeDeviceWaitForDevices' collect2: ld returned 1 exit status make[3]: *** [libvirtd] Error 1
This error is from the storage driver attempting toi link to stuff in the node device driver.
I am running ./configure without any options. Here the output:
configure: configure: Storage Drivers configure: configure: Dir: yes configure: FS: yes configure: NetFS: yes configure: LVM: yes configure: iSCSI: yes configure: SCSI: yes configure: Disk: no
[snip]
configure: hal: no configure: devkit: no
which is failing because neither of the node device driver implementations are turned on. This is a bug in the storage_backend.c file. This is a generic shared file and as such, it should not have any dependancy on the node device driver code, since the latter is guarenteed to be available. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Subject: Re: [libvirt] Problem compiling latest code from libvirt CVS
On Fri, Jun 05, 2009 at 02:41:25PM +0000, Fischer, Anna wrote:
Subject: Re: [libvirt] Problem compiling latest code from libvirt CVS
I am trying to build the latest libvirt checked out from CVS this morning, but I get an error message. I ran ./autostart, ./configure and
On Fri, Jun 05, 2009 at 01:01:59PM +0000, Fischer, Anna wrote: then make.
Any idea what the problem here could be?
../src/.libs/libvirt_driver_storage.a(storage_backend.o): In function `virStorageBackendWaitForDevices': /home/af/vepa/libvirt/libvirt/src/storage_backend.c:262: undefined reference to `virNodeDeviceWaitForDevices' collect2: ld returned 1 exit status make[3]: *** [libvirtd] Error 1
This error is from the storage driver attempting toi link to stuff in the node device driver.
I am running ./configure without any options. Here the output:
configure: configure: Storage Drivers configure: configure: Dir: yes configure: FS: yes configure: NetFS: yes configure: LVM: yes configure: iSCSI: yes configure: SCSI: yes configure: Disk: no
[snip]
configure: hal: no configure: devkit: no
which is failing because neither of the node device driver implementations are turned on.
This is a bug in the storage_backend.c file. This is a generic shared file and as such, it should not have any dependancy on the node device driver code, since the latter is guarenteed to be available.
Thanks for your help. What can I do to get around this? Enable hal or devkit? I think I tried that once but I am missing further packages for that to work. A different solution would be better. Cheers, Anna

On Fri, Jun 05, 2009 at 03:03:16PM +0000, Fischer, Anna wrote:
Subject: Re: [libvirt] Problem compiling latest code from libvirt CVS
configure: configure: Storage Drivers configure: configure: Dir: yes configure: FS: yes configure: NetFS: yes configure: LVM: yes configure: iSCSI: yes configure: SCSI: yes configure: Disk: no
[snip]
configure: hal: no configure: devkit: no
which is failing because neither of the node device driver implementations are turned on.
This is a bug in the storage_backend.c file. This is a generic shared file and as such, it should not have any dependancy on the node device driver code, since the latter is guarenteed to be available.
Thanks for your help. What can I do to get around this? Enable hal or devkit? I think I tried that once but I am missing further packages for that to work. A different solution would be better.
Install the HAL development package, eg hal-devel on Fedora/RHEL distros Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Subject: Re: [libvirt] Problem compiling latest code from libvirt CVS
On Fri, Jun 05, 2009 at 03:03:16PM +0000, Fischer, Anna wrote:
Subject: Re: [libvirt] Problem compiling latest code from libvirt CVS
configure: configure: Storage Drivers configure: configure: Dir: yes configure: FS: yes configure: NetFS: yes configure: LVM: yes configure: iSCSI: yes configure: SCSI: yes configure: Disk: no
[snip]
configure: hal: no configure: devkit: no
which is failing because neither of the node device driver implementations are turned on.
This is a bug in the storage_backend.c file. This is a generic shared file and as such, it should not have any dependancy on the node device driver code, since the latter is guarenteed to be available.
Thanks for your help. What can I do to get around this? Enable hal or devkit? I think I tried that once but I am missing further packages for that to work. A different solution would be better.
Install the HAL development package, eg hal-devel on Fedora/RHEL distros
Yes, works for now. Thanks. Anna

Daniel P. Berrange wrote: <snip>
which is failing because neither of the node device driver implementations are turned on.
This is a bug in the storage_backend.c file. This is a generic shared file and as such, it should not have any dependancy on the node device driver code, since the latter is guarenteed to be available.
I'd split out this code to avoid duplication, but I'll refactor it again to avoid the dependency on the node device code & submit a patch. Dave

On Fri, Jun 05, 2009 at 12:08:13PM -0400, Dave Allan wrote:
Daniel P. Berrange wrote: <snip>
which is failing because neither of the node device driver implementations are turned on.
This is a bug in the storage_backend.c file. This is a generic shared file and as such, it should not have any dependancy on the node device driver code, since the latter is guarenteed to be available.
I'd split out this code to avoid duplication, but I'll refactor it again to avoid the dependency on the node device code & submit a patch.
Simply having the dependancy reversed should be OK. storage_backend.c is a shared file always available to drivers. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Daniel P. Berrange wrote:
On Fri, Jun 05, 2009 at 12:08:13PM -0400, Dave Allan wrote:
Daniel P. Berrange wrote: <snip>
which is failing because neither of the node device driver implementations are turned on.
This is a bug in the storage_backend.c file. This is a generic shared file and as such, it should not have any dependancy on the node device driver code, since the latter is guarenteed to be available. I'd split out this code to avoid duplication, but I'll refactor it again to avoid the dependency on the node device code & submit a patch.
Simply having the dependancy reversed should be OK. storage_backend.c is a shared file always available to drivers.
Daniel
Here's a patch that should remove the dependency on the node device code. Dave
From 1795bd359faf85b887893492e3b80c033ddd06b2 Mon Sep 17 00:00:00 2001 From: David Allan <dallan@redhat.com> Date: Fri, 5 Jun 2009 13:38:35 -0400 Subject: [PATCH 1/1] Fix build failure when building without node device code
--- src/node_device.c | 29 ++--------------------------- src/node_device.h | 2 -- src/storage_backend.c | 29 ++++++++++++++++++++++++++++- src/storage_backend.h | 2 ++ 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/node_device.c b/src/node_device.c index cd9fb6e..787d720 100644 --- a/src/node_device.c +++ b/src/node_device.c @@ -34,6 +34,7 @@ #include "logging.h" #include "node_device_conf.h" #include "node_device.h" +#include "storage_backend.h" /* For virWaitForDevices */ #define VIR_FROM_THIS VIR_FROM_NODEDEV @@ -505,7 +506,7 @@ find_new_device(virConnectPtr conn, const char *wwnn, const char *wwpn) while ((now - start) < LINUX_NEW_DEVICE_WAIT_TIME) { - virNodeDeviceWaitForDevices(conn); + virWaitForDevices(conn); dev = nodeDeviceLookupByWWN(conn, wwnn, wwpn); @@ -639,32 +640,6 @@ out: } -#if defined(UDEVADM) || defined(UDEVSETTLE) -void virNodeDeviceWaitForDevices(virConnectPtr conn) -{ -#ifdef UDEVADM - const char *const settleprog[] = { UDEVADM, "settle", NULL }; -#else - const char *const settleprog[] = { UDEVSETTLE, NULL }; -#endif - int exitstatus; - - if (access(settleprog[0], X_OK) != 0) - return; - - /* - * NOTE: we ignore errors here; this is just to make sure that any device - * nodes that are being created finish before we try to scan them. - * If this fails for any reason, we still have the backup of polling for - * 5 seconds for device nodes. - */ - virRun(conn, settleprog, &exitstatus); -} -#else -void virNodeDeviceWaitForDevices(virConnectPtr conn ATTRIBUTE_UNUSED) {} -#endif - - void registerCommonNodeFuncs(virDeviceMonitorPtr driver) { driver->numOfDevices = nodeNumOfDevices; diff --git a/src/node_device.h b/src/node_device.h index 882ba0f..db01624 100644 --- a/src/node_device.h +++ b/src/node_device.h @@ -53,6 +53,4 @@ void registerCommonNodeFuncs(virDeviceMonitorPtr mon); int nodedevRegister(void); -void virNodeDeviceWaitForDevices(virConnectPtr conn); - #endif /* __VIR_NODE_DEVICE_H__ */ diff --git a/src/storage_backend.c b/src/storage_backend.c index d731a23..953928e 100644 --- a/src/storage_backend.c +++ b/src/storage_backend.c @@ -96,6 +96,32 @@ static virStorageBackendPtr backends[] = { }; +#if defined(UDEVADM) || defined(UDEVSETTLE) +void virWaitForDevices(virConnectPtr conn) +{ +#ifdef UDEVADM + const char *const settleprog[] = { UDEVADM, "settle", NULL }; +#else + const char *const settleprog[] = { UDEVSETTLE, NULL }; +#endif + int exitstatus; + + if (access(settleprog[0], X_OK) != 0) + return; + + /* + * NOTE: we ignore errors here; this is just to make sure that any device + * nodes that are being created finish before we try to scan them. + * If this fails for any reason, we still have the backup of polling for + * 5 seconds for device nodes. + */ + virRun(conn, settleprog, &exitstatus); +} +#else +void virWaitForDevices(virConnectPtr conn ATTRIBUTE_UNUSED) {} +#endif + + virStorageBackendPtr virStorageBackendForType(int type) { unsigned int i; @@ -259,7 +285,7 @@ virStorageBackendUpdateVolTargetInfoFD(virConnectPtr conn, void virStorageBackendWaitForDevices(virConnectPtr conn) { - virNodeDeviceWaitForDevices(conn); + virWaitForDevices(conn); return; } @@ -668,3 +694,4 @@ virStorageBackendRunProgNul(virConnectPtr conn, return -1; } #endif + diff --git a/src/storage_backend.h b/src/storage_backend.h index 7bf8814..a3f441c 100644 --- a/src/storage_backend.h +++ b/src/storage_backend.h @@ -111,4 +111,6 @@ int virStorageBackendRunProgNul(virConnectPtr conn, virStorageBackendListVolNulFunc func, void *data); +void virWaitForDevices(virConnectPtr conn); + #endif /* __VIR_STORAGE_BACKEND_H__ */ -- 1.6.0.6

On Fri, Jun 05, 2009 at 01:43:15PM -0400, Dave Allan wrote:
Daniel P. Berrange wrote:
On Fri, Jun 05, 2009 at 12:08:13PM -0400, Dave Allan wrote:
which is failing because neither of the node device driver implementations are turned on.
This is a bug in the storage_backend.c file. This is a generic shared file and as such, it should not have any dependancy on the node device driver code, since the latter is guarenteed to be available. I'd split out this code to avoid duplication, but I'll refactor it again to avoid the dependency on the node device code & submit a
Daniel P. Berrange wrote: <snip> patch.
Simply having the dependancy reversed should be OK. storage_backend.c is a shared file always available to drivers.
Daniel
Here's a patch that should remove the dependency on the node device code.
Oops totally forgot about it ! Applied and commited, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (4)
-
Daniel P. Berrange
-
Daniel Veillard
-
Dave Allan
-
Fischer, Anna