On Mon, 2020-01-20 at 10:19 -0300, Andreas Hasenack wrote: > Hi there, > > Debian dropped[1] xml2-config from libxml2-dev in experimental, > favoring the use of pkg-config instead. This caused some packages to > fail to build, autofs among them[2]. > > I'm submitting the attached patch for your consideration and > review/comments. I realize this is a distro change and shouldn't > affect autofs building when everything is installed from source, > unless libxml2 upstream decides to follow suit and drop xml2-config > as > well. It's been a while but IIRC the point of that check was to set LIBXML2_WORKAROUND if libxml2 is being used because a shared library usage bug in libxml2 was unlikely to ever be resolved within the upstream package. And this change ensures that LIBXML2_WORKAROUND isn't set so you could start seeing crashes at automount exit due to incorrect shared library usage of Thread Specific Data (TSD) create and destroy, see commits a60e2583d, a5958245c and related commits. IIRC, basically libxml2 uses a shared library function as the TSD destructor which will not be available at program exit if (/when) the shared library has already been unloaded => crash. The logic in that autoconf function isn't great so getting rid of it is fine but LIBXML2_WORKAROUND should be set if libxml2 is being used. I'm don't know if "libxml-2.0" in that function invocation will work with all distros so that's really the only question to getting rid of the original function. > > Thanks! > > > 1. > https://salsa.debian.org/xml-sgml-team/libxml2/commit/53de4f8ae1469e9068a6ab341836e523324c64c3 > 2. https://bugs.debian.org/949055