vglibdir is the directory from where valgrind loads its internal executables, vgpreload and static tools. Currently vglibdir is pkglibdir, so those internal tools are intermingeled with normal executables and libraries that the user might use directly. Make vglibdir equal to pkglibexecdir so the internal tools get installed and loaded from libexec and don't get get stored under lib. This leaves just the static archives and the mpiwrapper libraries that the user would link/load themselves under lib. This seems more in line with the FHS lib/libexec standard and makes it slightly easier to combine the tools from a multilib target (say the memcheck-amd64-linux and memcheck-x86-linux tools) because they would be installed under the same directory, while the pkglibdir can differ depending on arch/target (lib/lib64).
Created attachment 135964 [details] Use pkglibexec as vglibdir
Note that libexec usage varies quite a bit across distros - it's not used much on Ubuntu for example but is on Fedora. Bizarrely valgrind is one of the few packages that does seem to use libexec on Ubuntu, but only for the DHAT html/js/css files, which seems very odd.
(In reply to Tom Hughes from comment #2) > Note that libexec usage varies quite a bit across distros - it's not used > much on Ubuntu for example but is on Fedora. Yes, I have been using it on Fedora for some time (since 3.16.0 at least). But it should be distro independent. And is more in spirit of the FHS and how automake intends pkglibdir vs pkglibexecdir to be used. > Bizarrely valgrind is one of the few packages that does seem to use libexec > on Ubuntu, but only for the DHAT html/js/css files, which seems very odd. I think it depends on how you look at those files. Note that we used to also install those under pkglibdir, which also seemed wrong/weird. If you see them as executables (which at least the js/css are) intended to be run by other programs (webbrowsers) then libexec makes sense. But maybe there is a different standard place to install those programs? Where they are installed is controlled by the dhatdir variable defined in dhat/Makefile.am.
Note that Debian only recently (2018) started following FHS 3.0 which allows libexec use. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834607 Which probably explains why it isn't yet widely used on Debian.
commit c9d1cd0db3a806ee0b2e91f59261d6caf791ffee Author: Mark Wielaard <mark@klomp.org> Date: Fri Feb 19 23:49:10 2021 +0100 Use pkglibexec as vglibdir. vglibdir is the directory from where valgrind loads its internal tool executables and vgpreloads. Currently vglibdir is pkglibdir, so those internal tools are intermingeled with normal executables and libraries that the user might use directly. Make vglibdir equal to pkglibexecdir so the internal tools get installed and loaded from libexec and don't get get stored under lib. This leaves just the static archives and the mpiwrapper libraries that the user would link/load themselves under pkglibdir. This seems more in line with the FHS lib/libexec standard and makes it slightly easier to combine the tools from a multilib target (say the memcheck-amd64-linux and memcheck-x86-linux tools) because they would be installed under the same directory, while the pkglibdir can differ depending on arch/target (lib/lib64). https://bugs.kde.org/show_bug.cgi?id=433323