bmad-sim / bmad-external-packages

External packages that are used with the Bmad simulation software.
0 stars 1 forks source link

hdf5_hl_fortran library naming convention #1

Open jsberg-bnl opened 1 month ago

jsberg-bnl commented 1 month ago

OK, tripped an odd one when trying to use system libraries. If you build hdf5 with CMake, it installs hl_fortran libraries with names like libhdf5_hl_fortran.so. If you build with autotools, it installs the libraries with names like libhdf5hl_fortran.so. Note the missing underscore. All the other hl libraries use libhdf_hl.... At one point they realized this issue, but instead of fixing the names to be consistent, instead autotools still built with different names, but created softlinks with libhdf5_hl_fortran.so pointing to libhdf5hl_fortran.so, and similarly for the .a files. Whoever submitted the patch to do that wasn't aware of MacOS and .dylib. Anyhow, I think their intent is that libhdf5_hl_fortran.* is the correct naming convention. My suggestion is that we

  1. Build hdf5 with CMake
  2. Switch to using hdf5_hl_fortran (with the underscore) in our dependencies (so this kind of refers to bmad-ecosystem as well...). I believe that's only one place, util/build_flags_config

A potential issue is if people have CMake files for their own programs, they may have hardcoded the hdf5hl_fortran dependency.

DavidSagan commented 1 month ago

@jsberg-bnl This looks OK to me. Do you want to submit a PR?

jsberg-bnl commented 1 month ago

Will do, but not immediately.