[libvirt] [PATCH] storage: fix sheepdog driver / test linking to avoid duplicating source

The libvirt_storage_backend_sheepdog_priv.la library depends on symbols provided in the libvirt_driver_storage_impl.la library. As such the latter must be listed 2nd when passed to the linker to avoid symbol resolution problems. This mistake is being masked by the sheepdog driver linking in a second copy of the storage driver code. Remove this duplicate linkage of backend source and fix the test link order. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- src/Makefile.am | 3 +-- tests/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index d3a01dbbe7..8d72f2f1e5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1359,8 +1359,7 @@ libvirt_storage_backend_sheepdog_la_CFLAGS = \ $(AM_CFLAGS) libvirt_storage_backend_sheepdog_priv_la_SOURCES = \ - $(STORAGE_DRIVER_SHEEPDOG_SOURCES) \ - $(STORAGE_DRIVER_BACKEND_SOURCES) + $(STORAGE_DRIVER_SHEEPDOG_SOURCES) libvirt_storage_backend_sheepdog_priv_la_CFLAGS = \ -I$(srcdir)/conf \ $(AM_CFLAGS) diff --git a/tests/Makefile.am b/tests/Makefile.am index 09647a959d..d794df3e5c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -842,8 +842,8 @@ storagebackendsheepdogtest_SOURCES = \ storagebackendsheepdogtest.c \ testutils.c testutils.h storagebackendsheepdogtest_LDADD = \ - ../src/libvirt_driver_storage_impl.la \ ../src/libvirt_storage_backend_sheepdog_priv.la \ + ../src/libvirt_driver_storage_impl.la \ $(LDADDS) else ! WITH_STORAGE_SHEEPDOG EXTRA_DIST += storagebackendsheepdogtest.c -- 2.14.3

On 02/27/2018 12:30 PM, Daniel P. Berrangé wrote:
The libvirt_storage_backend_sheepdog_priv.la library depends on symbols provided in the libvirt_driver_storage_impl.la library. As such the latter must be listed 2nd when passed to the linker to avoid symbol resolution problems. This mistake is being masked by the sheepdog driver linking in a second copy of the storage driver code. Remove this duplicate linkage of backend source and fix the test link order.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- src/Makefile.am | 3 +-- tests/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
ACK and safe for freeze. Michal
participants (2)
-
Daniel P. Berrangé
-
Michal Privoznik