libxml2 causes xdmf2 to link with system icu
Building paraview-superbuild with libxml2 (a Qt dependency) causes xdmf2 to link with system provided ICU. This is a big issue as ICU changes versions often and is of course not packages, making packages incompatible with other systems.
Steps to reproduce:
Start from a clean build dir
cmake -DENABLE_libxml2=ON ../pvsb -GNinja
ninja
$ ldd ./install/lib/libvtkxdmf2-pv5.11.so
linux-vdso.so.1 (0x00007ffc3d7fb000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f49e42f8000)
libvtkhdf5_hl-pv5.11.so.1 => /home/glow/dev/paraview/pvsb/pvsb_b/./install/lib/libvtkhdf5_hl-pv5.11.so.1 (0x00007f49e42d2000)
libvtkhdf5-pv5.11.so.1 => /home/glow/dev/paraview/pvsb/pvsb_b/./install/lib/libvtkhdf5-pv5.11.so.1 (0x00007f49e3e00000)
libxml2.so.2 => /home/glow/dev/paraview/pvsb/pvsb_b/./install/lib/libxml2.so.2 (0x00007f49e3c36000)
libicuuc.so.72 => /usr/lib/libicuuc.so.72 (0x00007f49e3a00000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f49e3600000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f49e3918000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f49e42b0000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f49e4570000)
libvtkzlib-pv5.11.so.1 => /home/glow/dev/paraview/pvsb/pvsb_b/./install/lib/libvtkzlib-pv5.11.so.1 (0x00007f49e4292000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f49e4278000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f49e424e000)
libicudata.so.72 => /usr/lib/libicudata.so.72 (0x00007f49e1800000)
however libxml2 do not link with icu
$ ldd ./install/lib/libxml2.so
linux-vdso.so.1 (0x00007fff30d9a000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f160cf58000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f160cf2e000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f160ce46000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f160cc5f000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f160d15e000)
And forcing ParaView to use libxml2 VTK third party fixes the issue (-DVTK_MODULE_USE_EXTERNAL_VTK_libxml2=OFF
).
I think the linking logic in vtkxdmf2 is not working for some reason, but I have not figured it out yet.