Hdf5 crosscompile to arm64


#1

Hi,

Did anyone tried compiling latest release (hdf5-1_12_0) of hdf5 for arm64 platform.

Build Log:

libhdf5 hdf5-1_12_0 Configuring
(mkdir -p /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0//buildroot-build && cd /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0//buildroot-build && rm -f CMakeCache.txt && PATH="/home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/host/bin:/home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/host/sbin:/home/jagan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" /usr/local/bin/cmake /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0/ -DCMAKE_TOOLCHAIN_FILE="/home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/host/share/buildroot/toolchainfile.cmake" -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_COLOR_MAKEFILE=OFF -DBUILD_DOC=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLE=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TEST=OFF -DBUILD_TESTS=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON )
– The C compiler identification is GNU 7.4.0
– Check for working C compiler: /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/host/bin/aarch64-buildroot-linux-gnu-gcc
– Check for working C compiler: /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/host/bin/aarch64-buildroot-linux-gnu-gcc - works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– SOVERSION: 200.0.0
– SOVERSION_TOOLS: 200.0.0
– SOVERSION_CXX: 200.0.0
– SOVERSION_F: 200.0.0
– SOVERSION_HL: 200.0.0
– SOVERSION_HL_CXX: 200.0.0
– SOVERSION_HL_F: 200.0.0
– SOVERSION_JAVA: 200.0.0
– Check if the system is big endian
– Searching 16 bit integer
– Looking for sys/types.h
– Looking for sys/types.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for stddef.h
– Looking for stddef.h - found
– Check size of unsigned short
– Check size of unsigned short - done
– Searching 16 bit integer - Using unsigned short
– Check if the system is big endian - little endian
– Looking for include file sys/file.h
– Looking for include file sys/file.h - found
– Looking for include files sys/file.h, sys/ioctl.h
– Looking for include files sys/file.h, sys/ioctl.h - found
– Looking for 3 include files sys/file.h, …, sys/resource.h
– Looking for 3 include files sys/file.h, …, sys/resource.h - found
– Looking for 4 include files sys/file.h, …, sys/socket.h
– Looking for 4 include files sys/file.h, …, sys/socket.h - found
– Looking for 5 include files sys/file.h, …, sys/stat.h
– Looking for 5 include files sys/file.h, …, sys/stat.h - found
– Looking for 6 include files sys/file.h, …, sys/time.h
– Looking for 6 include files sys/file.h, …, sys/time.h - found
– Looking for 7 include files sys/file.h, …, sys/types.h
– Looking for 7 include files sys/file.h, …, sys/types.h - found
– Looking for 8 include files sys/file.h, …, features.h
– Looking for 8 include files sys/file.h, …, features.h - found
– Looking for 9 include files sys/file.h, …, dirent.h
– Looking for 9 include files sys/file.h, …, dirent.h - found
– Looking for 10 include files sys/file.h, …, setjmp.h
– Looking for 10 include files sys/file.h, …, setjmp.h - found
– Looking for 11 include files sys/file.h, …, stddef.h
– Looking for 11 include files sys/file.h, …, stddef.h - found
– Looking for 12 include files sys/file.h, …, stdint.h
– Looking for 12 include files sys/file.h, …, stdint.h - found
– Looking for 13 include files sys/file.h, …, unistd.h
– Looking for 13 include files sys/file.h, …, unistd.h - found
– Looking for 14 include files sys/file.h, …, mach/mach_time.h
– Looking for 14 include files sys/file.h, …, mach/mach_time.h - not found
– Looking for 14 include files sys/file.h, …, io.h
– Looking for 14 include files sys/file.h, …, io.h - not found
– Looking for 14 include files sys/file.h, …, winsock2.h
– Looking for 14 include files sys/file.h, …, winsock2.h - not found
– Looking for 14 include files sys/file.h, …, sys/timeb.h
– Looking for 14 include files sys/file.h, …, sys/timeb.h - found
– Looking for 15 include files sys/file.h, …, globus/common.h
– Looking for 15 include files sys/file.h, …, globus/common.h - not found
– Looking for 15 include files sys/file.h, …, pdb.h
– Looking for 15 include files sys/file.h, …, pdb.h - not found
– Looking for 15 include files sys/file.h, …, pthread.h
– Looking for 15 include files sys/file.h, …, pthread.h - found
– Looking for 16 include files sys/file.h, …, srbclient.h
– Looking for 16 include files sys/file.h, …, srbclient.h - not found
– Looking for 16 include files sys/file.h, …, string.h
– Looking for 16 include files sys/file.h, …, string.h - found
– Looking for 17 include files sys/file.h, …, strings.h
– Looking for 17 include files sys/file.h, …, strings.h - found
– Looking for 18 include files sys/file.h, …, stdlib.h
– Looking for 18 include files sys/file.h, …, stdlib.h - found
– Looking for 19 include files sys/file.h, …, memory.h
– Looking for 19 include files sys/file.h, …, memory.h - found
– Looking for 20 include files sys/file.h, …, dlfcn.h
– Looking for 20 include files sys/file.h, …, dlfcn.h - found
– Looking for 21 include files sys/file.h, …, inttypes.h
– Looking for 21 include files sys/file.h, …, inttypes.h - found
– Looking for 22 include files sys/file.h, …, netinet/in.h
– Looking for 22 include files sys/file.h, …, netinet/in.h - found
– Looking for 23 include files sys/file.h, …, stdbool.h
– Looking for 23 include files sys/file.h, …, stdbool.h - found
– Looking for include file quadmath.h
– Looking for include file quadmath.h - not found
– Looking for ceil in m;
– Looking for ceil in m; - found
– Looking for dlopen in dl;m
– Looking for dlopen in dl;m - found
– Looking for WSAStartup in ws2_32;m;dl
– Looking for WSAStartup in ws2_32;m;dl - not found
– Looking for gethostbyname in wsock32;m;dl
– Looking for gethostbyname in wsock32;m;dl - not found
– Looking for gethostname in ucb;m;dl
– Looking for gethostname in ucb;m;dl - not found
– Performing Other Test STDC_HEADERS - Success
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
TEST_LFS_WORKS_RUN (advanced)
For details see /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0/buildroot-build/TryRunResults.cmake
– Performing TEST_LFS_WORKS… no
– Performing Other Test HAVE_OFF64_T - Success
– Looking for lseek64
– Looking for lseek64 - found
– Looking for fseeko
– Looking for fseeko - found
– Performing Other Test HAVE_STAT64_STRUCT - Success
– Looking for stat64
– Looking for stat64 - found
– Check size of char
– Check size of char - done
– Check size of short
– Check size of short - done
– Check size of int
– Check size of int - done
– Check size of unsigned
– Check size of unsigned - done
– Check size of long
– Check size of long - done
– Check size of long long
– Check size of long long - done
– Check size of __int64
– Check size of __int64 - failed
– Check size of float
– Check size of float - done
– Check size of double
– Check size of double - done
– Check size of long double
– Check size of long double - done
– Check size of int8_t
– Check size of int8_t - done
– Check size of uint8_t
– Check size of uint8_t - done
– Check size of int_least8_t
– Check size of int_least8_t - done
– Check size of uint_least8_t
– Check size of uint_least8_t - done
– Check size of int_fast8_t
– Check size of int_fast8_t - done
– Check size of uint_fast8_t
– Check size of uint_fast8_t - done
– Check size of int16_t
– Check size of int16_t - done
– Check size of uint16_t
– Check size of uint16_t - done
– Check size of int_least16_t
– Check size of int_least16_t - done
– Check size of uint_least16_t
– Check size of uint_least16_t - done
– Check size of int_fast16_t
– Check size of int_fast16_t - done
– Check size of uint_fast16_t
– Check size of uint_fast16_t - done
– Check size of int32_t
– Check size of int32_t - done
– Check size of uint32_t
– Check size of uint32_t - done
– Check size of int_least32_t
– Check size of int_least32_t - done
– Check size of uint_least32_t
– Check size of uint_least32_t - done
– Check size of int_fast32_t
– Check size of int_fast32_t - done
– Check size of uint_fast32_t
– Check size of uint_fast32_t - done
– Check size of int64_t
– Check size of int64_t - done
– Check size of uint64_t
– Check size of uint64_t - done
– Check size of int_least64_t
– Check size of int_least64_t - done
– Check size of uint_least64_t
– Check size of uint_least64_t - done
– Check size of int_fast64_t
– Check size of int_fast64_t - done
– Check size of uint_fast64_t
– Check size of uint_fast64_t - done
– Check size of size_t
– Check size of size_t - done
– Check size of ssize_t
– Check size of ssize_t - done
– Check size of ptrdiff_t
– Check size of ptrdiff_t - done
– Check size of off_t
– Check size of off_t - done
– Check size of off64_t
– Check size of off64_t - done
– Check size of time_t
– Check size of time_t - done
– Check size of _Bool
– Check size of _Bool - done
– Performing Other Test DEV_T_IS_SCALAR - Success
– Looking for CLOCK_MONOTONIC
– Looking for CLOCK_MONOTONIC - not found
– Looking for gettimeofday
– Looking for gettimeofday - found
– Performing Other Test HAVE_TM_GMTOFF - Success
– Performing Other Test HAVE___TM_GMTOFF - Failed
– Performing Other Test HAVE_STRUCT_TIMEZONE - Success
– Performing Other Test GETTIMEOFDAY_GIVES_TZ - Success
– Performing Other Test TIME_WITH_SYS_TIME - Success
– Performing Other Test HAVE_TM_ZONE - Failed
– Performing Other Test HAVE_STRUCT_TM_TM_ZONE - Failed
– Performing Other Test HAVE_TIMEZONE - Success
– Performing Other Test HAVE_STAT_ST_BLOCKS - Success
– Looking for ioctl
– Looking for ioctl - found
– Performing Other Test HAVE_STRUCT_VIDEOCONFIG - Failed
– Performing Other Test HAVE_STRUCT_TEXT_INFO - Failed
– Looking for _getvideoconfig
– Looking for _getvideoconfig - not found
– Looking for gettextinfo
– Looking for gettextinfo - not found
– Looking for scrsize
– Looking for scrsize - not found
– Looking for GetConsoleScreenBufferInfo
– Looking for GetConsoleScreenBufferInfo - not found
– Looking for TIOCGWINSZ
– Looking for TIOCGWINSZ - found
– Looking for TIOCGETD
– Looking for TIOCGETD - found
– Looking for getpwuid
– Looking for getpwuid - found
– Looking for alarm
– Looking for alarm - found
– Looking for fcntl
– Looking for fcntl - found
– Looking for flock
– Looking for flock - found
– Looking for fork
– Looking for fork - found
– Looking for frexpf
– Looking for frexpf - found
– Looking for frexpl
– Looking for frexpl - found
– Looking for gethostname
– Looking for gethostname - found
– Looking for getrusage
– Looking for getrusage - found
– Looking for llround
– Looking for llround - not found
– Looking for llroundf
– Looking for llroundf - not found
– Looking for lround
– Looking for lround - not found
– Looking for lroundf
– Looking for lroundf - not found
– Looking for lstat
– Looking for lstat - found
– Looking for pread
– Looking for pread - found
– Looking for pwrite
– Looking for pwrite - found
– Looking for rand_r
– Looking for rand_r - found
– Looking for random
– Looking for random - found
– Looking for round
– Looking for round - not found
– Looking for roundf
– Looking for roundf - not found
– Looking for setsysinfo
– Looking for setsysinfo - not found
– Looking for signal
– Looking for signal - found
– Looking for longjmp
– Looking for longjmp - found
– Looking for setjmp
– Looking for setjmp - found
– Looking for siglongjmp
– Looking for siglongjmp - found
– Looking for sigsetjmp
– Looking for sigsetjmp - not found
– Looking for sigprocmask
– Looking for sigprocmask - found
– Looking for snprintf
– Looking for snprintf - found
– Looking for srandom
– Looking for srandom - found
– Looking for strdup
– Looking for strdup - found
– Looking for strtoll
– Looking for strtoll - found
– Looking for strtoull
– Looking for strtoull - found
– Looking for symlink
– Looking for symlink - found
– Looking for system
– Looking for system - found
– Looking for tmpfile
– Looking for tmpfile - found
– Looking for asprintf
– Looking for asprintf - found
– Looking for vasprintf
– Looking for vasprintf - found
– Looking for waitpid
– Looking for waitpid - found
– Looking for vsnprintf
– Looking for vsnprintf - found
– Performing Other Test VSNPRINTF_WORKS - Success
– Looking for sigsetjmp
– Looking for sigsetjmp - found
– Performing Other Test HAVE_ATTRIBUTE - Success
– Performing Other Test HAVE_C99_FUNC - Success
– Performing Other Test HAVE_FUNCTION - Success
– Performing Other Test HAVE_C99_DESIGNATED_INITIALIZER - Success
– Performing Other Test SYSTEM_SCOPE_THREADS - Success
– Performing Other Test HAVE_SOCKLEN_T - Success
– Performing Other Test HAVE_INLINE - Success
– Performing Other Test HAVE___INLINE
- Success
– Performing Other Test HAVE___INLINE - Success
– Checking for appropriate format for 64 bit long:
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
H5_PRINTF_LL_TEST_RUN (advanced)
H5_PRINTF_LL_TEST_RUN__TRYRUN_OUTPUT (advanced)
For details see /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0/buildroot-build/TryRunResults.cmake
– Width test failed with result: PLEASE_FILL_OUT-FAILED_TO_RUN
– Checking for appropriate format for 64 bit long: not found
– Looking for difftime
– Looking for difftime - found
– Looking for clock_gettime
– Looking for clock_gettime - found
– Looking for clock_gettime in rt
– Looking for clock_gettime in rt - found
– Looking for clock_gettime in posix4
– Looking for clock_gettime in posix4 - not found
– Check size of __float128
– Check size of __float128 - failed
– Check size of _Quad
– Check size of _Quad - failed
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
H5_LDOUBLE_TO_LONG_SPECIAL_RUN (advanced)
H5_LDOUBLE_TO_LONG_SPECIAL_RUN__TRYRUN_OUTPUT (advanced)
For details see /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0/buildroot-build/TryRunResults.cmake
– Checking IF your system converts long double to (unsigned) long values with special algorithm… no
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
H5_LONG_TO_LDOUBLE_SPECIAL_RUN (advanced)
H5_LONG_TO_LDOUBLE_SPECIAL_RUN__TRYRUN_OUTPUT (advanced)
For details see /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0/buildroot-build/TryRunResults.cmake
– Checking IF your system can convert (unsigned) long to long double values with special algorithm… no
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
H5_LDOUBLE_TO_LLONG_ACCURATE_RUN (advanced)
H5_LDOUBLE_TO_LLONG_ACCURATE_RUN__TRYRUN_OUTPUT (advanced)
For details see /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0/buildroot-build/TryRunResults.cmake
– Checking IF correctly converting long double to (unsigned) long long values… no
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
H5_LLONG_TO_LDOUBLE_CORRECT_RUN (advanced)
H5_LLONG_TO_LDOUBLE_CORRECT_RUN__TRYRUN_OUTPUT (advanced)
For details see /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0/buildroot-build/TryRunResults.cmake
– Checking IF correctly converting (unsigned) long long to long double values… no
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
H5_DISABLE_SOME_LDOUBLE_CONV_RUN (advanced)
H5_DISABLE_SOME_LDOUBLE_CONV_RUN__TRYRUN_OUTPUT (advanced)
For details see /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0/buildroot-build/TryRunResults.cmake
– Checking IF the cpu is power9 and cannot correctly converting long double values… no
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
H5_NO_ALIGNMENT_RESTRICTIONS_RUN (advanced)
H5_NO_ALIGNMENT_RESTRICTIONS_RUN__TRYRUN_OUTPUT (advanced)
For details see /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0/buildroot-build/TryRunResults.cmake
– Checking IF alignment restrictions are strictly enforced… no
– Warnings Configuration: default: -std=c99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os : -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
– CMAKE_C_FLAGS_GENERAL= -Wall -Wcast-qual -Wconversion -Wextra -Wfloat-equal -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-include-dirs -Wno-c+±compat -Wno-format-nonliteral -Wshadow -Wundef -Wwrite-strings -pedantic
– H5_CFLAGS0= -Wbad-function-cast -Wcast-align -Wdeclaration-after-statement -Wdisabled-optimization -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-enum -Wswitch-default -Wunused-macros -Wunsafe-loop-optimizations -finline-functions
– Found Perl: /usr/bin/perl (found version “5.26.1”)
– Generating ‘H5Epubgen.h’
Generating ‘H5Einit.h’
Generating ‘H5Eterm.h’
Generating ‘H5Edefin.h’

– Generating ‘/home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/build/libhdf5-hdf5-1_12_0/src/H5version.h’

– Generating ‘H5overflow.h’

– The CXX compiler identification is GNU 7.4.0
– Check for working CXX compiler: /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/host/bin/aarch64-buildroot-linux-gnu-g++
– Check for working CXX compiler: /home/jagan/work/code/rk3399/cradlewise/gerrit/br/output/host/bin/aarch64-buildroot-linux-gnu-g++ - works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Check for STD namespace
– Check for STD namespace - found
– Looking for C++ include stdint.h
– Looking for C++ include stdint.h - found
– Performing CXX Test OLD_HEADER_FILENAME - Failed
– Performing CXX Test HDF_NO_NAMESPACE - Failed
– Performing CXX Test HDF_NO_STD - Failed
– Performing CXX Test BOOL_NOTDEFINED - Failed
– Performing CXX Test NO_STATIC_CAST - Failed
– Performing CXX Test CXX_HAVE_OFFSETOF - Failed
– Configuring incomplete, errors occurred!

I have see some old thread where it crosscompiling by following an approach of generating H5lib_settings.c and H5Tinit.c files., any documentation how can I generate for this release tag and build sucessfully?

Jagan.


#2

I got around the cross compile issue by installing Linux OS/debian distro on an Android phone, then compiled HDF5 with gcc. The alternative is rather complicated.

best:
steve