[libvirt] [PATCH] make sure libvirt is linked first
Daniel P. Berrangé
berrange at redhat.com
Mon Mar 5 14:21:07 UTC 2018
On Mon, Mar 05, 2018 at 03:04:48PM +0100, Jan Palus wrote:
> so it's not affected by flags that might be passed in $(*_LIBS) like
> -L/usr/lib which might result in linking against system library and
> requiring incorrect version of private symbols
Ewww, nasty problem.
> ---
> src/Makefile.am | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 3bf2da5..cb6ee84 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -1456,10 +1456,11 @@ libvirt_driver_nwfilter_impl_la_CFLAGS = \
> $(AM_CFLAGS)
> libvirt_driver_nwfilter_impl_la_LDFLAGS = $(AM_LDFLAGS)
> libvirt_driver_nwfilter_impl_la_LIBADD = \
> + libvirt.la \
> $(LIBPCAP_LIBS) \
> $(LIBNL_LIBS) \
> - $(DBUS_LIBS)
> -libvirt_driver_nwfilter_impl_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
> + $(DBUS_LIBS) \
> + ../gnulib/lib/libgnu.la
> libvirt_driver_nwfilter_impl_la_SOURCES = $(NWFILTER_DRIVER_SOURCES)
> endif WITH_NWFILTER
Although you tripped up on DBUS_LIBS - it looks like there are quite a
few cases of this problem present in the various modules.
eg libvirt_storage_backend_mpath_la_LIBADD can break if DEVMAPPER_LIBS
had similar issue.
Same for libvirt_storage_backend_rbd_la_LIBADD and much more.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list