[PATCH 1/4] build: Use LT_INIT in configure.ac.
Avoids the warning: libtoolize: Remember to add 'LT_INIT' to configure.ac. This is the new name for AC_PROG_LIBTOOL, so I removed that. However to use this macro we must enable AC_USE_SYSTEM_EXTENSIONS. (AC_GNU_SOURCE was removed back in 2011). --- configure.ac | 5 +++++ m4/guestfs-progs.m4 | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9cc3f1a99..f04d77848 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,8 @@ m4_define([HEADING], AC_CONFIG_AUX_DIR([build-aux]) AC_REQUIRE_AUX_FILE([guestfs-test-driver]) +AC_USE_SYSTEM_EXTENSIONS + dnl Initialize automake. AM_INIT_AUTOMAKE(foreign subdir-objects tar-pax) dnl NB: Do not [quote] this parameter. @@ -40,6 +42,9 @@ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. AC_CONFIG_MACRO_DIR([m4]) +dnl Initialize libtool. +LT_INIT + dnl Stable or development version? BRANCH_NUMBER=libguestfs_major.libguestfs_minor AC_SUBST([BRANCH_NUMBER]) diff --git a/m4/guestfs-progs.m4 b/m4/guestfs-progs.m4 index d36c6531e..a36b9ad2d 100644 --- a/m4/guestfs-progs.m4 +++ b/m4/guestfs-progs.m4 @@ -37,7 +37,6 @@ m4_ifdef([AC_PROG_SED],[ # Define $(AWK). AC_PROG_AWK -AC_PROG_LIBTOOL AC_PROG_LN_S dnl Check for cpio which isn't in the default Pardus install amazingly. -- 2.18.0
I was maintaining this list unofficially. Let's maintain it in the sources so it is versioned and branched along with the libguestfs code. --- common-rules.mk | 3 +++ skipped-tests | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/common-rules.mk b/common-rules.mk index b2e8ead2a..5d472d260 100644 --- a/common-rules.mk +++ b/common-rules.mk @@ -20,6 +20,9 @@ -include $(top_builddir)/localenv +# Skipped tests. +include $(top_srcdir)/skipped-tests + # Files that should universally be removed by 'make clean'. Note if # there is any case in any subdirectory where a file should not be # removed by 'make clean', it should not be listed here! diff --git a/skipped-tests b/skipped-tests new file mode 100644 index 000000000..872efe467 --- /dev/null +++ b/skipped-tests @@ -0,0 +1,45 @@ +# -*- Makefile -*- +# libguestfs +# Copyright (C) 2018 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# Parallel test kills libvirt. +export SKIP_TEST_PARALLEL_MOUNT_LOCAL=1 + +# Fails under valgrind because cpio subprocess has a memory leak. +# XXX We should have a way to just skip tests under valgrind. +export SKIP_TEST_FILE_ARCHITECTURE_11=1 +export SKIP_TEST_FILE_ARCHITECTURE_15=1 + +# Fails under valgrind because xzcat subprocess has a memory leak. +export SKIP_TEST_FILE_ARCHITECTURE_17=1 + +# fusermount behaviour seems to have broken the test (RHBZ#1220751). +export SKIP_TEST_FUSE_UMOUNT_RACE_SH=1 +export SKIP_TEST_GUESTMOUNT_FD=1 + +# xfs_admin has no effect in Rawhide (RHBZ#1233220). +export SKIP_TEST_XFS_ADMIN=1 +export SKIP_TEST_XFS_MISC_PL=1 + +# syslinux broken by mtools (RHBZ#1275087). +export SKIP_TEST_SYSLINUX_PL=1 + +# These tests are broken by libvirt not supporting qemu >= 2.10 locking. +export SKIP_TEST820RHBZ912499_PY=1 + +# ntfsclone is broken in Rawhide (RHBZ#1601146). +export SKIP_TEST_NTFSCLONE_SH=1 -- 2.18.0
--- skipped-tests | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skipped-tests b/skipped-tests index 872efe467..89687ea69 100644 --- a/skipped-tests +++ b/skipped-tests @@ -43,3 +43,7 @@ export SKIP_TEST820RHBZ912499_PY=1 # ntfsclone is broken in Rawhide (RHBZ#1601146). export SKIP_TEST_NTFSCLONE_SH=1 + +# This breaks often on debug kernels because the kernel runs out of +# memory. +export SKIP_TEST_255_DISKS_SH=1 -- 2.18.0
--- java/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/Makefile.am b/java/Makefile.am index 81c20f266..1bad9a853 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -122,7 +122,8 @@ libguestfs_jni_la_CFLAGS = \ libguestfs_jni_la_LIBADD = \ $(top_builddir)/common/structs/libstructs.la \ $(top_builddir)/common/utils/libutils.la \ - $(top_builddir)/lib/libguestfs.la + $(top_builddir)/lib/libguestfs.la \ + $(top_builddir)/gnulib/lib/libgnu.la libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO) -shared -- 2.18.0
On Tuesday, 14 August 2018 15:42:13 CEST Richard W.M. Jones wrote:
--- java/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/java/Makefile.am b/java/Makefile.am index 81c20f266..1bad9a853 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -122,7 +122,8 @@ libguestfs_jni_la_CFLAGS = \ libguestfs_jni_la_LIBADD = \ $(top_builddir)/common/structs/libstructs.la \ $(top_builddir)/common/utils/libutils.la \ - $(top_builddir)/lib/libguestfs.la + $(top_builddir)/lib/libguestfs.la \ + $(top_builddir)/gnulib/lib/libgnu.la
Hmm what's the exact error in this case? On which platform? The java binding does not explicitly use the hash stuff from gnulib. -- Pino Toscano
On Wed, Aug 22, 2018 at 12:56:47PM +0200, Pino Toscano wrote:
On Tuesday, 14 August 2018 15:42:13 CEST Richard W.M. Jones wrote:
--- java/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/java/Makefile.am b/java/Makefile.am index 81c20f266..1bad9a853 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -122,7 +122,8 @@ libguestfs_jni_la_CFLAGS = \ libguestfs_jni_la_LIBADD = \ $(top_builddir)/common/structs/libstructs.la \ $(top_builddir)/common/utils/libutils.la \ - $(top_builddir)/lib/libguestfs.la + $(top_builddir)/lib/libguestfs.la \ + $(top_builddir)/gnulib/lib/libgnu.la
Hmm what's the exact error in this case? On which platform?
Fedora 28: Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/rjones/d/libguestfs-master/java/.libs/libguestfs_jni.so.1.39.8: /home/rjones/d/libguestfs-master/java/.libs/libguestfs_jni.so.1.39.8: undefined symbol: hash_free at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at com.redhat.et.libguestfs.GuestFS.<clinit>(GuestFS.java:51) at Bindtests.main(Bindtests.java:33)
The java binding does not explicitly use the hash stuff from gnulib.
It uses the CLEANUP_* macros, and they appear to pull in the hash_free function (via guestfs_int_cleanup_hash_free). What does confuse me is why linking with libutils.a causes the hash_free dependency to be pulled in, since if my understanding of static linking is correct it should only pull in whole object files which are actually used. This I cannot explain. Nevertheless the error message (see above) is repeatable and undeniable evidence that something is wrong. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
On Wednesday, 22 August 2018 16:16:40 CEST Richard W.M. Jones wrote:
On Wed, Aug 22, 2018 at 12:56:47PM +0200, Pino Toscano wrote:
On Tuesday, 14 August 2018 15:42:13 CEST Richard W.M. Jones wrote:
--- java/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/java/Makefile.am b/java/Makefile.am index 81c20f266..1bad9a853 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -122,7 +122,8 @@ libguestfs_jni_la_CFLAGS = \ libguestfs_jni_la_LIBADD = \ $(top_builddir)/common/structs/libstructs.la \ $(top_builddir)/common/utils/libutils.la \ - $(top_builddir)/lib/libguestfs.la + $(top_builddir)/lib/libguestfs.la \ + $(top_builddir)/gnulib/lib/libgnu.la
Hmm what's the exact error in this case? On which platform?
Fedora 28:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/rjones/d/libguestfs-master/java/.libs/libguestfs_jni.so.1.39.8: /home/rjones/d/libguestfs-master/java/.libs/libguestfs_jni.so.1.39.8: undefined symbol: hash_free at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at com.redhat.et.libguestfs.GuestFS.<clinit>(GuestFS.java:51) at Bindtests.main(Bindtests.java:33)
On my Fedora 28, the java tests work fine in both my work copy, and in a new checkout I tried with. I use no particular build flags/settings.
The java binding does not explicitly use the hash stuff from gnulib.
It uses the CLEANUP_* macros, and they appear to pull in the hash_free function (via guestfs_int_cleanup_hash_free).
What does confuse me is why linking with libutils.a causes the hash_free dependency to be pulled in, since if my understanding of static linking is correct it should only pull in whole object files which are actually used. This I cannot explain.
Yes, that was my understanding as well.
Nevertheless the error message (see above) is repeatable and undeniable evidence that something is wrong.
As I said, unfortunately not for me :-/ The thing that makes me puzzling about this is that I actually saw this issue in the past, on a different system (an older version of RHEL 7). But then, trying again later on basically the same system did not show me the issue. As additional data point: so far we did not receive (at least to my knowledge, of course) reports of the java binding broken because of this. Surely this binding is not one of the most used ones, but still... -- Pino Toscano
On Tuesday, 14 August 2018 15:42:10 CEST Richard W.M. Jones wrote:
Avoids the warning: libtoolize: Remember to add 'LT_INIT' to configure.ac.
This is the new name for AC_PROG_LIBTOOL, so I removed that.
However to use this macro we must enable AC_USE_SYSTEM_EXTENSIONS. (AC_GNU_SOURCE was removed back in 2011). ---
LGTM. -- Pino Toscano
participants (2)
-
Pino Toscano -
Richard W.M. Jones