Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4.9.0 #140

Merged
merged 26 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
df36f9a
update to v4.9.0 and refresh patches
ocefpaf Jun 13, 2022
93adf55
patch for lib version
ocefpaf Jun 13, 2022
d12681c
MNT: Re-rendered with conda-build 3.21.9, conda-smithy 3.20.0, and co…
ocefpaf Jun 13, 2022
040dfb6
mini-migrator
ocefpaf Jun 13, 2022
2e5d128
fix patch name
ocefpaf Jun 13, 2022
ce41df9
add zstd
ocefpaf Jun 13, 2022
c88695f
refresh
ocefpaf Jun 13, 2022
10b9c96
apply first
ocefpaf Jun 13, 2022
58232ff
add netcdf_json linking errors patch
kmuehlbauer Jun 28, 2022
edd55b7
fix patch
kmuehlbauer Jun 28, 2022
936fb81
try again
ocefpaf Jun 29, 2022
b0f3baa
Update patch to fix ncjson build
dopplershift Aug 26, 2022
bddcea1
Merge branch 'main' into v4.9.0
dopplershift Aug 26, 2022
3c21772
Incorporate upstream changes to fix test
dopplershift Sep 23, 2022
01d71e4
add. DENABLE_EXTERNAL_SERVER_TESTS to Unix build
hmaarrfk Sep 23, 2022
3574835
add DENABLE_EXTERNAL_SERVER_TESTS off in windows builds
hmaarrfk Sep 23, 2022
614c74d
Convert in-source-tree builds to out-of-source-tree builds.
WardF Sep 27, 2022
6736071
Patch in the option to disable external server tests.
WardF Sep 27, 2022
0d8db14
Renamed .path file to .patch.
WardF Sep 28, 2022
4226a22
Combine CMakeLists.txt patches, eliminate patch file throwing a very …
WardF Sep 28, 2022
2b17417
Add a patch to fix a race condition in one of the nccopy tests.
WardF Sep 28, 2022
9d23dae
Hopefully correct malformed patch file.
WardF Sep 28, 2022
2ea5f20
Added a dependency to tst_nans to tst_nccopy4
WardF Sep 28, 2022
b62fb51
Add more dependencies to whack more race condition moles.
WardF Sep 28, 2022
08bd865
remove static builds
hmaarrfk Sep 29, 2022
5756b3b
disable static builds
hmaarrfk Sep 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ cmake -LAH -G "NMake Makefiles" ^
-DENABLE_NCZARR=on ^
-DENABLE_NCZARR_S3=off ^
-DENABLE_NCZARR_S3_TESTS=off ^
-DENABLE_EXTERNAL_SERVER_TESTS=OFF ^
%SRC_DIR%
if errorlevel 1 exit \b 1

Expand Down
32 changes: 9 additions & 23 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,9 @@ fi
# DAP Remote tests are causing spurious failures at the momment
# https://github.com/Unidata/netcdf-c/issues/2188#issuecomment-1015927961
# -DENABLE_DAP_REMOTE_TESTS=OFF
# Build static.
cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_PREFIX_PATH=${PREFIX} \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DENABLE_DAP=ON \
-DENABLE_DAP_REMOTE_TESTS=OFF \
-DENABLE_HDF4=ON \
-DENABLE_NETCDF_4=ON \
-DBUILD_SHARED_LIBS=OFF \
-DENABLE_TESTS=ON \
-DBUILD_UTILITIES=ON \
-DENABLE_DOXYGEN=OFF \
-DENABLE_CDF5=ON \
-DENABLE_BYTERANGE=ON \
${PARALLEL} \
-DENABLE_NCZARR=on \
-DENABLE_NCZARR_S3=off \
-DENABLE_NCZARR_S3_TESTS=off \
${SRC_DIR}
# ctest # Run only for the shared lib build to save time.
make install -j${CPU_COUNT} ${VERBOSE_CM}
make clean

mkdir build-shared
cd build-shared
# Build shared.
cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_INSTALL_LIBDIR="lib" \
Expand All @@ -97,6 +76,7 @@ cmake ${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DBUILD_UTILITIES=ON \
-DENABLE_DOXYGEN=OFF \
-DENABLE_CDF5=ON \
-DENABLE_EXTERNAL_SERVER_TESTS=OFF \
${PARALLEL} \
-DENABLE_NCZARR=on \
-DENABLE_NCZARR_S3=off \
Expand All @@ -110,6 +90,12 @@ if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}
ctest -VV --output-on-failure -j${CPU_COUNT} ${SKIP}
fi

#
# Clean up build directories
#
cd ..
rm -rf build-shared

# Fix build paths in cmake artifacts
for fname in `ls ${PREFIX}/lib/cmake/netCDF/*`; do
sed -i.bak "s#${CONDA_BUILD_SYSROOT}/usr/lib/lib\([a-z]*\).so#\1#g" ${fname}
Expand Down
18 changes: 11 additions & 7 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set version = "4.8.1" %}
{% set build = 4 %}
{% set version = "4.9.0" %}
{% set build = 0 %}

# recipe-lint fails if mpi is undefined
{% set mpi = mpi or 'nompi' %}
Expand All @@ -14,19 +14,22 @@ package:

source:
url: https://github.com/Unidata/netcdf-c/archive/v{{ version }}.tar.gz
sha256: bc018cc30d5da402622bf76462480664c6668b55eb16ba205a0dfb8647161dd0
sha256: 9f4cb864f3ab54adb75409984c6202323d2fc66c003e5308f3cdf224ed41c0a6
patches:
- patches/0004-Prefer-getenv-TOPSRCDIR-over-STRINGIFY-TOPSRCDIR.patch
- patches/0006-Fix-tests-for-Windows-VS2008-define-__func__-as-__FU.patch
- patches/0008-Finish-the-missing-code-to-handle-VS-in-test_common..patch
- patches/0008-Finish-the-missing-code-to-handle-VS-in-test_common.patch
- patches/0009-topsrcdir.patch
- patches/prevent_MS_runtime_libs_being_installed_again.patch # [win]
- patches/strdup.patch
- patches/do_not_use_16_processes_in_tests.patch # [ppc64le]
# https://github.com/Unidata/netcdf-c/issues/2390
# patches/incorrect_library_versionand_filename_in_4.9.0.patch
# Revert upstream change in 4.8.1--maybe unnecessary in 4.8.2
- patches/fix_cmake.patch # [win]
# Fix renaming file with multiple builds--will be in 4.8.2
- patches/fix-rename.patch
- patches/fix-ncjson.patch
- patches/fix-tests.patch
- patches/fix-ncdump-tests-prereq.patch

build:
number: {{ build }}
Expand Down Expand Up @@ -81,14 +84,15 @@ requirements:
- hdf5 * {{ mpi_prefix }}_*
- jpeg
- libzip
- zstd
run:
- {{ mpi }} # [mpi != 'nompi']
- curl
- hdf5 * {{ mpi_prefix }}_*

test:
commands:
- test -f ${PREFIX}/lib/libnetcdf.a # [not win]
- test ! -f ${PREFIX}/lib/libnetcdf.a # [not win]
- test -f ${PREFIX}/lib/libnetcdf${SHLIB_EXT} # [not win]
- nc-config --all # [not win]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
--- netcdf-c-4.6.3.orig/config.h.cmake.in 2019-02-28 17:40:34.000000000 -0300
+++ netcdf-c-4.6.3/config.h.cmake.in 2019-03-04 12:40:57.383805113 -0300
@@ -67,6 +67,9 @@
#endif
--- netcdf-c-4.9.0.orig/config.h.cmake.in 2022-06-10 18:04:15.000000000 -0300
+++ netcdf-c-4.9.0/config.h.cmake.in 2022-06-13 09:07:44.793148154 -0300
@@ -57,6 +57,10 @@
#define _OFF_T_DEFINED
#endif

+ #if _MSC_VER<1900
+ #define __func__ __FUNCTION__
+ #endif
+
#define strdup _strdup
#define fdopen _fdopen
#define write _write
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
diff -Naur netcdf-c-4.8.0.orig/CMakeLists.txt netcdf-c-4.8.0/CMakeLists.txt
--- netcdf-c-4.8.0.orig/CMakeLists.txt 2021-03-30 17:23:10.000000000 -0300
+++ netcdf-c-4.8.0/CMakeLists.txt 2021-03-31 16:20:58.354763274 -0300
@@ -2247,6 +2247,13 @@
diff --color -Naur netcdf-c-4.9.0.orig/CMakeLists.txt netcdf-c-4.9.0/CMakeLists.txt
--- netcdf-c-4.9.0.orig/CMakeLists.txt 2022-06-10 18:04:15.000000000 -0300
+++ netcdf-c-4.9.0/CMakeLists.txt 2022-06-13 09:15:17.540114993 -0300
@@ -2536,6 +2536,13 @@
SET(EXTRA_DIST ${EXTRA_DIST} ${CMAKE_CURRENT_SOURCE_DIR}/test_common.in)
SET(TOPSRCDIR "${CMAKE_CURRENT_SOURCE_DIR}")
SET(TOPBUILDDIR "${CMAKE_CURRENT_BINARY_DIR}")
SET(ISMSVC "${MSVC}")
+IF(MSVC)
+ # Seems this is always upper-case by this point :-(
+ SET(VS_CONFIGURATION "/${CMAKE_BUILD_TYPE}")
Expand All @@ -14,21 +14,21 @@ diff -Naur netcdf-c-4.8.0.orig/CMakeLists.txt netcdf-c-4.8.0/CMakeLists.txt
+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test_common.in ${CMAKE_CURRENT_BINARY_DIR}/test_common.sh @ONLY NEWLINE_STYLE LF)


diff -Naur netcdf-c-4.8.0.orig/configure.ac netcdf-c-4.8.0/configure.ac
--- netcdf-c-4.8.0.orig/configure.ac 2021-03-30 17:23:10.000000000 -0300
+++ netcdf-c-4.8.0/configure.ac 2021-03-31 15:37:39.403933822 -0300
@@ -1618,6 +1618,7 @@
#####
diff --color -Naur netcdf-c-4.9.0.orig/configure.ac netcdf-c-4.9.0/configure.ac
--- netcdf-c-4.9.0.orig/configure.ac 2022-06-10 18:04:15.000000000 -0300
+++ netcdf-c-4.9.0/configure.ac 2022-06-13 09:14:34.212977819 -0300
@@ -1857,6 +1857,7 @@
AC_SUBST(HAS_MMAP,[$enable_mmap])
AC_SUBST(HAS_JNA,[$enable_jna])
AC_SUBST(HAS_ERANGE_FILL,[$enable_erange_fill])
+AC_SUBST(VS_CONFIGURATION,[])
AC_SUBST(HAS_BYTERANGE,[$enable_byterange])
AC_SUBST(RELAX_COORD_BOUND,[yes])
AC_SUBST([HAS_PAR_FILTERS], [$hdf5_supports_par_filters])
diff -Naur netcdf-c-4.8.0.orig/examples/CDL/do_comps.sh netcdf-c-4.8.0/examples/CDL/do_comps.sh
--- netcdf-c-4.8.0.orig/examples/CDL/do_comps.sh 2021-03-30 17:23:10.000000000 -0300
+++ netcdf-c-4.8.0/examples/CDL/do_comps.sh 2021-03-31 16:18:03.592941903 -0300
diff --color -Naur netcdf-c-4.9.0.orig/examples/CDL/do_comps.sh netcdf-c-4.9.0/examples/CDL/do_comps.sh
--- netcdf-c-4.9.0.orig/examples/CDL/do_comps.sh 2022-06-10 18:04:15.000000000 -0300
+++ netcdf-c-4.9.0/examples/CDL/do_comps.sh 2022-06-13 09:16:42.730419193 -0300
@@ -9,6 +9,8 @@
# This shell script runs the cmp test on the example programs.
# $Id: do_comps.sh,v 1.1 2006/06/27 17:44:54 ed Exp $
Expand All @@ -55,10 +55,10 @@ diff -Naur netcdf-c-4.8.0.orig/examples/CDL/do_comps.sh netcdf-c-4.8.0/examples/

echo "*** All example creations worked!"

diff -Naur netcdf-c-4.8.0.orig/test_common.in netcdf-c-4.8.0/test_common.in
--- netcdf-c-4.8.0.orig/test_common.in 2021-03-30 17:23:10.000000000 -0300
+++ netcdf-c-4.8.0/test_common.in 2021-03-31 16:20:05.514199909 -0300
@@ -77,8 +77,8 @@
diff --color -Naur netcdf-c-4.9.0.orig/test_common.in netcdf-c-4.9.0/test_common.in
--- netcdf-c-4.9.0.orig/test_common.in 2022-06-10 18:04:15.000000000 -0300
+++ netcdf-c-4.9.0/test_common.in 2022-06-13 09:17:29.281492909 -0300
@@ -101,8 +101,8 @@
top_srcdir="$TOPSRCDIR"
top_builddir="$TOPBUILDDIR"

Expand All @@ -69,7 +69,7 @@ diff -Naur netcdf-c-4.8.0.orig/test_common.in netcdf-c-4.8.0/test_common.in

# srcdir may or may not be defined, but if not, then create it
if test "x$srcdir" = x ; then
@@ -95,6 +95,12 @@
@@ -119,6 +119,12 @@
# execdir is an alias for builddir
execdir="${builddir}"

Expand Down
13 changes: 13 additions & 0 deletions recipe/patches/fix-ncdump-tests-prereq.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/netcdf-c-v4.9.0/ncdump/CMakeLists.txt b/netcdf-c-fixed/ncdump/CMakeLists.txt
index 056810f..52dae3b 100644
--- a/netcdf-c-v4.9.0/ncdump/CMakeLists.txt
+++ b/netcdf-c-fixed/ncdump/CMakeLists.txt
@@ -256,7 +256,7 @@ endif()
add_sh_test(ncdump tst_netcdf4_4)
add_sh_test(ncdump tst_nccopy4)

- SET_TESTS_PROPERTIES(ncdump_tst_nccopy4 PROPERTIES DEPENDS "ncdump_run_ncgen_tests;ncdump_tst_output;ncdump_tst_ncgen4;ncdump_tst_fillbug;ncdump_tst_netcdf4_4;ncdump_tst_h_scalar;tst_comp;tst_comp2")
+ SET_TESTS_PROPERTIES(ncdump_tst_nccopy4 PROPERTIES DEPENDS "ncdump_run_ncgen_tests;ncdump_tst_output;ncdump_tst_ncgen4;ncdump_sh_tst_fillbug;ncdump_tst_netcdf4_4;ncdump_tst_h_scalar;tst_comp;tst_comp2;tst_nans;tst_opaque_data;tst_create_files;tst_special_atts")
SET_TESTS_PROPERTIES(ncdump_tst_nccopy5 PROPERTIES DEPENDS "ncdump_tst_nccopy4")

ENDIF(USE_HDF5)
Loading