Bug#968559: libhdf5-openmpi-dev: hdf5-mpi.pc alternative sometimes goes missing
Hello, I have just migrated from Buster to Bullseye. The package libhdf5-mpi-dev was and is not installed on my box. However `update-alternatives --display hdf5.pc` outputs hdf5.pc - auto mode link best version is /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-mpi.pc link currently points to /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-mpi.pc link hdf5.pc is /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5.pc /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-mpi.pc - priority 35 /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-mpich.pc - priority 10 /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-serial.pc - priority 20 The disturbing thing is that /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-mpi.pc points to /dev/null I guess that this issue is related to this bug. HTH, Jerome -- Jerome BENOIT | calculus+at-rezozer^dot*net https://qa.debian.org/developer.php?login=calcu...@rezozer.net AE28 AE15 710D FF1D 87E5 A762 3F92 19A6 7F36 C68B OpenPGP_signature Description: OpenPGP digital signature
Bug#968559: libhdf5-openmpi-dev: hdf5-mpi.pc alternative sometimes goes missing
Drew Parsons a écrit le 08/11/2020 à 05:17 : > Probably we should check with the update-alternatives developers first, > they may have some ideas. Certainly they should be able to explain > exactly why installing openmpi-bin or mpich causes the hdf5-mpi > alternative to disappear. Would you mind opening these discussions? Thanks, _g. signature.asc Description: OpenPGP digital signature
Bug#968559: libhdf5-openmpi-dev: hdf5-mpi.pc alternative sometimes goes missing
On 2020-11-08 03:08, Gilles Filippini wrote: After a test into a clean chroot I can now confirm this hypothesis. The loss of the alternative is easily triggered by the reinstallation of openmpi-bin ... It happens when reinstalling mpich as well, if the mpi alternative was previously set to mpich. I have no idea how to fix it, other than asking openmpi and mpich maintainers to take care of the hdf5-mpi.pc slave alternative when it exists. What do you think? Probably we should check with the update-alternatives developers first, they may have some ideas. Certainly they should be able to explain exactly why installing openmpi-bin or mpich causes the hdf5-mpi alternative to disappear. There is a precedent for collecting dpkg triggers and running them all at the same time late in a dpkg (or apt) run, e.g manpages, dkms. Otherwise, could request it be done by the openmpi-bin and mpich packages. I thought it could be good leave the actual alternatives logic in hdf5, and put into openmpi-bin.postinst something like if dpkg -s libhdf5-openmpi-dev >/dev/null 2>&1; then dpkg-reconfigure libhdf5-openmpi-dev fi But at irc #debian-devel they pointed out that won't work: you can't run dpkg-reconfigure inside postinst since the dpkg lock will be in place. Another option is to just make a copy of the alternative logic in libhdf5-openmpi-dev.postinst, copying it to openmpi-bin.postinst. A bit messy but might get the job done. Figuring out how to set up dpkg triggers might be tidier. Drew
Bug#968559: libhdf5-openmpi-dev: hdf5-mpi.pc alternative sometimes goes missing
Gilles Filippini a écrit le 07/11/2020 à 19:36 : > Drew Parsons a écrit le 06/11/2020 à 04:02 : >> On 2020-11-06 02:09, Gilles Filippini wrote: But we should document (or fix if possible) that this alternatives mechanism is a little fragile, and sometimes the link needs to be refresh with sudo dpkg-reconfigure libhdf5-openmpi-dev What I mean is that sometimes the link seem to just disappear, so we get $ pkg-config --libs hdf5-mpi Package hdf5-mpi was not found in the pkg-config search path. >> ... >>> >>> Do you have a scenario leading to this alternative disparition? >>> >> >> >> It's not completely clear to me. But my suspicion is that it happens >> when there is an upgrade to openmpi. Evidently then hdf5 needs to update >> its alternatives against the updated openmpi. >> >> It's a little strange though, since a simple openmpi update is not an >> ABI update. The alternatives links would be the same after running >> dpkg-reconfigure libhdf5-openmpi-dev. Not obvious why an openmpi update >> would cause them to disappear. > > After a test into a clean chroot I can now confirm this hypothesis. The loss of the alternative is easily triggered by the reinstallation of openmpi-bin: # pkg-config --libs hdf5-mpi -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lhdf5 -lmpi # apt-get install --reinstall ipenmpi-bin Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package ipenmpi-bin (unstable-amd64-sbuild)root@pinibrem15:/tmp# pkg-config --libs hdf5-mpi -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lhdf5 -lmpi (unstable-amd64-sbuild)root@pinibrem15:/tmp# apt-get install --reinstall openmpi-bin Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded. Need to get 0 B/127 kB of archives. After this operation, 0 B of additional disk space will be used. debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 18500 files and directories currently installed.) Preparing to unpack .../openmpi-bin_4.0.5-7_amd64.deb ... Unpacking openmpi-bin (4.0.5-7) over (4.0.5-7) ... Setting up openmpi-bin (4.0.5-7) ... update-alternatives: warning: forcing reinstallation of alternative /usr/bin/mpicc.openmpi because link group mpi is broken # pkg-config --libs hdf5-mpi Package hdf5-mpi was not found in the pkg-config search path. Perhaps you should add the directory containing `hdf5-mpi.pc' to the PKG_CONFIG_PATH environment variable No package 'hdf5-mpi' found It happens when reinstalling mpich as well, if the mpi alternative was previously set to mpich. I have no idea how to fix it, other than asking openmpi and mpich maintainers to take care of the hdf5-mpi.pc slave alternative when it exists. What do you think? Thanks, Note the warning notice above. Honestly I have no idea how this could be fixed. signature.asc Description: OpenPGP digital signature
Bug#968559: libhdf5-openmpi-dev: hdf5-mpi.pc alternative sometimes goes missing
Drew Parsons a écrit le 06/11/2020 à 04:02 : > On 2020-11-06 02:09, Gilles Filippini wrote: >>> >>> But we should document (or fix if possible) that this alternatives >>> mechanism is a little fragile, and sometimes the link needs to be >>> refresh with >>> sudo dpkg-reconfigure libhdf5-openmpi-dev >>> >>> What I mean is that sometimes the link seem to just disappear, so we get >>> $ pkg-config --libs hdf5-mpi >>> Package hdf5-mpi was not found in the pkg-config search path. > ... >> >> Do you have a scenario leading to this alternative disparition? >> > > > It's not completely clear to me. But my suspicion is that it happens > when there is an upgrade to openmpi. Evidently then hdf5 needs to update > its alternatives against the updated openmpi. > > It's a little strange though, since a simple openmpi update is not an > ABI update. The alternatives links would be the same after running > dpkg-reconfigure libhdf5-openmpi-dev. Not obvious why an openmpi update > would cause them to disappear. After a test into a clean chroot I can now confirm this hypothesis. Thanks, _g. signature.asc Description: OpenPGP digital signature
Bug#968559: libhdf5-openmpi-dev: hdf5-mpi.pc alternative sometimes goes missing
On 2020-11-06 02:09, Gilles Filippini wrote: But we should document (or fix if possible) that this alternatives mechanism is a little fragile, and sometimes the link needs to be refresh with sudo dpkg-reconfigure libhdf5-openmpi-dev What I mean is that sometimes the link seem to just disappear, so we get $ pkg-config --libs hdf5-mpi Package hdf5-mpi was not found in the pkg-config search path. ... Do you have a scenario leading to this alternative disparition? It's not completely clear to me. But my suspicion is that it happens when there is an upgrade to openmpi. Evidently then hdf5 needs to update its alternatives against the updated openmpi. It's a little strange though, since a simple openmpi update is not an ABI update. The alternatives links would be the same after running dpkg-reconfigure libhdf5-openmpi-dev. Not obvious why an openmpi update would cause them to disappear.
Bug#968559: libhdf5-openmpi-dev: hdf5-mpi.pc alternative sometimes goes missing
Control: tag -1 moreinfo Hi Drew, On Mon, 17 Aug 2020 19:23:05 +0800 Drew Parsons wrote: > Package: libhdf5-openmpi-dev > Version: 1.10.6+repack-2 > Severity: normal > > We've set up libhdf5-openmpi-dev (and libhdf5-mpich-dev) to use the > alternatives mechanism to configure a symlink from a generic pkgconfig > file hdf5-mpi.pc to the specific hdf5-openmpi.pc (or hdf5-mpich.pc). > This allows client programs to get libs with 'pkg-config --libs hdf5-mpi' > without needing to know which specific MPI implementation is being > used. > > It's a good and useful service, I think we should keep it. > > But we should document (or fix if possible) that this alternatives > mechanism is a little fragile, and sometimes the link needs to be > refresh with > sudo dpkg-reconfigure libhdf5-openmpi-dev > > What I mean is that sometimes the link seem to just disappear, so we get > $ pkg-config --libs hdf5-mpi > Package hdf5-mpi was not found in the pkg-config search path. > Perhaps you should add the directory containing `hdf5-mpi.pc' > to the PKG_CONFIG_PATH environment variable > No package 'hdf5-mpi' found > > It gets restored by 'dpkg-reconfigure libhdf5-openmpi-dev' > (update-alternative --config hdf5-mpi would also enable it to be reset). > > I'm not sure why exactly the link is being lost or if it's feasible to > make the mechanism for it more robust. I presume it happens when > openmpi gets updated (e.g. recently updated to openmpi 4.0.4). > libhdf5-openmpi-dev.postinst of course is setting the alternatives > link, though I don't understand why the link would be lost just > because openmpi got upgraded. > > Filing this bug so we can document and keep watch on the problem. > Again, the workaround is to run > > sudo dpkg-reconfigure libhdf5-openmpi-dev > > (or dpkg-reconfigure libhdf5-mpich-dev) Do you have a scenario leading to this alternative disparition? Thanks, _g. signature.asc Description: OpenPGP digital signature
Bug#968559: libhdf5-openmpi-dev: hdf5-mpi.pc alternative sometimes goes missing
Package: libhdf5-openmpi-dev Version: 1.10.6+repack-2 Severity: normal We've set up libhdf5-openmpi-dev (and libhdf5-mpich-dev) to use the alternatives mechanism to configure a symlink from a generic pkgconfig file hdf5-mpi.pc to the specific hdf5-openmpi.pc (or hdf5-mpich.pc). This allows client programs to get libs with 'pkg-config --libs hdf5-mpi' without needing to know which specific MPI implementation is being used. It's a good and useful service, I think we should keep it. But we should document (or fix if possible) that this alternatives mechanism is a little fragile, and sometimes the link needs to be refresh with sudo dpkg-reconfigure libhdf5-openmpi-dev What I mean is that sometimes the link seem to just disappear, so we get $ pkg-config --libs hdf5-mpi Package hdf5-mpi was not found in the pkg-config search path. Perhaps you should add the directory containing `hdf5-mpi.pc' to the PKG_CONFIG_PATH environment variable No package 'hdf5-mpi' found It gets restored by 'dpkg-reconfigure libhdf5-openmpi-dev' (update-alternative --config hdf5-mpi would also enable it to be reset). I'm not sure why exactly the link is being lost or if it's feasible to make the mechanism for it more robust. I presume it happens when openmpi gets updated (e.g. recently updated to openmpi 4.0.4). libhdf5-openmpi-dev.postinst of course is setting the alternatives link, though I don't understand why the link would be lost just because openmpi got upgraded. Filing this bug so we can document and keep watch on the problem. Again, the workaround is to run sudo dpkg-reconfigure libhdf5-openmpi-dev (or dpkg-reconfigure libhdf5-mpich-dev) -- System Information: Debian Release: bullseye/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.7.0-2-amd64 (SMP w/8 CPU threads) Kernel taint flags: TAINT_WARN Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages libhdf5-openmpi-dev depends on: ii libaec-dev 1.0.4-1 ii libhdf5-openmpi-103-1 1.10.6+repack-2 ii libhdf5-openmpi-cpp-103-1 1.10.6+repack-2 ii libhdf5-openmpi-fortran-1021.10.6+repack-2 ii libhdf5-openmpi-hl-100 1.10.6+repack-2 ii libhdf5-openmpi-hl-cpp-100 1.10.6+repack-2 ii libhdf5-openmpi-hl-fortran-100 1.10.6+repack-2 ii libjpeg-dev1:2.0.5-1.1 ii libjpeg62-turbo-dev [libjpeg-dev] 1:2.0.5-1.1 ii libopenmpi-dev 4.0.4-2 ii zlib1g-dev 1:1.2.11.dfsg-2 libhdf5-openmpi-dev recommends no packages. Versions of packages libhdf5-openmpi-dev suggests: pn libhdf5-doc -- no debconf information