[libvirt] [PATCH] Fix linkage of virt-aa-helper with numa library

From: "Daniel P. Berrange" <berrange@redhat.com> The recent commit moved some of the use of libnuma out of the driver code, and into src/util/. It did not, however, update libvirt_util.la to link against libnuma. This caused linkage failure with virt-aa-helper, since nothing else caused libnuma to be pulled onto the linker command line. The fix removes all reference to NUMACTL_LIBS/CFLAGS from the various modules in src/Makefile.am and just adds them to the libvirt_util.la module, which everything else depends on. Technically a build-breaker fix, but wanted to wait for feedback on this Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- src/Makefile.am | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 21f8882..3f69d39 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -768,11 +768,11 @@ libvirt_util_la_SOURCES = \ $(UTIL_SOURCES) libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \ $(AM_CFLAGS) $(AUDIT_CFLAGS) $(DEVMAPPER_CFLAGS) \ - $(DBUS_CFLAGS) $(LDEXP_LIBM) + $(DBUS_CFLAGS) $(LDEXP_LIBM) $(NUMACTL_CFLAGS) libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \ $(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \ $(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(MSCOM_LIBS) $(LIBXML_LIBS) \ - $(SECDRIVER_LIBS) + $(SECDRIVER_LIBS) $(NUMACTL_LIBS) noinst_LTLIBRARIES += libvirt_conf.la @@ -809,10 +809,10 @@ libvirt_la_BUILT_LIBADD += libvirt_driver.la libvirt_driver_la_SOURCES = $(DRIVER_SOURCES) libvirt_driver_la_CFLAGS = \ - $(NUMACTL_CFLAGS) $(GNUTLS_CFLAGS) $(CURL_CFLAGS) \ + $(GNUTLS_CFLAGS) $(CURL_CFLAGS) \ -I$(top_srcdir)/src/conf $(AM_CFLAGS) libvirt_driver_la_LIBADD = \ - $(NUMACTL_LIBS) $(GNUTLS_LIBS) $(CURL_LIBS) $(DLOPEN_LIBS) + $(GNUTLS_LIBS) $(CURL_LIBS) $(DLOPEN_LIBS) SYM_FILES = $(USED_SYM_FILES) USED_SYM_FILES = $(srcdir)/libvirt_private.syms @@ -958,13 +958,11 @@ noinst_LTLIBRARIES += libvirt_driver_qemu.la #libvirt_la_BUILT_LIBADD += libvirt_driver_qemu.la endif -libvirt_driver_qemu_impl_la_CFLAGS = $(NUMACTL_CFLAGS) \ - $(GNUTLS_CFLAGS) \ +libvirt_driver_qemu_impl_la_CFLAGS = $(GNUTLS_CFLAGS) \ $(LIBNL_CFLAGS) \ -I$(top_srcdir)/src/conf $(AM_CFLAGS) libvirt_driver_qemu_impl_la_LDFLAGS = $(AM_LDFLAGS) -libvirt_driver_qemu_impl_la_LIBADD = $(NUMACTL_LIBS) \ - $(CAPNG_LIBS) \ +libvirt_driver_qemu_impl_la_LIBADD = $(CAPNG_LIBS) \ $(GNUTLS_LIBS) \ $(LIBNL_LIBS) libvirt_driver_qemu_impl_la_SOURCES = $(QEMU_DRIVER_SOURCES) @@ -1029,10 +1027,10 @@ noinst_LTLIBRARIES += libvirt_driver_uml.la #libvirt_la_BUILT_LIBADD += libvirt_driver_uml.la endif -libvirt_driver_uml_impl_la_CFLAGS = $(NUMACTL_CFLAGS) \ +libvirt_driver_uml_impl_la_CFLAGS = \ -I$(top_srcdir)/src/conf $(AM_CFLAGS) libvirt_driver_uml_impl_la_LDFLAGS = $(AM_LDFLAGS) -libvirt_driver_uml_impl_la_LIBADD = $(NUMACTL_LIBS) +# libvirt_driver_uml_impl_la_LIBADD = libvirt_driver_uml_impl_la_SOURCES = $(UML_DRIVER_SOURCES) endif @@ -1969,7 +1967,6 @@ libvirt_lxc_SOURCES = \ $(DATATYPES_SOURCES) libvirt_lxc_LDFLAGS = $(WARN_CFLAGS) $(AM_LDFLAGS) libvirt_lxc_LDADD = \ - $(NUMACTL_LIBS) \ $(FUSE_LIBS) \ libvirt-net-rpc-server.la \ libvirt-net-rpc.la \ -- 1.8.1.4

On 20.03.2013 16:02, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
The recent commit moved some of the use of libnuma out of the driver code, and into src/util/. It did not, however, update libvirt_util.la to link against libnuma. This caused linkage failure with virt-aa-helper, since nothing else caused libnuma to be pulled onto the linker command line.
The fix removes all reference to NUMACTL_LIBS/CFLAGS from the various modules in src/Makefile.am and just adds them to the libvirt_util.la module, which everything else depends on.
Technically a build-breaker fix, but wanted to wait for feedback on this
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- src/Makefile.am | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
ACK Michal

On 20.03.2013 17:10, Michal Privoznik wrote:
On 20.03.2013 16:02, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
The recent commit moved some of the use of libnuma out of the driver code, and into src/util/. It did not, however, update libvirt_util.la to link against libnuma. This caused linkage failure with virt-aa-helper, since nothing else caused libnuma to be pulled onto the linker command line.
The fix removes all reference to NUMACTL_LIBS/CFLAGS from the various modules in src/Makefile.am and just adds them to the libvirt_util.la module, which everything else depends on.
Technically a build-breaker fix, but wanted to wait for feedback on this
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- src/Makefile.am | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
ACK
Michal
Even though I don't like pushing other commiters patches, I've pushed this one as it's a build breaker. Michal

On Thu, Mar 21, 2013 at 10:05:50AM +0100, Michal Privoznik wrote:
On 20.03.2013 17:10, Michal Privoznik wrote:
On 20.03.2013 16:02, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
The recent commit moved some of the use of libnuma out of the driver code, and into src/util/. It did not, however, update libvirt_util.la to link against libnuma. This caused linkage failure with virt-aa-helper, since nothing else caused libnuma to be pulled onto the linker command line.
The fix removes all reference to NUMACTL_LIBS/CFLAGS from the various modules in src/Makefile.am and just adds them to the libvirt_util.la module, which everything else depends on.
Technically a build-breaker fix, but wanted to wait for feedback on this
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- src/Makefile.am | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
ACK
Michal
Even though I don't like pushing other commiters patches, I've pushed this one as it's a build breaker.
Thanks, forgot todo this before i left last night 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 :|
participants (2)
-
Daniel P. Berrange
-
Michal Privoznik