git: edfea8b8d37e - main - science/pnetcdf: Fix build on i386
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 30 Jul 2022 19:27:53 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=edfea8b8d37e65fc78f6a7191546cde0ef0e24cd
commit edfea8b8d37e65fc78f6a7191546cde0ef0e24cd
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-07-30 19:24:09 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-07-30 19:24:09 +0000
science/pnetcdf: Fix build on i386
Use MPICH option for i386. PnetCDF requires MPI_Offset >= 8 but Open MPI sets
MPI_Offset to 4 on 32-bit architecture regardless of LFS. See
https://github.com/open-mpi/ompi/issues/3195 for details
---
science/pnetcdf/Makefile | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/science/pnetcdf/Makefile b/science/pnetcdf/Makefile
index 3e0af9217aee..9990f1995913 100644
--- a/science/pnetcdf/Makefile
+++ b/science/pnetcdf/Makefile
@@ -19,7 +19,10 @@ CONFLICTS_INSTALL= hdf-4.*
OPTIONS_SINGLE= MPI
OPTIONS_SINGLE_MPI= OPENMPI MPICH
-OPTIONS_DEFAULT=OPENMPI
+OPTIONS_DEFAULT=${OPTIONS_DEFAULT_${ARCH}}
+OPTIONS_DEFAULT_amd64= OPENMPI
+OPTIONS_DEFAULT_i386= MPICH
+#OPTIONS_DEFAULT=OPENMPI
MPICH_USES= mpi:mpich
OPENMPI_USES= mpi:openmpi
@@ -31,6 +34,10 @@ OPENMPI_USES= mpi:openmpi
FCFLAGS+= -fallow-argument-mismatch
.endif
+.if ${ARCH} == i386 && ${PORT_OPTIONS:MOPENMPI}
+BROKEN= Use MPICH option instead. PnetCDF requires MPI_Offset >= 8 but Open MPI sets MPI_Offset to 4 on 32-bit architecture regardless of LFS. See https://github.com/open-mpi/ompi/issues/3195 for details
+.endif
+
post-patch:
@${REINPLACE_CMD} -e '/$$(INSTALL.*$$(PREFIX)/ s|$$(PREFIX)|$$(DESTDIR)&|' ${WRKSRC}/Makefile.in