[libvirt] [PATCH 0/2] Fix a couple build issues

Recent adjustment to add XML namespace processing for storage pool XML processing broke the mingw* builds: CC storagevolxml2xmltest.o gmake[2]: *** No rule to make target '../src/libvirt_driver_storage_impl.la', needed by 'storagepoolxml2xmltest.exe'. Stop. gmake[2]: *** Waiting for unfinished jobs.... CC storagepoolxml2xmltest.o So looking at things again, I see that other options that include ../src/libvirt_driver_storage_impl.la would be inside a WITH_STORAGE conditional. So move the build to that and alter the ! WITH_STORAGE as well. Seeing this, I also see that I didn't add storagepoolxml2argv.c to the ! WITH_STORAGE either, so that's the second patch. Build works for me, but I have no idea if it'll work for mingw* - I am assuming so based on other examples. Another alternative is to not test the XML namespace processing for storagepoolxml2xml - although given that it seems mingw* doesn't build/support storage anyway, perhaps not the correct alternative. John Ferlan (2): tests: Fix build issue with storagevolxml2xmltest tests: Add storagepoolxml2argvtest source to EXTRA_DIST tests/Makefile.am | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) -- 2.20.1

Commit 7a227688a caused a build failure on mingw. Following other uses of including ../src/libvirt_driver_storage_impl.la I moved to under the WITH_STORAGE conditional. Signed-off-by: John Ferlan <jferlan@redhat.com> --- tests/Makefile.am | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index ab4c716529..c034fe0bf3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -368,6 +368,7 @@ if WITH_STORAGE test_programs += storagevolxml2argvtest test_programs += storagepoolxml2argvtest test_programs += virstorageutiltest +test_programs += storagepoolxml2xmltest endif WITH_STORAGE if WITH_STORAGE_FS @@ -384,7 +385,7 @@ test_programs += nsstest nssguesttest test_libraries += nssmock.la endif WITH_NSS -test_programs += storagevolxml2xmltest storagepoolxml2xmltest +test_programs += storagevolxml2xmltest test_programs += nodedevxml2xmltest @@ -924,9 +925,17 @@ storagepoolxml2argvtest_LDADD = \ ../src/libvirt_util.la \ $(LDADDS) +storagepoolxml2xmltest_SOURCES = \ + storagepoolxml2xmltest.c \ + testutils.c testutils.h +storagepoolxml2xmltest_LDADD = $(LDADDS) \ + ../src/libvirt_driver_storage_impl.la \ + $(GNULIB_LIBS) + else ! WITH_STORAGE EXTRA_DIST += storagevolxml2argvtest.c EXTRA_DIST += virstorageutiltest.c +EXTRA_DIST += storagepoolxml2xmltest.c endif ! WITH_STORAGE storagevolxml2xmltest_SOURCES = \ @@ -934,13 +943,6 @@ storagevolxml2xmltest_SOURCES = \ testutils.c testutils.h storagevolxml2xmltest_LDADD = $(LDADDS) -storagepoolxml2xmltest_SOURCES = \ - storagepoolxml2xmltest.c \ - testutils.c testutils.h -storagepoolxml2xmltest_LDADD = $(LDADDS) \ - ../src/libvirt_driver_storage_impl.la \ - $(GNULIB_LIBS) - nodedevxml2xmltest_SOURCES = \ nodedevxml2xmltest.c \ testutils.c testutils.h -- 2.20.1

Commit f2f84b4d4 added storagepoolxml2argvtest processing; however, it didn't follow alter the else to !WITH_STORAGE and add the source itself to the EXTRA_DIST like the other WITH_STORAGE options for virstorageutiltest and storagevolxml2argvtest. Signed-off-by: John Ferlan <jferlan@redhat.com> --- tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index c034fe0bf3..bdf7154fd5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -935,6 +935,7 @@ storagepoolxml2xmltest_LDADD = $(LDADDS) \ else ! WITH_STORAGE EXTRA_DIST += storagevolxml2argvtest.c EXTRA_DIST += virstorageutiltest.c +EXTRA_DIST += storagepoolxml2argvtest.c EXTRA_DIST += storagepoolxml2xmltest.c endif ! WITH_STORAGE -- 2.20.1

On 1/30/19 3:40 PM, John Ferlan wrote:
Recent adjustment to add XML namespace processing for storage pool XML processing broke the mingw* builds:
CC storagevolxml2xmltest.o gmake[2]: *** No rule to make target '../src/libvirt_driver_storage_impl.la', needed by 'storagepoolxml2xmltest.exe'. Stop. gmake[2]: *** Waiting for unfinished jobs.... CC storagepoolxml2xmltest.o
So looking at things again, I see that other options that include ../src/libvirt_driver_storage_impl.la would be inside a WITH_STORAGE conditional. So move the build to that and alter the ! WITH_STORAGE as well.
Seeing this, I also see that I didn't add storagepoolxml2argv.c to the ! WITH_STORAGE either, so that's the second patch.
Build works for me, but I have no idea if it'll work for mingw* - I am assuming so based on other examples. Another alternative is to not test the XML namespace processing for storagepoolxml2xml - although given that it seems mingw* doesn't build/support storage anyway, perhaps not the correct alternative.
John Ferlan (2): tests: Fix build issue with storagevolxml2xmltest tests: Add storagepoolxml2argvtest source to EXTRA_DIST
tests/Makefile.am | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
ACK Michal
participants (2)
-
John Ferlan
-
Michal Privoznik