From: Roman Bogorodskiy Date: Sun, 14 Aug 2016 23:18:35 +0000 (+0300) Subject: tests: fix domaincapstest linking for libxl X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=da5dfd0e06cac740f746bcc7c839f839c4d64c30;p=libvirt.git tests: fix domaincapstest linking for libxl Commit 11567cf added some libxl tests into domaincapstest and added libvirt_driver_libxl_impl.la to domaincapstest_LDADD. This causes link fail on systems without GNU regex implementation: gmake[2]: Entering directory '/usr/home/novel/code/libvirt/tests' CCLD domaincapstest ../src/.libs/libvirt_driver_libxl_impl.a(libvirt_driver_libxl_impl_la-libxl_capabilities.o): In function `libxlMakeCapabilities': libxl/libxl_capabilities.c:(.text+0x6b2): undefined reference to `rpl_regcomp' libxl/libxl_capabilities.c:(.text+0x6d0): undefined reference to `rpl_regerror' libxl/libxl_capabilities.c:(.text+0x803): undefined reference to `rpl_regexec' libxl/libxl_capabilities.c:(.text+0xa58): undefined reference to `rpl_regfree' clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation) This happens because on these system it tries to use gnulib's builtin regex implementation, but doesn't link to gnulib. Fix by adding $(GNULIB_LIBS) along with libvirt_driver_libxl_impl.la to domaincapstest_LDADD. --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 5714d11571..0cd8391184 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -953,7 +953,7 @@ endif WITH_QEMU if WITH_LIBXL domaincapstest_SOURCES += testutilsxen.c testutilsxen.h -domaincapstest_LDADD += ../src/libvirt_driver_libxl_impl.la +domaincapstest_LDADD += ../src/libvirt_driver_libxl_impl.la $(GNULIB_LIBS) endif WITH_LIBXL virnetmessagetest_SOURCES = \