From fdb74b8e387c6e436674991f139f7bef13ab50ed Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Sat, 5 Feb 2022 15:51:02 -0800 Subject: [PATCH 1/9] Build boost::iostreams with the zlib filter Explicitly add zlib to the requirements so that boost::iostreams gets built with the zlib filter. This was being pulled in implicitly at one point but recently stopped working; make it explicit. Add a compile+link test to make sure the final library includes the necessary symbols. Closes #114. --- recipe/meta.yaml | 5 ++++- recipe/run_test.bat | 4 ++++ recipe/run_test.sh | 3 +++ recipe/test/test_iostreams_zlib.cpp | 19 +++++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 recipe/run_test.bat create mode 100644 recipe/run_test.sh create mode 100644 recipe/test/test_iostreams_zlib.cpp diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 85827dc..e1210e7 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,7 +14,7 @@ source: - e193f080c7d209516ac9b712fa0c50bb08026fa2.patch build: - number: 6 + number: 7 requirements: build: @@ -24,6 +24,7 @@ requirements: - icu # [unix] - xz # [unix] - bzip2 + - zlib - zstd run: @@ -36,6 +37,8 @@ requirements: - libboost <0 test: + files: + - test commands: # Verify Python headers are removed. - "! test -f $PREFIX/include/boost/python.hpp" # [unix] diff --git a/recipe/run_test.bat b/recipe/run_test.bat new file mode 100644 index 0000000..a6a23f6 --- /dev/null +++ b/recipe/run_test.bat @@ -0,0 +1,4 @@ +:: Test boost::iostreams zlib filter support +cd test +cl.exe /EHsc /I%PREFIX%\Library\include test_iostreams_zlib.cpp /link /libpath:%PREFIX%\Library\lib boost_iostreams.lib +if errorlevel 1 exit 1 diff --git a/recipe/run_test.sh b/recipe/run_test.sh new file mode 100644 index 0000000..204fdee --- /dev/null +++ b/recipe/run_test.sh @@ -0,0 +1,3 @@ +# Test boost::iostreams zlib filter support +cd test +${CXX} -I$PREFIX/include -L$PREFIX/lib test_iostreams_zlib.cpp -lboost_iostreams diff --git a/recipe/test/test_iostreams_zlib.cpp b/recipe/test/test_iostreams_zlib.cpp new file mode 100644 index 0000000..1c086d5 --- /dev/null +++ b/recipe/test/test_iostreams_zlib.cpp @@ -0,0 +1,19 @@ +// Ensure that boost::iostreams includes the zlib filter support + +#include +#include +#include +#include +#include + +int main() +{ + using namespace std; + + ifstream file("hello.z", ios_base::in | ios_base::binary); + boost::iostreams::filtering_streambuf in; + in.push(boost::iostreams::zlib_decompressor()); + in.push(file); + boost::iostreams::copy(in, cout); + return 0; +} From eb34644999594b600bcee541d3e7874df399feed Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Sat, 5 Feb 2022 15:56:15 -0800 Subject: [PATCH 2/9] MNT: Re-rendered with conda-build 3.21.8, conda-smithy 3.16.2, and conda-forge-pinning 2022.02.05.21.28.19 --- .ci_support/linux_64_.yaml | 4 ++++ .ci_support/linux_aarch64_.yaml | 4 ++++ .ci_support/linux_ppc64le_.yaml | 4 ++++ .ci_support/migrations/icu69.yaml | 7 ------- .ci_support/osx_64_.yaml | 4 ++++ .ci_support/osx_arm64_.yaml | 4 ++++ .ci_support/win_64_.yaml | 4 ++++ 7 files changed, 24 insertions(+), 7 deletions(-) delete mode 100644 .ci_support/migrations/icu69.yaml diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index a71aec7..b12b9cb 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -19,9 +19,13 @@ pin_run_as_build: max_pin: x xz: max_pin: x.x + zlib: + max_pin: x.x target_platform: - linux-64 xz: - '5.2' +zlib: +- '1.2' zstd: - '1.5' diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 15051f3..fdf8bb8 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -23,9 +23,13 @@ pin_run_as_build: max_pin: x xz: max_pin: x.x + zlib: + max_pin: x.x target_platform: - linux-aarch64 xz: - '5.2' +zlib: +- '1.2' zstd: - '1.5' diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index feba0c9..0c12a58 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -19,9 +19,13 @@ pin_run_as_build: max_pin: x xz: max_pin: x.x + zlib: + max_pin: x.x target_platform: - linux-ppc64le xz: - '5.2' +zlib: +- '1.2' zstd: - '1.5' diff --git a/.ci_support/migrations/icu69.yaml b/.ci_support/migrations/icu69.yaml deleted file mode 100644 index 0cfadd8..0000000 --- a/.ci_support/migrations/icu69.yaml +++ /dev/null @@ -1,7 +0,0 @@ -__migrator: - build_number: 1 - kind: version - migration_number: 1 -icu: -- '69' -migrator_ts: 1635419000.7351162 diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 6f5ca28..0628661 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -19,9 +19,13 @@ pin_run_as_build: max_pin: x xz: max_pin: x.x + zlib: + max_pin: x.x target_platform: - osx-64 xz: - '5.2' +zlib: +- '1.2' zstd: - '1.5' diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index da747e7..0db09e5 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -19,9 +19,13 @@ pin_run_as_build: max_pin: x xz: max_pin: x.x + zlib: + max_pin: x.x target_platform: - osx-arm64 xz: - '5.2' +zlib: +- '1.2' zstd: - '1.5' diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index d7f8b16..e097dc4 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -9,7 +9,11 @@ cxx_compiler: pin_run_as_build: bzip2: max_pin: x + zlib: + max_pin: x.x target_platform: - win-64 +zlib: +- '1.2' zstd: - '1.5' From 485a02affd8891ff3a05f790902a32f1ad319235 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Sat, 5 Feb 2022 18:35:15 -0800 Subject: [PATCH 3/9] We now need a C++ compiler to run the tests --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e1210e7..a7c2bd0 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -39,6 +39,8 @@ requirements: test: files: - test + requires: + - {{ compiler('cxx') }} commands: # Verify Python headers are removed. - "! test -f $PREFIX/include/boost/python.hpp" # [unix] From 0e18473227b1f4fef86b521ef10e82035196f709 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Sat, 5 Feb 2022 21:37:00 -0800 Subject: [PATCH 4/9] Skip compile tests when cross-compiling --- recipe/run_test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipe/run_test.sh b/recipe/run_test.sh index 204fdee..23a963a 100644 --- a/recipe/run_test.sh +++ b/recipe/run_test.sh @@ -1,3 +1,8 @@ +# Skip compile tests if we are cross-compiling +if [ "${CONDA_BUILD_CROSS_COMPILATION}" = "1" ]; then + exit 0 +fi + # Test boost::iostreams zlib filter support cd test ${CXX} -I$PREFIX/include -L$PREFIX/lib test_iostreams_zlib.cpp -lboost_iostreams From e0a309637954cb4121298ed058d869b8aaf198f1 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Sat, 5 Feb 2022 22:10:27 -0800 Subject: [PATCH 5/9] Fix Boost linkage on Windows --- recipe/run_test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/run_test.bat b/recipe/run_test.bat index a6a23f6..7bece0c 100644 --- a/recipe/run_test.bat +++ b/recipe/run_test.bat @@ -1,4 +1,4 @@ :: Test boost::iostreams zlib filter support cd test -cl.exe /EHsc /I%PREFIX%\Library\include test_iostreams_zlib.cpp /link /libpath:%PREFIX%\Library\lib boost_iostreams.lib +cl.exe /EHsc /MD /DBOOST_ALL_DYN_LINK /DBOOST_ZLIB_BINARY=kernel32 /I%PREFIX%\Library\include test_iostreams_zlib.cpp /link /libpath:%PREFIX%\Library\lib if errorlevel 1 exit 1 From 1193c882c73ece0f7a1befbc21c6ad50cb40fcc1 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Sat, 5 Feb 2022 22:47:57 -0800 Subject: [PATCH 6/9] Skip compile tests when cross-compiling --- recipe/run_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/run_test.sh b/recipe/run_test.sh index 23a963a..a79a0e3 100644 --- a/recipe/run_test.sh +++ b/recipe/run_test.sh @@ -1,5 +1,5 @@ # Skip compile tests if we are cross-compiling -if [ "${CONDA_BUILD_CROSS_COMPILATION}" = "1" ]; then +if [ "${BUILD_PLATFORM}" != "${HOST_PLATFORM}" ]; then exit 0 fi From 5d9ec06834637de56a9eccd070ded4ffb09f5e41 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Sat, 5 Feb 2022 23:24:35 -0800 Subject: [PATCH 7/9] Only skip compile test on osx-arm64 --- recipe/run_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/run_test.sh b/recipe/run_test.sh index a79a0e3..49aaf7d 100644 --- a/recipe/run_test.sh +++ b/recipe/run_test.sh @@ -1,5 +1,5 @@ # Skip compile tests if we are cross-compiling -if [ "${BUILD_PLATFORM}" != "${HOST_PLATFORM}" ]; then +if echo ${CONDA_TOOLCHAIN_HOST} | grep -q arm64-apple; then exit 0 fi From d89bb86d6f90461dcc1be079d1c3917d4b475a22 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sun, 6 Feb 2022 13:49:01 -0600 Subject: [PATCH 8/9] Update run_test.sh --- recipe/run_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/run_test.sh b/recipe/run_test.sh index 49aaf7d..0b0d478 100644 --- a/recipe/run_test.sh +++ b/recipe/run_test.sh @@ -1,5 +1,5 @@ # Skip compile tests if we are cross-compiling -if echo ${CONDA_TOOLCHAIN_HOST} | grep -q arm64-apple; then +if [[ "${build_platform}" != "${target_platform}" ]]; then exit 0 fi From e0ce1c45237bcfe5ebd08700d79632fdc118d90b Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sun, 6 Feb 2022 13:49:41 -0600 Subject: [PATCH 9/9] Update meta.yaml --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index a7c2bd0..e9deef4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -40,7 +40,7 @@ test: files: - test requires: - - {{ compiler('cxx') }} + - {{ compiler('cxx') }} # [build_platform == target_platform] commands: # Verify Python headers are removed. - "! test -f $PREFIX/include/boost/python.hpp" # [unix]