On Fri, May 31, 2024 at 11:06:31AM -0500, Eric Blake wrote: > Fedora 40 recently changed to move malloc debugging out of glibc into > glibc-utils (https://issues.redhat.com/browse/RHEL-35971). Reflect > that in our CI, to avoid spurious test failures from tons of messages > like: > > ERROR: ld.so: object 'libc_malloc_debug.so.0' from LD_PRELOAD cannot be > preloaded (cannot open shared object file): ignored. > > by regenerating with > https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/491 > > Also, change configure.ac to gracefully skip malloc debugging when > glibc-utils is not installed.
I don't really have anything useful to say here. If it works, then it works! Thanks, Rich. > Signed-off-by: Eric Blake <ebl...@redhat.com> > --- > > I plan on pushing this once my libvirt-ci merge request is accepted > (this may need tweaking based on reviews on that side of things) > > configure.ac | 9 +++++++-- > README.md | 1 + > ci/buildenv/fedora-39.sh | 1 + > ci/buildenv/fedora-40-cross-mingw32.sh | 1 + > ci/buildenv/fedora-40-cross-mingw64.sh | 1 + > ci/buildenv/fedora-40.sh | 1 + > ci/buildenv/fedora-rawhide.sh | 1 + > ci/containers/fedora-39.Dockerfile | 1 + > ci/containers/fedora-40-cross-mingw32.Dockerfile | 1 + > ci/containers/fedora-40-cross-mingw64.Dockerfile | 1 + > ci/containers/fedora-40.Dockerfile | 1 + > ci/containers/fedora-rawhide.Dockerfile | 1 + > ci/lcitool/projects/nbdkit.yml | 1 + > 13 files changed, 19 insertions(+), 2 deletions(-) > > diff --git a/configure.ac b/configure.ac > index aaff4aae..89187b45 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -622,14 +622,19 @@ AS_IF([test "x$is_windows" = "xyes"],[ > dnl See if getaddrinfo requires an external library. > AC_SEARCH_LIBS([getaddrinfo], [network socket]) > > -dnl Does this platform require libc_malloc_debug.so.0 (glibc >= 2.34)? > +dnl Does this platform support libc_malloc_debug.so.0 (glibc >= 2.34)? > AC_MSG_CHECKING([if this is glibc >= 2.34]) > AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ > #include <limits.h> > #if !defined(__GLIBC__) || __GLIBC__ < 2 || (__GLIBC__ == 2 && > __GLIBC_MINOR__ < 34) > #error "not glibc 2.34" > #endif > - ]])], [is_glibc_234=yes], [is_glibc_234=no] > + ]])], > + [if (LD_PRELOAD=libc_malloc_debug.so.0 /bin/true) 2>&1 | grep -v .; then > + is_glibc_234=yes > + else > + is_glibc_234='missing suitable libc_malloc_debug.so.0' > + fi], [is_glibc_234=no] > ) > AC_MSG_RESULT([$is_glibc_234]) > AM_CONDITIONAL([HAVE_GLIBC_234], [test "x$is_glibc_234" = "xyes"]) > diff --git a/README.md b/README.md > index 2f9452c8..02ed7644 100644 > --- a/README.md > +++ b/README.md > @@ -184,6 +184,7 @@ For non-essential enhancements to the test suite: > * hexdump > * ip, ss (from iproute package) > * jq > +* libc_malloc_debug.so.0 (from glibc-utils) > * losetup (from util-linux) > * mke2fs (from e2fsprogs) > * nbdcopy, nbdinfo, nbdsh (from libnbd) > diff --git a/ci/buildenv/fedora-39.sh b/ci/buildenv/fedora-39.sh > index 98ee274f..638badbd 100644 > --- a/ci/buildenv/fedora-39.sh > +++ b/ci/buildenv/fedora-39.sh > @@ -25,6 +25,7 @@ function install_buildenv() { > gcc-c++ \ > genisoimage \ > git \ > + glibc \ > glibc-langpack-en \ > gnutls-devel \ > golang \ > diff --git a/ci/buildenv/fedora-40-cross-mingw32.sh > b/ci/buildenv/fedora-40-cross-mingw32.sh > index 8de2a5dd..b1638bfa 100644 > --- a/ci/buildenv/fedora-40-cross-mingw32.sh > +++ b/ci/buildenv/fedora-40-cross-mingw32.sh > @@ -22,6 +22,7 @@ function install_buildenv() { > genisoimage \ > git \ > glibc-langpack-en \ > + glibc-utils \ > golang \ > gzip \ > iproute \ > diff --git a/ci/buildenv/fedora-40-cross-mingw64.sh > b/ci/buildenv/fedora-40-cross-mingw64.sh > index e7013c38..2965e0e7 100644 > --- a/ci/buildenv/fedora-40-cross-mingw64.sh > +++ b/ci/buildenv/fedora-40-cross-mingw64.sh > @@ -22,6 +22,7 @@ function install_buildenv() { > genisoimage \ > git \ > glibc-langpack-en \ > + glibc-utils \ > golang \ > gzip \ > iproute \ > diff --git a/ci/buildenv/fedora-40.sh b/ci/buildenv/fedora-40.sh > index 98ee274f..5f90faa4 100644 > --- a/ci/buildenv/fedora-40.sh > +++ b/ci/buildenv/fedora-40.sh > @@ -26,6 +26,7 @@ function install_buildenv() { > genisoimage \ > git \ > glibc-langpack-en \ > + glibc-utils \ > gnutls-devel \ > golang \ > gzip \ > diff --git a/ci/buildenv/fedora-rawhide.sh b/ci/buildenv/fedora-rawhide.sh > index 88a8dfdc..e11fe698 100644 > --- a/ci/buildenv/fedora-rawhide.sh > +++ b/ci/buildenv/fedora-rawhide.sh > @@ -27,6 +27,7 @@ function install_buildenv() { > genisoimage \ > git \ > glibc-langpack-en \ > + glibc-utils \ > gnutls-devel \ > golang \ > gzip \ > diff --git a/ci/containers/fedora-39.Dockerfile > b/ci/containers/fedora-39.Dockerfile > index bf9f8ff4..0908b026 100644 > --- a/ci/containers/fedora-39.Dockerfile > +++ b/ci/containers/fedora-39.Dockerfile > @@ -36,6 +36,7 @@ exec "$@"\n' > /usr/bin/nosync && \ > gcc-c++ \ > genisoimage \ > git \ > + glibc \ > glibc-langpack-en \ > gnutls-devel \ > golang \ > diff --git a/ci/containers/fedora-40-cross-mingw32.Dockerfile > b/ci/containers/fedora-40-cross-mingw32.Dockerfile > index 963b836b..e90b7492 100644 > --- a/ci/containers/fedora-40-cross-mingw32.Dockerfile > +++ b/ci/containers/fedora-40-cross-mingw32.Dockerfile > @@ -33,6 +33,7 @@ exec "$@"\n' > /usr/bin/nosync && \ > genisoimage \ > git \ > glibc-langpack-en \ > + glibc-utils \ > golang \ > gzip \ > iproute \ > diff --git a/ci/containers/fedora-40-cross-mingw64.Dockerfile > b/ci/containers/fedora-40-cross-mingw64.Dockerfile > index 58554b97..90f8f752 100644 > --- a/ci/containers/fedora-40-cross-mingw64.Dockerfile > +++ b/ci/containers/fedora-40-cross-mingw64.Dockerfile > @@ -33,6 +33,7 @@ exec "$@"\n' > /usr/bin/nosync && \ > genisoimage \ > git \ > glibc-langpack-en \ > + glibc-utils \ > golang \ > gzip \ > iproute \ > diff --git a/ci/containers/fedora-40.Dockerfile > b/ci/containers/fedora-40.Dockerfile > index 1b37f724..2aba9a66 100644 > --- a/ci/containers/fedora-40.Dockerfile > +++ b/ci/containers/fedora-40.Dockerfile > @@ -37,6 +37,7 @@ exec "$@"\n' > /usr/bin/nosync && \ > genisoimage \ > git \ > glibc-langpack-en \ > + glibc-utils \ > gnutls-devel \ > golang \ > gzip \ > diff --git a/ci/containers/fedora-rawhide.Dockerfile > b/ci/containers/fedora-rawhide.Dockerfile > index 034f621f..e08dc12b 100644 > --- a/ci/containers/fedora-rawhide.Dockerfile > +++ b/ci/containers/fedora-rawhide.Dockerfile > @@ -38,6 +38,7 @@ exec "$@"\n' > /usr/bin/nosync && \ > genisoimage \ > git \ > glibc-langpack-en \ > + glibc-utils \ > gnutls-devel \ > golang \ > gzip \ > diff --git a/ci/lcitool/projects/nbdkit.yml b/ci/lcitool/projects/nbdkit.yml > index 1f2fe259..979ab23a 100644 > --- a/ci/lcitool/projects/nbdkit.yml > +++ b/ci/lcitool/projects/nbdkit.yml > @@ -23,6 +23,7 @@ packages: > - hexdump > - ip > - jq > + - libc-malloc-debug > - libcurl > - libguestfs > - liblzma > -- > 2.45.1 > _______________________________________________ > Libguestfs mailing list -- guestfs@lists.libguestfs.org > To unsubscribe send an email to guestfs-le...@lists.libguestfs.org -- 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 _______________________________________________ Libguestfs mailing list -- guestfs@lists.libguestfs.org To unsubscribe send an email to guestfs-le...@lists.libguestfs.org