Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fortran bindings for HDF5? #4760

Open
eschnett opened this issue Apr 14, 2022 · 7 comments
Open

Fortran bindings for HDF5? #4760

eschnett opened this issue Apr 14, 2022 · 7 comments

Comments

@eschnett
Copy link
Contributor

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?

@giordano
Copy link
Member

Duplicate of JuliaPackaging/BinaryBuilder.jl#10?

@lucifer1004
Copy link
Contributor

lucifer1004 commented Jun 25, 2022

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.

@giordano
Copy link
Member

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 JuliaPackaging/BinaryBuilder.jl#10

@lucifer1004
Copy link
Contributor

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

@lucifer1004
Copy link
Contributor

By the way, after looking at the build_tarballs.jl of HDF5_jll, I think by removing

rm -f lib/{*_cpp*,*_fortran*} # we do not need these
this issue could be solved.

@giordano
Copy link
Member

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
Copy link
Member

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

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

No branches or pull requests

3 participants