From 2c9105cfc19bd1fa6ca92e1109df2738ce674986 Mon Sep 17 00:00:00 2001 From: Kiran Shila Date: Sat, 9 Jul 2022 14:10:00 -0700 Subject: [PATCH 1/4] [casacore] Update to 3.5.0 --- C/casacore/build_tarballs.jl | 10 +---- ...on-of-RefTable-on-i386-platform-1129.patch | 27 ----------- ...erloading-to-detect-strerror-variant.patch | 45 ------------------- 3 files changed, 2 insertions(+), 80 deletions(-) delete mode 100644 C/casacore/bundled/patches/0001-Fix-compilation-of-RefTable-on-i386-platform-1129.patch delete mode 100644 C/casacore/bundled/patches/0002-Use-overloading-to-detect-strerror-variant.patch diff --git a/C/casacore/build_tarballs.jl b/C/casacore/build_tarballs.jl index 42f5d5b3d0f..4354ffe04e9 100644 --- a/C/casacore/build_tarballs.jl +++ b/C/casacore/build_tarballs.jl @@ -4,11 +4,11 @@ using BinaryBuilder, Pkg name = "casacore" -version = v"3.4.0" +version = v"3.5.0" # Collection of sources required to complete build sources = [ - GitSource("https://github.com/casacore/casacore.git", "a735bf5f31ea012ac4f7f7378a1f89c1fc136a06"), + GitSource("https://github.com/casacore/casacore.git", "ff766c49fdfddd34715fd017a08aaedcc01736e0"), DirectorySource("./bundled") ] @@ -16,12 +16,6 @@ sources = [ script = raw""" cd $WORKSPACE/srcdir/casacore -# Apply upstream patch that fixes i386 builds -atomic_patch -p1 ${WORKSPACE}/srcdir/patches/0001-Fix-compilation-of-RefTable-on-i386-platform-1129.patch - -# Apply strerror patch -atomic_patch -p1 ${WORKSPACE}/srcdir/patches/0002-Use-overloading-to-detect-strerror-variant.patch - mkdir build && cd build CMAKE_FLAGS=() diff --git a/C/casacore/bundled/patches/0001-Fix-compilation-of-RefTable-on-i386-platform-1129.patch b/C/casacore/bundled/patches/0001-Fix-compilation-of-RefTable-on-i386-platform-1129.patch deleted file mode 100644 index 4f7eb49d452..00000000000 --- a/C/casacore/bundled/patches/0001-Fix-compilation-of-RefTable-on-i386-platform-1129.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 6f4d5783453e5e3516a134bda3b55e0a50a27aa0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andr=C3=A9=20Offringa?= -Date: Mon, 8 Nov 2021 22:12:31 +0100 -Subject: [PATCH] Fix compilation of RefTable on i386 platform (#1129) - -Fixes #1123. I've tested compilation on a i386 virtual machine, and it's fixed. However, -there are many failing unit tests on the i386 VM. ---- - tables/Tables/RefTable.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tables/Tables/RefTable.cc b/tables/Tables/RefTable.cc -index 27dba419a..0fcbc08b1 100644 ---- a/tables/Tables/RefTable.cc -+++ b/tables/Tables/RefTable.cc -@@ -115,7 +115,7 @@ RefTable::RefTable (BaseTable* btp, const Vector& mask) - tdescPtr_p = new TableDesc (btp->tableDesc(), TableDesc::Scratch); - setup (btp, Vector()); - //# Store the rownr if the mask is set. -- rownr_t nr = min (mask.nelements(), btp->nrow()); -+ rownr_t nr = std::min (mask.nelements(), btp->nrow()); - for (rownr_t i=0; i -Date: Sat, 11 Jun 2022 14:15:58 -0700 -Subject: [PATCH] Use overloading to detect strerror variant - ---- - casa/Exceptions/Error2.cc | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/casa/Exceptions/Error2.cc b/casa/Exceptions/Error2.cc -index b372f4ccf..8de3a7e6e 100644 ---- a/casa/Exceptions/Error2.cc -+++ b/casa/Exceptions/Error2.cc -@@ -213,19 +213,19 @@ SystemCallError::SystemCallError (int error, const String &msg, - {} - SystemCallError::~SystemCallError() noexcept - {} -+String strerror_overload(int err) -+{ -+ return "errno " + String::toString(err); -+} -+String strerror_overload(char *err) -+{ -+ return err; -+} - String SystemCallError::errorMessage(int error) - { - // Use strerror_r for thread-safety. - char buffer[128]; -- // There are two incompatible versions of versions of strerror_r() --#if !__linux__ || (!_GNU_SOURCE && (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)) -- if (strerror_r(error, buffer, sizeof buffer) == 0) { -- return String(buffer); -- } -- return "errno " + String::toString(error); --#else -- return strerror_r(error, buffer, sizeof buffer); --#endif -+ return strerror_overload(strerror_r(error, buffer, sizeof buffer)); - } - - --- -2.36.1 - From 9e51e34bfd2cdf7038cffb9ab19ec20ad00f02d0 Mon Sep 17 00:00:00 2001 From: Kiran Shila Date: Sat, 9 Jul 2022 14:11:58 -0700 Subject: [PATCH 2/4] Remove bundled DirectorySource --- C/casacore/build_tarballs.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/C/casacore/build_tarballs.jl b/C/casacore/build_tarballs.jl index 4354ffe04e9..315c9be4dea 100644 --- a/C/casacore/build_tarballs.jl +++ b/C/casacore/build_tarballs.jl @@ -9,7 +9,6 @@ version = v"3.5.0" # Collection of sources required to complete build sources = [ GitSource("https://github.com/casacore/casacore.git", "ff766c49fdfddd34715fd017a08aaedcc01736e0"), - DirectorySource("./bundled") ] # Bash recipe for building across all platforms From 3d6b63dfee1f9e996db0f664f6d9bac5f3d3d11f Mon Sep 17 00:00:00 2001 From: Kiran Shila Date: Sat, 9 Jul 2022 15:14:10 -0700 Subject: [PATCH 3/4] Mystery dependencies, "portable" code --- C/casacore/build_tarballs.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/C/casacore/build_tarballs.jl b/C/casacore/build_tarballs.jl index 315c9be4dea..825331c64e1 100644 --- a/C/casacore/build_tarballs.jl +++ b/C/casacore/build_tarballs.jl @@ -31,7 +31,10 @@ CMAKE_FLAGS+=(-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN}) CMAKE_FLAGS+=(-DUSE_OPENMP=OFF) # Don't build python hooks -CMAKE_FLAGS+=(-DBUILD_PYTHON=no) +CMAKE_FLAGS+=(-DBUILD_PYTHON3=OFF) + +# Build "portable" code +CMAKE_FLAGS+=(-DPORTABLE=ON) # Stock FFTW3 has threads already baked in CMAKE_FLAGS+=(-DFFTW3_DISABLE_THREADS=yes) @@ -105,6 +108,8 @@ dependencies = [ Dependency(PackageSpec(name="CFITSIO_jll", uuid="b3e40c51-02ae-5482-8a39-3ace5868dcf4"); compat = "4.0.0") Dependency(PackageSpec(name="WCS_jll", uuid="550c8279-ae0e-5d1b-948f-937f2608a23e"); compat = "7.7.0") Dependency(PackageSpec(name="Readline_jll", uuid="05236dd9-4125-5232-aa7c-9ec0c9b2c25a"); compat = "8.1.1") + Dependency(PackageSpec(name="boost_jll", uuid="28df3c45-c428-5900-9ff8-a3135698ca75"); compat = "1.76.0") + Dependency(PackageSpec(name="GSL_jll", uuid="1b77fbbe-d8ee-58f0-85f9-836ddc23a7a4"); compat = "2.7.2") Dependency(PackageSpec(name="OpenBLAS32_jll", uuid="656ef2d0-ae68-5445-9ca0-591084a874a2")) Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")) ] From 67fdd455efd2971dba6e164e55f7747ace46b9ee Mon Sep 17 00:00:00 2001 From: Kiran Shila Date: Sat, 9 Jul 2022 15:23:23 -0700 Subject: [PATCH 4/4] No boost --- C/casacore/build_tarballs.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/C/casacore/build_tarballs.jl b/C/casacore/build_tarballs.jl index 825331c64e1..73afaa9b423 100644 --- a/C/casacore/build_tarballs.jl +++ b/C/casacore/build_tarballs.jl @@ -108,7 +108,6 @@ dependencies = [ Dependency(PackageSpec(name="CFITSIO_jll", uuid="b3e40c51-02ae-5482-8a39-3ace5868dcf4"); compat = "4.0.0") Dependency(PackageSpec(name="WCS_jll", uuid="550c8279-ae0e-5d1b-948f-937f2608a23e"); compat = "7.7.0") Dependency(PackageSpec(name="Readline_jll", uuid="05236dd9-4125-5232-aa7c-9ec0c9b2c25a"); compat = "8.1.1") - Dependency(PackageSpec(name="boost_jll", uuid="28df3c45-c428-5900-9ff8-a3135698ca75"); compat = "1.76.0") Dependency(PackageSpec(name="GSL_jll", uuid="1b77fbbe-d8ee-58f0-85f9-836ddc23a7a4"); compat = "2.7.2") Dependency(PackageSpec(name="OpenBLAS32_jll", uuid="656ef2d0-ae68-5445-9ca0-591084a874a2")) Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae"))