8000 pkgdb: discover hdf5 and mpi variant subdirectories under dpkg by aivazis · Pull Request #49 · aivazis/mm · GitHub
[go: up one dir, main page]

Skip to content

pkgdb: discover hdf5 and mpi variant subdirectories under dpkg - #49

Merged
aivazis merged 1 commit into
mainfrom
dpkg-hdf5-variant
Jul 13, 2026
Merged

aivazis merged 1 commit into
mainfrom
dpkg-hdf5-variant

Conversation

@aivazis
@aivazis aivazis commented Jul 13, 2026
Copy link
Copy Markdown
Owner

Problem

On Debian/Ubuntu, hdf5 and openmpi tuck their headers and libraries into variant subdirectories
that _buildDpkgPackageDatabase did not probe:

  • hdf5 (libhdf5-dev, serial): hdf5.h in /usr/include/hdf5/serial/, libs in
    /usr/lib/<multiarch>/hdf5/serial/
  • openmpi (libopenmpi-dev): mpi.h in /usr/lib/<multiarch>/openmpi/include/, libs in
    .../openmpi/lib/

The emitter wrote only <pkg>.dir, so hdf5.incpath / mpi.incpath fell back to the bare
$(dir)/include (/usr/include) and the compiles failed with hdf5.h/mpi.h not found.

Fix

Give hdf5 and mpi bespoke emitter branches (like python/numpy/pybind11) that read the real locations
from dpkg -L:

  • hdf5: locate hdf5.h and libhdf5.so, emit hdf5.incpath / hdf5.libpath via _dpkgAnchor.
    Emit hdf5.parallel = the flavor (the header's enclosing dir: serial / openmpi / mpich) so
    the existing findstring mpi gate in make/extern/hdf5/init.mm folds mpi into
    hdf5.dependencies for parallel builds. The transitive edge stays owned by the make engine.
  • mpi: locate mpi.h (the one on an /include/ path, not the fortran module) and libmpi.so,
    emit mpi.incpath / mpi.libpath.

Also corrects the stale hdf5.parallel marker hint (was "on/off"; the value is really the flavor
serial/openmpi/mpich) and the default (off → serial).

Verification

Builds pyre from scratch against apt packages in an ubuntu:24.04 container; hdf5/mpi resolve and
the full test suite passes.

The embedded clone of this logic in pyre's packages/merlin/shells/MM.py gets the same fix in a
companion pyre PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0