Re: [PATCH] virtlogd: Fix build without DBus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 27, 2015 at 11:33:34AM +0000, Daniel P. Berrange wrote:
On Fri, Nov 27, 2015 at 12:19:11PM +0100, Martin Kletzander wrote:
Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>

Could do with a commit message that describes the problem seen,
particularly since the virotatingfile code doesn't use DBus
at all (unless by accident)


It's a bit hard to read it directly from the patch, but it's visible
there.  The binary is mentioned in test_programs, but the rules for it
are defined in a block guarded by #if WITH_DBUS, hence the compilation
fails with:

 CCLD     virrotatingfiletest
/usr/lib/gcc/x86_64-pc-linux-gnu/5.2.0/../../../../lib64/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
Makefile:4507: recipe for target 'virrotatingfiletest' failed
make[2]: *** [virrotatingfiletest] Error 1

---
 tests/Makefile.am | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index b449286f1fb3..e2fb3b7f3b67 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -172,7 +172,6 @@ test_programs = virshtest sockettest \
 	virkeycodetest \
 	virlockspacetest \
 	virlogtest \
-	virrotatingfiletest \
 	virstringtest \
 	virportallocatortest \
 	sysinfotest \
@@ -210,6 +209,7 @@ endif WITH_LIBVIRTD
 if WITH_DBUS
 test_programs += virdbustest \
                  virsystemdtest \
+                 virrotatingfiletest \
                  $(NULL)
 if WITH_POLKIT1
 test_programs += virpolkittest
@@ -1112,7 +1112,9 @@ virsystemdtest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
 virsystemdtest_LDADD = $(LDADDS) $(DBUS_LIBS)

 else ! WITH_DBUS
-EXTRA_DIST += virdbustest.c virmockdbus.c virsystemdtest.c
+EXTRA_DIST += \
+	virdbustest.c virmockdbus.c \
+	virsystemdtest.c virrotatingfiletest.c
 endif ! WITH_DBUS

 viruritest_SOURCES = \

NACK to this, it must be masking a different problem, since the file
code doesn't need dbus at all.


I wouldn't even think of questioning that since the rules look like
this:

virrotatingfiletest_SOURCES = \
	virrotatingfiletest.c testutils.h testutils.c
virrotatingfiletest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
virrotatingfiletest_LDADD = $(LDADDS) $(DBUS_LIBS)

I'll remove the DBUS_* references there and move it out of the
WITH_DBUS block then.  Look for v2 even though it's a build breaker,
just to make sure.

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 :|

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]