Skip to content

Commit 188cc6c

Browse files
author
Jeff Whitaker
authored
Merge pull request Unidata#1364 from Unidata/issue1363
fix for compiling with netcdf-c 4.7.4 (issue Unidata#1363)
2 parents f4c33a9 + 91d6e98 commit 188cc6c

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

.github/workflows/build_latest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
pushd pnetcdf-${PNETCDF_VERSION}
3636
./configure --prefix $NETCDF_DIR --enable-shared --disable-fortran --disable-cxx
3737
make -j 2
38-
make install
38+
sudo make install
3939
popd
4040
echo "Download and build netCDF version ${NETCDF_VERSION}"
4141
wget https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION}/netcdf-c-${NETCDF_VERSION}.tar.gz
@@ -46,7 +46,7 @@ jobs:
4646
export LIBS="-lhdf5_mpich_hl -lhdf5_mpich -lm -lz"
4747
./configure --prefix $NETCDF_DIR --enable-netcdf-4 --enable-shared --enable-dap --enable-parallel4 $NETCDF_EXTRA_CONFIG
4848
make -j 2
49-
make install
49+
sudo make install
5050
popd
5151
5252
# - name: The job has failed

.github/workflows/build_master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
autoreconf -i
3636
./configure --prefix $NETCDF_DIR --enable-netcdf-4 --enable-shared --enable-dap --enable-parallel4
3737
make -j 2
38-
make install
38+
sudo make install
3939
popd
4040
4141
# - name: The job has failed

.github/workflows/build_old.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
env:
88
PNETCDF_VERSION: 1.12.1
9-
NETCDF_VERSION: 4.8.1
9+
NETCDF_VERSION: 4.7.4
1010
NETCDF_DIR: ${{ github.workspace }}/..
1111
NETCDF_EXTRA_CONFIG: --enable-pnetcdf
1212
CC: mpicc.mpich
@@ -35,18 +35,19 @@ jobs:
3535
pushd pnetcdf-${PNETCDF_VERSION}
3636
./configure --prefix $NETCDF_DIR --enable-shared --disable-fortran --disable-cxx
3737
make -j 2
38-
make install
38+
sudo make install
3939
popd
4040
echo "Download and build netCDF version ${NETCDF_VERSION}"
41-
wget https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION}/netcdf-c-${NETCDF_VERSION}.tar.gz
41+
#wget https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION}/netcdf-c-${NETCDF_VERSION}.tar.gz
42+
wget https://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-c-${NETCDF_VERSION}.tar.gz
4243
tar -xzf netcdf-c-${NETCDF_VERSION}.tar.gz
4344
pushd netcdf-c-${NETCDF_VERSION}
4445
export CPPFLAGS="-I/usr/include/hdf5/mpich -I${NETCDF_DIR}/include"
4546
export LDFLAGS="-L${NETCDF_DIR}/lib"
4647
export LIBS="-lhdf5_mpich_hl -lhdf5_mpich -lm -lz"
4748
./configure --prefix $NETCDF_DIR --enable-netcdf-4 --enable-shared --enable-dap --enable-parallel4 $NETCDF_EXTRA_CONFIG
4849
make -j 2
49-
make install
50+
sudo make install
5051
popd
5152
5253
# - name: The job has failed

.github/workflows/miniconda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
init-shell: bash
7070
create-args: >-
7171
python=${{ matrix.python-version }}
72-
numpy cython pip pytest mpi4py hdf5=*=mpi* libnetcdf=*=mpi* cftime zlib certifi
72+
numpy cython pip pytest openmpi mpi4py hdf5=*=mpi* libnetcdf=*=mpi* cftime zlib certifi
7373
--channel conda-forge
7474
7575
- name: Install netcdf4-python with mpi

external/nc_complex/src/nc_complex.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
#include "nc_complex_version.h"
1111

12+
// to enable compilation with older versions of netcdf-c
13+
#ifndef NC_FORMATX_NCZARR
14+
#define NC_FORMATX_NCZARR (10)
15+
#endif
16+
1217
// NOLINTBEGIN(bugprone-assignment-in-if-condition)
1318
#define CHECK(func) \
1419
do { \

0 commit comments

Comments
 (0)