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

[HDF5] building on an arm64 Linux machine #1552

Closed
grohli opened this issue Dec 18, 2024 · 2 comments
Closed

[HDF5] building on an arm64 Linux machine #1552

grohli opened this issue Dec 18, 2024 · 2 comments

Comments

@grohli
Copy link
Contributor

grohli commented Dec 18, 2024

Hi,

I encountered some issues trying to build the hdf5 library into a hdf5-linux-arm64.jar: it seems as though in hdf5/cppbuild.sh, there's a platform check to make sure we're compiling for the right machine type. I encountered two problems that arose from this while building on an arm64 Linux machine:

  1. the name of my machine isn't arm64, it's aarch64, so the current cppbuild.sh doesn't actually hit the proper if statement (rather it thinks I'm cross compiling and goes to the else statement); and
  2. even when changing the if statement to be if [[ "$MACHINE_TYPE" =~ aarch64 ]]; the command in the if statement fails because of its -m64 flags for gcc and g++.

I made a workaround by changing those lines to be:

linux-arm64)
        ...
        ...
        MACHINE_TYPE=$( uname -m )
        if [[ "$MACHINE_TYPE" =~ aarch64 ]]; then
          ./configure --prefix=$INSTALL_PATH CC="gcc" CXX="g++" --enable-cxx --enable-java
          make -j $MAKEJ
          make install-strip

Which generates a proper hdf5-linux-arm64.jar file.

@saudet
Copy link
Member

saudet commented Dec 18, 2024

Sounds good, please open a pull request!

@grohli
Copy link
Contributor Author

grohli commented Dec 19, 2024

Done and done #1553

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

No branches or pull requests

2 participants