Two separate compiles on two different computers makes automated nightly builds very complicated.
The code has this:
if (APPLE)
list (LENGTH CMAKE_OSX_ARCHITECTURES ARCH_LENGTH)
if (ARCH_LENGTH GREATER 1)
set (CMAKE_OSX_ARCHITECTURES "" CACHE STRING "" FORCE)
message (FATAL_ERROR "Building Universal Binaries on OS X is NOT supported by the HDF5 project. This is"
"due to technical reasons. The best approach would be build each architecture in separate directories"
"and use the 'lipo' tool to combine them into a single executable or library. The 'CMAKE_OSX_ARCHITECTURES'"
"variable has been set to a blank value which will build the default architecture for this system.")
endif ()
set (${HDF_PREFIX}_AC_APPLE_UNIVERSAL_BUILD 0)
endif ()
Any idea what the ‘technical reasons’ are? Presumably the building machine is introspected for things like endianness and pointer size?
Unlike previously, with ppc+ppc64+i386+x86_64 universal binaries, the situation is actually much simpler today between x86_64 and arm64:
- endianness is the same
- pointer and int size is the same
If I simply remove the if (ARCH_LENGTH GREATER 1)
check above, I’m able to build as universal (on intel host) and all tests pass (on intel). But I don’t have an ARM Mac to test the result with.
Mike, I recall you received an ARM Mac? Could you try building with CMAKE_OSX_ARCHITECTURES=x86_64
? Since that’s only one architecture, it will pass that GREATER 1
test. I’d be curious to see if all tests pass under Rosetta.
My ARM Mac is due to finally arrive in 4 days, despite being ordered months ago!
Sean