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

M1 native build of Durin #24

Open
graeme-winter opened this issue Nov 6, 2021 · 5 comments
Open

M1 native build of Durin #24

graeme-winter opened this issue Nov 6, 2021 · 5 comments
Assignees

Comments

@graeme-winter
Copy link
Collaborator

As reported by Kay Diederichs, please could we make a native build of durin for macOS on M1 - against HDF5 1.12 which appears to support that platform.

@graeme-winter
Copy link
Collaborator Author

Also need to probably update the API calls for 1.12

@graeme-winter graeme-winter self-assigned this Nov 10, 2021
@KayDiederichs
Copy link

https://portal.hdfgroup.org/display/HDF5/Migrating+from+HDF5+1.10+to+HDF5+1.12 seems to be relevant.

Unfortunately it seems I cannot even properly compile HDF5-1.12.1 on the Intel Mac, using BigSur and gcc-11.2 : it compiles ok, but reports an error in "testhdf5" when using "make check".

The release notes for HDF5 1.10.8 mention Apple M1 as a platform.

@KayDiederichs
Copy link

For the record: "make check" of HDF5 1.10.3 crashes my M1 Mac in the "testswmr" test.
HDF5 1.10.8 however is fine, and Durin can be built for M1 Mac, and seems to work well (tried only with the thaumatin_9_1 data that I think are at Zenodo, and serve as example for NeXus).

@KayDiederichs
Copy link

KayDiederichs commented Mar 28, 2022

For the record: My recipe for compiling a native durin on Apple M1 is
a) install https://github.com/fxcoudert/gfortran-for-macOS/releases/tag/12-arm-alpha . This provides gfortran gcc g++, and is then used to compile a native M1 XDS because there is no native Fortran compiler in Xcode. Unfortunately, gfortran /gcc compiled software does not interact well with Apple's CLANG/LLVM which means that durin must also compiled with this version of gcc/g++.
b) So, to use this compiler
export CC=/usr/local/gfortran/bin/gcc
export CXX=/usr/local/gfortran/bin/g++
export PATH=/usr/local/gfortran/bin:$PATH
c) proceed with installing durin as normal (using HDF5 1.10.8 as I said above)

BTW, despite the name, the compiler works well not only on Montery M1 Macs, but also on BigSur M1 Macs.

@KayDiederichs
Copy link

See also #27 concerning requirement for the libh5bhuf plugin.

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

2 participants