hdf5 icon indicating copy to clipboard operation
hdf5 copied to clipboard

hdf5 1.14.4 fails to build for IOS Arm64

Open jebos opened this issue 1 year ago • 3 comments

Describe the bug Building on MacOSX for IPhoneOS / IPadOS fails.

/hdf5/src/H5system.c:708:22 Call to undeclared function 'getcwd'; ISO C99 and later do not support implicit function declarations

Expected behavior hdf5 can be built for IOS

*Platform

  • Version: 1.14.2 ,3 ,4
  • Build Machine: MacOSX, MacBookPro 2021, Intel Hardware
  • Build Target: Arm64, IPhoneOS 13 / IPadOS 13
  • AppleClang
  • CMake

set(HDF5_EXTERNALLY_CONFIGURED ON) set(BUILD_TESTING OFF CACHE BOOL "Build HDF5 Unit Testing") set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE) set(BUILD_STATIC_LIBS ON CACHE BOOL "Build STATIC Libraries" FORCE) set(ONLY_SHARED_LIBS OFF CACHE BOOL "Build ONLY Shared Libraries" FORCE) set(HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library") set(HDF5_BUILD_HL_LIB OFF CACHE BOOL "Build HIGH Level HDF5 Library") set(HDF5_BUILD_TOOLS OFF CACHE BOOL "Build HDF5 Tools") set(HDF5_BUILD_EXAMPLES OFF CACHE BOOL "Build HDF5 Library Examples") set(HDF5_GENERATE_HEADERS OFF CACHE BOOL "Generate Headers") set(HDF5_NO_PACKAGES ON CACHE BOOL "No Packaging hdf5") set(HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)") set(HDF5_ENABLE_S_LIB_SUPPORT OFF CACHE BOOL "" FORCE) set(HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE) set(HDF5_BUILD_UTILS OFF CACHE INTERNAL "" FORCE)

Additional context Configure works fine, issue happens on building.

jebos avatar Jun 18 '24 14:06 jebos

Unfortunately, we don't support cross compiling for iOS at this time. We can look into that, but it'd take some work to get that functional and set up testing for it (PRs encouraged, if anyone wants to take on this work).

derobins avatar Jun 18 '24 16:06 derobins

Actually I got it building with the mentioned config (static, a lot turned off). It builds after adding many includes here and there; But well as said It compiles but if it works I will see.

Any recommendations on testing functionality?

I may can give you a PR with those changes once it works.

jebos avatar Jun 18 '24 17:06 jebos

@jebos , I'm using the following GH Action for iOS testing:

https://github.com/hyoklee/hdf5/blob/develop/.github/workflows/ios.yml

hyoklee avatar Jun 19 '24 17:06 hyoklee