[libvirt] [PATCH] Link xen driver against libxl

Jiri Denemark jdenemar at redhat.com
Tue Apr 5 11:16:27 UTC 2016


On Thu, Mar 31, 2016 at 17:01:49 +0200, Guido Günther wrote:
> to avoid the test failure
> 
>  7) Test driver "xen"  ... 2016-03-31 12:53:26.950+0000: 22430: debug : virDriverLoadModule:54 : Module load xen
>  2016-03-31 12:53:26.950+0000: 22430: error : virDriverLoadModule:73 : failed to load module /build/libvirt-1.3.3~rc1/debian/build/src/.libs/libvirt_driver_xen.so /build/libvirt-1.3.3~rc1/debian/build/src/.libs/libvirt_driver_xen.so: undefined symbol: xlu_cfg_destroy
> FAILED
> ---
> 
> I have not yet investigated how this change came about so this is more
> of a RFC.
> 
>  src/Makefile.am | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 1726d06..5f37607 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -1218,7 +1218,9 @@ libvirt_driver_xen_impl_la_CFLAGS =				\
>  		-I$(srcdir)/xenconfig				\
>  		$(AM_CFLAGS)
>  libvirt_driver_xen_impl_la_LDFLAGS = $(AM_LDFLAGS)
> -libvirt_driver_xen_impl_la_LIBADD = $(XEN_LIBS) libvirt_xenconfig.la
> +libvirt_driver_xen_impl_la_LIBADD = $(XEN_LIBS) \
> +		$(LIBXL_LIBS) \
> +		libvirt_xenconfig.la
>  libvirt_driver_xen_impl_la_SOURCES = $(XEN_DRIVER_SOURCES)
>  endif WITH_XEN

The xlu_cfg_destroy symbol usage comes from libvirt_xenconfig.la, which
is built from XENCONFIG_SOURCES, which contains xenconfig/xen_xl.[ch] if
WITH_LIBXL is set. In other words, libvirt_xenconfig.la should be fixed
to bring $(LIBXL_LIBS) if required.

I'd suggest something like

if WITH_LIBXL
libvirt_xenconfig_la_LIBADD = $(LIBXL_LIBS)
endif

should be inserted where libvirt_xenconfig_la_CFLAGS is set.

Untested, though.

Jirka




More information about the libvir-list mailing list