-
-
Notifications
You must be signed in to change notification settings - Fork 310
Open
Milestone
Description
I am cross-compiling the current develop branch of HDF5. I am building on x86_64-linux-musl for aarch64-linux-gnu, with Fortran enabled and testing disabled.
I find that HDF5 wants to generate the file tf_gen.F90
in this case. I therefore need to provide a pregenerated file.
I am pregenerating the file by building HDF5 natively on a different system. On that system I need to enable testing, otherwise this file is not generated.
This seems to be inconsistent:
- Either
tf_gen.F90
is not needed when testing is disabled. In this case, its generator should not run. - Or
tf_gen.F90
is needed at all times, even when building with testing disabled. In that case, a build with testing disabled should produce this file.
This is how I configure HDF5 to pregenerate, running natively on aarch64:
cmake -Bbuilddir -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc-${gccversion} \
-DCMAKE_CXX_COMPILER=g++-${gccversion} \
-DCMAKE_Fortran_COMPILER=gfortran-${gccversion} \
-DCMAKE_INSTALL_PREFIX=/hdf5 \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DBUILD_TESTING=ON \
-DHDF5_BUILD_CPP_LIB=ON \
-DHDF5_BUILD_DOC=OFF \
-DHDF5_BUILD_EXAMPLES=OFF \
-DHDF5_BUILD_FORTRAN=ON \
-DHDF5_BUILD_HL_LIB=ON \
-DHDF5_BUILD_TOOLS=OFF \
-DHDF5_ENABLE_SZIP_SUPPORT=OFF \
-DHDF5_ENABLE_ZLIB_SUPPORT=OFF
This is how I configure HDF5 to cross-build:
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${prefix} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DBUILD_
SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DALLOW_UNSUPPORTED=ON -DHDF5_ALLOW_UNSUPPORTED=ON -DHDF5_BUILD_CPP_LIB=ON -DHDF5_BUILD_DOC=OFF -DH
DF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_FORTRAN=ON -DHDF5_BUILD_HL_LIB=ON -DHDF5_BUILD_JAVA=OFF -DHDF5_BUILD_PARALLEL_TOOLS=OFF -DHDF5_BUILD_T
OOLS=ON -DHDF5_ENABLE_CONCURRENCY=ON -DHDF5_ENABLE_DIRECT_VFD=ON -DHDF5_ENABLE_HDFS=OFF -DHDF5_ENABLE_MAP_API=ON -DHDF5_ENABLE_MIRROR_VFD=
ON -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_PLUGIN_SUPPORT=OFF -DHDF5_ENABLE_ROS3_VFD=ON -DHDF5_ENABLE_SUBFILING_VFD=ON -DHDF5_ENABLE_SZIP_
SUPPORT=ON -DHDF5_ENABLE_ZLIB_SUPPORT=ON -DHDF5_USE_PREGEN=ON -DMPI_HOME=${prefix}) -DHDF5_USE_PREGEN_DIR=${WORKSPACE}/srcdir/files/debian-arm64v8 -DPAC_FORTRAN_NUM_INTEGER_KINDS=5 -DPAC_FC_ALL_INTEGE
R_KINDS='{1,2,4,8,16}' -DPAC_FC_ALL_INTEGER_KINDS_SIZEOF='{1,2,4,8,16}' -DPAC_FORTRAN_NUM_LOGICAL_KINDS=5 -DPAC_FC_ALL_LOGICAL_KINDS='{1,2
,4,8,16}' -DPAC_FORTRAN_NUM_REAL_KINDS=3 -DPAC_FC_ALL_REAL_KINDS='{4,8,16}' -DPAC_FC_ALL_REAL_KINDS_SIZEOF='{4,8,16}' -DH5_PAC_FC_MAX_REAL
_PRECISION=33 -DPAC_FORTRAN_NATIVE_INTEGER_KIND=4 -DPAC_FORTRAN_NATIVE_INTEGER_SIZEOF=4 -DPAC_FORTRAN_NATIVE_REAL_KIND=4 -DPAC_FORTRAN_NAT
IVE_REAL_SIZEOF=4 -DPAC_FORTRAN_NATIVE_DOUBLE_KIND=8 -DPAC_FORTRAN_NATIVE_DOUBLE_SIZEOF=8 -DH5_H5CONFIG_F_NUM_IKIND='INTEGER, PARAMETER ::
num_ikinds = 5' -DH5_H5CONFIG_F_IKIND='INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/1,2,4,8,16/)'
hyoklee
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Scheduled/On-Deck