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

[libvirt] [PATCH] Fix test case qemuagenttest compilation.

When compiling qemuagenttest, a link error occurs like:
./.libs/libqemumonitortestutils.a(qemumonitortestutils.o): In function `qemuMonitorTestFree':
libvirt/tests/qemumonitortestutils.c:346: undefined reference to `qemuMonitorClose'
./.libs/libqemumonitortestutils.a(qemumonitortestutils.o): In function `qemuMonitorTestNew':
libvirt/tests/qemumonitortestutils.c:870: undefined reference to `qemuMonitorOpen'
collect2: error: ld returned 1 exit status

And I checked this error, it caused by the position of
libqemumonitortestutils.a in gcc arguments.

If libqemumonitortestutils.a before libvirt_driver_qemu_impl.a
and libvirt_driver_network_impl.a, the compilation passed.
Otherwise, failed.

I think this should be a gcc's bug, but nevermind,
just fix it in libvirt.

 tests/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9c578fa..b36922e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -424,7 +424,7 @@ qemuagenttest_SOURCES = \
 	testutils.c testutils.h \
 	testutilsqemu.c testutilsqemu.h \
-qemuagenttest_LDADD = $(qemu_LDADDS) libqemumonitortestutils.la
+qemuagenttest_LDADD = libqemumonitortestutils.la $(qemu_LDADDS) 
 qemuhotplugtest_SOURCES = \
 	qemuhotplugtest.c \

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