Yggdrasil icon indicating copy to clipboard operation
Yggdrasil copied to clipboard

Fortran bindings for HDF5?

Open eschnett opened this issue 3 years ago • 7 comments

I have a package that needs the Fortran bindings for HDF5. Is there a way to enable them?

I have heard that HDF5 does not cross-compile. I know how to set up Docker with qemu to build natively for various architectures. Could this be a way to build HDF5 on each architecture? Is there a Docker image for BinaryBuilder that can be used natively (not for cross-compiling) on non-x86 architectures?

eschnett avatar Apr 14 '22 19:04 eschnett

Duplicate of https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/10?

giordano avatar Apr 14 '22 19:04 giordano

I do not think this issue is a duplicate. I got stuck when I wanted to BinaryBuild a Fortran application which relies on HDF5 but HDF5_jll did not offer the Fortran library it needs.

The error message was

Could NOT find HDF5 (missing: HDF5_LIBRARIES Fortran) (found version
  "1.12.1")

showing that the HDF5 library did exist but did not offer Fortran support.

lucifer1004 avatar Jun 25 '22 09:06 lucifer1004

I mean, the duplicate is that unless upstream hdf5 allows for proper cross-compilation, the only alternative is to be able to run code for the target platform, which is the point of https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/10

giordano avatar Jun 25 '22 09:06 giordano

For a temporary workaround, do you think it is OK to build a standalone HDF5 for my application instead of using HDF5_jll?

lucifer1004 avatar Jun 25 '22 09:06 lucifer1004

By the way, after looking at the build_tarballs.jl of HDF5_jll, I think by removing https://github.com/JuliaPackaging/Yggdrasil/blob/7e759a039df729f627b165566e697837fcc88f41/H/HDF5/build_tarballs.jl#L44 this issue could be solved.

lucifer1004 avatar Jun 25 '22 09:06 lucifer1004

Sure, you can do whatever you want with your applications, no one forces anyone to use jlls 🙂 they're just a convenient way to provide users with hassle-free pre-built binaries well integrated with the whole ecosystem

giordano avatar Jun 25 '22 09:06 giordano

this issue could be solved.

I don't think it's nearly that easy. As far as I can see, they link only to libgfortran5, which for example for Linux would be the wrong ABI, as Julia there comes with libgfortran4

giordano avatar Jun 25 '22 09:06 giordano