I am building NetCDF 4.10.1 against MPICH for aarch64-linux-gnu. This fails because configure thinks that MPI_Comm_f2c is not available (although it is), and aarch64 is a 64-bit system.
The build error comes from
./libdispatch/dparallel.c:460: #error "MPI_Comm_f2c unavailable on a 64-bit system: cannot safely convert Fortran comm handle"
I assume that the configure mis-detection is caused by the cmake lines
CHECK_SYMBOL_EXISTS(MPI_Comm_f2c "mpi.h" HAVE_MPI_COMM_F2C)
CHECK_SYMBOL_EXISTS(MPI_Info_f2c "mpi.h" HAVE_MPI_INFO_F2C)
which expect that there is a symbol MPI_Comm_f2c. MPICH provides no such symbol, it provides a macro instead.
This configure setting
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS ac_cv_func_MPI_Comm_f2c=yes ac_cv_func_MPI_Info_f2c=yes"
avoids the problem.
I am building NetCDF 4.10.1 against MPICH for aarch64-linux-gnu. This fails because configure thinks that
MPI_Comm_f2cis not available (although it is), and aarch64 is a 64-bit system.The build error comes from
I assume that the configure mis-detection is caused by the cmake lines
which expect that there is a symbol
MPI_Comm_f2c. MPICH provides no such symbol, it provides a macro instead.This configure setting
avoids the problem.