[libvirt] Compiling Error

Hi all, I met some compiling error since May 26: <snip> make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' CCLD libvirt_driver_qemu.la libtool: link: `libvirt_qemu_probes.lo' is not a valid libtool object make[3]: *** [libvirt_driver_qemu.la] Error 1 make[3]: Leaving directory `/home/ajia/Workspace/libvirt/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/ajia/Workspace/libvirt/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ajia/Workspace/libvirt' make: *** [all] Error 2 </snip> Some details: <snip> File `libvirt_driver_qemu.la' does not exist. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_agent.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_agent.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_command.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_conf.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_domain.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_monitor.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_capabilities.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_capabilities.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_command.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_bridge_filter.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_domain.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_migration.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_cgroup.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_cgroup.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_hostdev.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_hostdev.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_hotplug.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_hotplug.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_conf.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_process.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_process.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_migration.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_monitor.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_monitor_text.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_monitor_json.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_monitor_text.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_monitor_json.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_driver.c'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_driver.h'. Prerequisite `libvirt_qemu_probes.h' is newer than target `qemu/qemu_bridge_filter.c'. Must remake target `libvirt_driver_qemu.la'. </snip> Notes, in fact, libvirt_driver_qemu.la hasn't been generated: [root@202 libvirt]# find . -name libvirt_driver_qemu.la [root@202 libvirt]# find . -name libvirt_qemu_probes.lo [root@202 libvirt]# Regards, Alex

On Mon, May 28, 2012 at 02:24:16AM -0400, Alex Jia wrote:
Hi all, I met some compiling error since May 26: <snip> make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' CCLD libvirt_driver_qemu.la libtool: link: `libvirt_qemu_probes.lo' is not a valid libtool object
I see that too
Notes, in fact, libvirt_driver_qemu.la hasn't been generated: [root@202 libvirt]# find . -name libvirt_driver_qemu.la [root@202 libvirt]# find . -name libvirt_qemu_probes.lo
Yes, it looks like a dependency bug in the Makefile.am - I'm just testing a possible fix 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 :|

On Mon, May 28, 2012 at 11:13:23AM +0100, Daniel P. Berrange wrote:
On Mon, May 28, 2012 at 02:24:16AM -0400, Alex Jia wrote:
Hi all, I met some compiling error since May 26: <snip> make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' CCLD libvirt_driver_qemu.la libtool: link: `libvirt_qemu_probes.lo' is not a valid libtool object
I see that too
Notes, in fact, libvirt_driver_qemu.la hasn't been generated: [root@202 libvirt]# find . -name libvirt_driver_qemu.la [root@202 libvirt]# find . -name libvirt_qemu_probes.lo
Yes, it looks like a dependency bug in the Makefile.am - I'm just testing a possible fix
'make rpm' seems to be broken as well right now - make[2]: *** No rule to make target `locking/test_libvirt_sanlock.aug.in', needed by `distdir'. Stop. make[2]: Leaving directory `/home/dipankar/src/powerpc/libvirt-ppc/src' make[1]: *** [distdir] Error 1 Thanks Dipankar

On 05/29/2012 01:36 AM, Dipankar Sarma wrote:
On Mon, May 28, 2012 at 11:13:23AM +0100, Daniel P. Berrange wrote:
On Mon, May 28, 2012 at 02:24:16AM -0400, Alex Jia wrote:
Hi all, I met some compiling error since May 26: <snip> make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' CCLD libvirt_driver_qemu.la libtool: link: `libvirt_qemu_probes.lo' is not a valid libtool object I see that too 'make' still can't work now:
Considering target file `libvirt_driver_qemu.la'. File `libvirt_driver_qemu.la' does not exist. Considering target file `libvirt_qemu_probes.lo'. Considering target file `libvirt_qemu_probes.o'. Considering target file `libvirt_qemu_probes.d'. Finished prerequisites of target file `libvirt_qemu_probes.d'. No need to remake target `libvirt_qemu_probes.d'. Finished prerequisites of target file `libvirt_qemu_probes.o'. Prerequisite `libvirt_qemu_probes.d' is older than target `libvirt_qemu_probes.o'. No need to remake target `libvirt_qemu_probes.o'. Finished prerequisites of target file `libvirt_qemu_probes.lo'. Prerequisite `libvirt_qemu_probes.o' is older than target `libvirt_qemu_probes.lo'. No need to remake target `libvirt_qemu_probes.lo'. Pruning file `libvirt_qemu_probes.o'. Finished prerequisites of target file `libvirt_driver_qemu.la'. Must remake target `libvirt_driver_qemu.la'. make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' CCLD libvirt_driver_qemu.la libtool: link: cannot find the library `libvirt_driver_qemu_impl.la' or unhandled argument `libvirt_driver_qemu_impl.la' make[3]: *** [libvirt_driver_qemu.la] Error 1 make[3]: Leaving directory `/home/ajia/Workspace/libvirt/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/ajia/Workspace/libvirt/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ajia/Workspace/libvirt' make: *** [all] Error 2 [root@202 libvirt]# find . -name libvirt_qemu_probes.d ./src/libvirt_qemu_probes.d [root@202 libvirt]# find . -name libvirt_qemu_probes.o ./src/libvirt_qemu_probes.o [root@202 libvirt]# find . -name libvirt_qemu_probes.lo [root@202 libvirt]# find . -name libvirt_driver_qemu.la Notes, nothing is returned for the above 2 files. Regards, Alex
Notes, in fact, libvirt_driver_qemu.la hasn't been generated: [root@202 libvirt]# find . -name libvirt_driver_qemu.la [root@202 libvirt]# find . -name libvirt_qemu_probes.lo Yes, it looks like a dependency bug in the Makefile.am - I'm just testing a possible fix 'make rpm' seems to be broken as well right now -
make[2]: *** No rule to make target `locking/test_libvirt_sanlock.aug.in', needed by `distdir'. Stop. make[2]: Leaving directory `/home/dipankar/src/powerpc/libvirt-ppc/src' make[1]: *** [distdir] Error 1 Yeah, I see that too. Thanks Dipankar

On 05/28/2012 08:43 PM, Alex Jia wrote:
I met some compiling error since May 26: <snip> make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' CCLD libvirt_driver_qemu.la libtool: link: `libvirt_qemu_probes.lo' is not a valid libtool object I see that too 'make' still can't work now:
make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' CCLD libvirt_driver_qemu.la libtool: link: cannot find the library `libvirt_driver_qemu_impl.la' or unhandled argument `libvirt_driver_qemu_impl.la' make[3]: *** [libvirt_driver_qemu.la] Error 1 make[3]: Leaving directory `/home/ajia/Workspace/libvirt/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/ajia/Workspace/libvirt/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ajia/Workspace/libvirt' make: *** [all] Error 2 [root@202 libvirt]# find . -name libvirt_qemu_probes.d ./src/libvirt_qemu_probes.d [root@202 libvirt]# find . -name libvirt_qemu_probes.o ./src/libvirt_qemu_probes.o [root@202 libvirt]# find . -name libvirt_qemu_probes.lo
Found it, and I'm pushing this under the build-breaker rule. It's always fun when _deleting_ lines from Makefile.am results in _adding_ lines to Makefile to fix the bug. From 8a115526e6f64f1ffb2fbff6e29c845f68f66510 Mon Sep 17 00:00:00 2001 From: Eric Blake <eblake@redhat.com> Date: Tue, 29 May 2012 12:41:06 -0600 Subject: [PATCH] build: fix missing dependencies for libvirt-qemu.so The moment you specify a _DEPENDENCIES, automake (stupidly) assumes that you will specify _all_ dependencies for that target. This stupidity has been fixed in automake 1.12, but we cannot rely on newer automake everywhere. For libvirt_la_DEPENDENCIES, we took care of providing the full list, but for libvirt_qemu_la_DEPENDENCIES, we were missing the dependency on libvirt_qemu_impl.la, which resulted in a failed build: make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' CCLD libvirt_driver_qemu.la libtool: link: `libvirt_qemu_probes.lo' is not a valid libtool object * src/Makefile.am (libvirt_driver_qemu_la_DEPENDENCIES): Delete; automake does a better job if it does the entire job. --- src/Makefile.am | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index e172e55..533e78a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1294,7 +1294,6 @@ BUILT_SOURCES += libvirt_probes.h libvirt_probes.stp libvirt_functions.stp if WITH_QEMU libvirt_driver_qemu_la_LIBADD += libvirt_qemu_probes.lo nodist_libvirt_driver_qemu_la_SOURCES = libvirt_qemu_probes.h -libvirt_driver_qemu_la_DEPENDENCIES = libvirt_qemu_probes.lo libvirt_qemu_probes.o $(libvirt_driver_qemu_la_SOURCES): libvirt_qemu_probes.h endif -- 1.7.7.6 -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 05/29/2012 12:51 PM, Eric Blake wrote:
Found it, and I'm pushing this under the build-breaker rule. It's always fun when _deleting_ lines from Makefile.am results in _adding_ lines to Makefile to fix the bug.
From 8a115526e6f64f1ffb2fbff6e29c845f68f66510 Mon Sep 17 00:00:00 2001 From: Eric Blake <eblake@redhat.com> Date: Tue, 29 May 2012 12:41:06 -0600 Subject: [PATCH] build: fix missing dependencies for libvirt-qemu.so
The moment you specify a _DEPENDENCIES, automake (stupidly) assumes that you will specify _all_ dependencies for that target. This stupidity has been fixed in automake 1.12, but we cannot rely on newer automake everywhere. For libvirt_la_DEPENDENCIES, we took care of providing the full list, but for libvirt_qemu_la_DEPENDENCIES, we were missing the dependency on libvirt_qemu_impl.la, which resulted in a failed build:
make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' CCLD libvirt_driver_qemu.la libtool: link: `libvirt_qemu_probes.lo' is not a valid libtool object
* src/Makefile.am (libvirt_driver_qemu_la_DEPENDENCIES): Delete; automake does a better job if it does the entire job.
Except that it didn't entirely fix things. It helped in an incremental build, but not from a fresh checkout. I'm still working on a proper fix, which works from a fresh checkout as well as an incremental build, in both in-tree and VPATH builds. Stay tuned, and I feel bad about the churn. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 05/28/2012 11:36 AM, Dipankar Sarma wrote:
On Mon, May 28, 2012 at 11:13:23AM +0100, Daniel P. Berrange wrote:
On Mon, May 28, 2012 at 02:24:16AM -0400, Alex Jia wrote:
Hi all, I met some compiling error since May 26: <snip> make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' CCLD libvirt_driver_qemu.la libtool: link: `libvirt_qemu_probes.lo' is not a valid libtool object
I see that too
I'm still working on this one...
Notes, in fact, libvirt_driver_qemu.la hasn't been generated: [root@202 libvirt]# find . -name libvirt_driver_qemu.la [root@202 libvirt]# find . -name libvirt_qemu_probes.lo
Yes, it looks like a dependency bug in the Makefile.am - I'm just testing a possible fix
'make rpm' seems to be broken as well right now -
make[2]: *** No rule to make target `locking/test_libvirt_sanlock.aug.in', needed by `distdir'. Stop. make[2]: Leaving directory `/home/dipankar/src/powerpc/libvirt-ppc/src' make[1]: *** [distdir] Error 1
But this one is a typo; I'm pushing the following under the build-breaker rule: From 28dbf01d08cc8623b040df10ae4822706b78fb7e Mon Sep 17 00:00:00 2001 From: Eric Blake <eblake@redhat.com> Date: Tue, 29 May 2012 10:54:50 -0600 Subject: [PATCH] build: don't clean a file that belongs in the tarball Otherwise, 'make rpm' fails with: make[2]: *** No rule to make target `locking/test_libvirt_sanlock.aug.in', needed by `distdir'. Stop. make[2]: Leaving directory `/home/dipankar/src/powerpc/libvirt-ppc/src' make[1]: *** [distdir] Error 1 Reported by Dipankar Sarma. * src/Makefile.am (CLEANFILES): Clean only the generated file. --- src/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index b409802..e172e55 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1359,7 +1359,7 @@ sanlock_la_LIBADD = -lsanlock_client \ augeas_DATA += locking/libvirt_sanlock.aug augeastest_DATA += locking/test_libvirt_sanlock.aug -CLEANFILES += locking/test_libvirt_sanlock.aug.in +CLEANFILES += locking/test_libvirt_sanlock.aug $(builddir)/locking/%-sanlock.conf: $(srcdir)/locking/sanlock.conf $(AM_V_GEN)$(MKDIR_P) locking ; \ -- 1.7.7.6 -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (4)
-
Alex Jia
-
Daniel P. Berrange
-
Dipankar Sarma
-
Eric Blake