From f5e5066bd592db61bd7a03ba3ed8b0876aa0fcf0 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Wed, 16 Sep 2020 16:47:35 -0300 Subject: [PATCH] Update deps (#1348) * Update submodules/static deps to latest versions * Add mingw zmq build patch * Drop support for Windows 2000 --- cmake/StaticBuild.cmake | 17 +- cmake/win32.cmake | 2 +- .../patches/libzmq-mingw-closesocket.patch | 12 ++ .../libzmq-pr3601-mingw-build-fix.patch | 69 ------ .../libzmq-pr3613-fix-funcptr-call.patch | 43 ---- .../cross/patches/libzmq-win32-release.patch | 198 ------------------ external/date | 2 +- external/ghc-filesystem | 2 +- external/libuv | 2 +- external/loki-mq | 2 +- external/pybind11 | 2 +- external/sqlite_orm | 2 +- 12 files changed, 27 insertions(+), 326 deletions(-) create mode 100644 contrib/cross/patches/libzmq-mingw-closesocket.patch delete mode 100644 contrib/cross/patches/libzmq-pr3601-mingw-build-fix.patch delete mode 100644 contrib/cross/patches/libzmq-pr3613-fix-funcptr-call.patch delete mode 100644 contrib/cross/patches/libzmq-win32-release.patch diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 4c8d3090d..72a40f3e9 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -19,17 +19,17 @@ set(EXPAT_SOURCE expat-${EXPAT_VERSION}.tar.xz) set(EXPAT_HASH SHA512=e082874efcc4b00709e2c0192c88fb15dfc4f33fc3a2b09e619b010ea93baaf7e7572683f738463db0ce2350cab3de48a0c38af6b74d1c4f5a9e311f499edab0 CACHE STRING "expat source hash") -set(UNBOUND_VERSION 1.10.1 CACHE STRING "unbound version") +set(UNBOUND_VERSION 1.11.0 CACHE STRING "unbound version") set(UNBOUND_MIRROR ${LOCAL_MIRROR} https://nlnetlabs.nl/downloads/unbound CACHE STRING "unbound download mirror(s)") set(UNBOUND_SOURCE unbound-${UNBOUND_VERSION}.tar.gz) -set(UNBOUND_HASH SHA256=b73677c21a71cf92f15cc8cfe76a3d875e40f65b6150081c39620b286582d536 +set(UNBOUND_HASH SHA256=9f2f0798f76eb8f30feaeda7e442ceed479bc54db0e3ac19c052d68685e51ef7 CACHE STRING "unbound source hash") -set(SQLITE3_VERSION 3320300 CACHE STRING "sqlite3 version") +set(SQLITE3_VERSION 3330000 CACHE STRING "sqlite3 version") set(SQLITE3_MIRROR ${LOCAL_MIRROR} https://www.sqlite.org/2020 CACHE STRING "sqlite3 download mirror(s)") set(SQLITE3_SOURCE sqlite-autoconf-${SQLITE3_VERSION}.tar.gz) -set(SQLITE3_HASH SHA512=add0ef47c059be0a75add7ab4fe52b2fbd4060cacbf1cbb93f1b4007cdeb8fc92256b1aadc224c4839e733fb868e56d9d73dd33c56a6f66180d1ff001d8d275e +set(SQLITE3_HASH SHA512=c0d79d4012a01f12128ab5044b887576a130663245b85befcc0ab82ad3a315dd1e7f54b6301f842410c9c21b73237432c44a1d7c2fe0e0709435fec1f1a20a11 CACHE STRING "sqlite3 source hash") set(SODIUM_VERSION 1.0.18 CACHE STRING "libsodium version") @@ -41,11 +41,11 @@ set(SODIUM_SOURCE libsodium-${SODIUM_VERSION}.tar.gz) set(SODIUM_HASH SHA512=17e8638e46d8f6f7d024fe5559eccf2b8baf23e143fadd472a7d29d228b186d86686a5e6920385fe2020729119a5f12f989c3a782afbd05a8db4819bb18666ef CACHE STRING "libsodium source hash") -set(ZMQ_VERSION 4.3.2 CACHE STRING "libzmq version") +set(ZMQ_VERSION 4.3.3 CACHE STRING "libzmq version") set(ZMQ_MIRROR ${LOCAL_MIRROR} https://github.com/zeromq/libzmq/releases/download/v${ZMQ_VERSION} CACHE STRING "libzmq mirror(s)") set(ZMQ_SOURCE zeromq-${ZMQ_VERSION}.tar.gz) -set(ZMQ_HASH SHA512=b6251641e884181db9e6b0b705cced7ea4038d404bdae812ff47bdd0eed12510b6af6846b85cb96898e253ccbac71eca7fe588673300ddb9c3109c973250c8e4 +set(ZMQ_HASH SHA512=4c18d784085179c5b1fcb753a93813095a12c8d34970f2e1bfca6499be6c9d67769c71c68b7ca54ff181b20390043170e89733c22f76ff1ea46494814f7095b1 CACHE STRING "libzmq source hash") @@ -204,10 +204,9 @@ build_external(sqlite3) add_static_target(sqlite3 sqlite3_external libsqlite3.a) -if(ZMQ_VERSION VERSION_LESS 4.3.3 AND CMAKE_CROSSCOMPILING AND ARCH_TRIPLET MATCHES mingw) +if(ZMQ_VERSION VERSION_LESS 4.3.4 AND CMAKE_CROSSCOMPILING AND ARCH_TRIPLET MATCHES mingw) set(zmq_patch - #PATCH_COMMAND patch -p1 -i ${PROJECT_SOURCE_DIR}/contrib/cross/patches/libzmq-pr3601-mingw-build-fix.patch) - PATCH_COMMAND patch -p1 -i ${PROJECT_SOURCE_DIR}/contrib/cross/patches/libzmq-win32-release.patch) + PATCH_COMMAND patch -p1 -i ${PROJECT_SOURCE_DIR}/contrib/cross/patches/libzmq-mingw-closesocket.patch) endif() build_external(zmq DEPENDS sodium_external diff --git a/cmake/win32.cmake b/cmake/win32.cmake index 78f5b2e8b..075eaec14 100644 --- a/cmake/win32.cmake +++ b/cmake/win32.cmake @@ -15,7 +15,7 @@ if(NOT MSVC_VERSION) add_compile_options(-fno-ident -Wa,-mbig-obj) link_libraries( -lws2_32 -lshlwapi -ldbghelp -luser32 -liphlpapi -lpsapi -luserenv ) # zmq requires windows xp or higher - add_definitions(-DWINVER=0x0500 -D_WIN32_WINNT=0x0500) + add_definitions(-DWINVER=0x0501 -D_WIN32_WINNT=0x0501) endif() if(EMBEDDED_CFG) diff --git a/contrib/cross/patches/libzmq-mingw-closesocket.patch b/contrib/cross/patches/libzmq-mingw-closesocket.patch new file mode 100644 index 000000000..1971d6bc9 --- /dev/null +++ b/contrib/cross/patches/libzmq-mingw-closesocket.patch @@ -0,0 +1,12 @@ +diff --git a/tests/testutil.hpp b/tests/testutil.hpp +index c6f5e4de..6a1c8bb8 100644 +--- a/tests/testutil.hpp ++++ b/tests/testutil.hpp +@@ -102,7 +102,6 @@ const uint8_t zmtp_ready_sub[27] = { + #include + #include + #include +-#define close closesocket + typedef int socket_size_t; + inline const char *as_setsockopt_opt_t (const void *opt) + { diff --git a/contrib/cross/patches/libzmq-pr3601-mingw-build-fix.patch b/contrib/cross/patches/libzmq-pr3601-mingw-build-fix.patch deleted file mode 100644 index 0693ed92d..000000000 --- a/contrib/cross/patches/libzmq-pr3601-mingw-build-fix.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff --git a/src/thread.cpp b/src/thread.cpp -index b14d70757..3675899be 100644 ---- a/src/thread.cpp -+++ b/src/thread.cpp -@@ -32,6 +32,10 @@ - #include "thread.hpp" - #include "err.hpp" - -+#ifdef ZMQ_HAVE_WINDOWS -+#include -+#endif -+ - bool zmq::thread_t::get_started () const - { - return _started; -@@ -113,10 +117,22 @@ struct thread_info_t - #pragma pack(pop) - } - -+typedef struct _MY_EXCEPTION_REGISTRATION_RECORD -+{ -+ struct _MY_EXCEPTION_REGISTRATION_RECORD *Next; -+ void *Handler; -+} MY_EXCEPTION_REGISTRATION_RECORD; -+ -+static EXCEPTION_DISPOSITION NTAPI continue_execution (EXCEPTION_RECORD *rec, -+ void *frame, CONTEXT *ctx, void *disp) -+{ -+ return ExceptionContinueExecution; -+} -+ - void zmq::thread_t:: - applyThreadName () // to be called in secondary thread context - { -- if (!_name[0]) -+ if (!_name[0] || !IsDebuggerPresent()) - return; - - thread_info_t thread_info; -@@ -125,17 +141,19 @@ void zmq::thread_t:: - thread_info._thread_id = -1; - thread_info._flags = 0; - --#pragma warning(push) --#pragma warning(disable : 6320 6322) -- __try { -- DWORD MS_VC_EXCEPTION = 0x406D1388; -+ NT_TIB *tib = ((NT_TIB*)NtCurrentTeb()); -+ -+ MY_EXCEPTION_REGISTRATION_RECORD rec; -+ rec.Next = (MY_EXCEPTION_REGISTRATION_RECORD *)tib->ExceptionList; -+ rec.Handler = continue_execution; -+ -+ // push our handler, raise, and finally pop our handler -+ tib->ExceptionList = (_EXCEPTION_REGISTRATION_RECORD *)&rec; -+ DWORD MS_VC_EXCEPTION = 0x406D1388; - RaiseException (MS_VC_EXCEPTION, 0, -- sizeof (thread_info) / sizeof (ULONG_PTR), -- (ULONG_PTR *) &thread_info); -- } -- __except (EXCEPTION_CONTINUE_EXECUTION) { -- } --#pragma warning(pop) -+ sizeof (thread_info) / sizeof (ULONG_PTR), -+ (ULONG_PTR *) &thread_info); -+ tib->ExceptionList = (_EXCEPTION_REGISTRATION_RECORD *)(((MY_EXCEPTION_REGISTRATION_RECORD *)tib->ExceptionList)->Next); - } - - #elif defined ZMQ_HAVE_VXWORKS diff --git a/contrib/cross/patches/libzmq-pr3613-fix-funcptr-call.patch b/contrib/cross/patches/libzmq-pr3613-fix-funcptr-call.patch deleted file mode 100644 index a17252823..000000000 --- a/contrib/cross/patches/libzmq-pr3613-fix-funcptr-call.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/RELICENSE/tomzbench.md b/RELICENSE/tomzbench.md -new file mode 100644 -index 000000000..1cbcc4fdb ---- /dev/null -+++ b/RELICENSE/tomzbench.md -@@ -0,0 +1,14 @@ -+# Permission to Relicense under MPLv2 -+ -+This is a statement by Thomas Chiantia -+that grants permission to relicense its copyrights in the libzmq C++ -+library (ZeroMQ) under the Mozilla Public License v2 (MPLv2). -+ -+A portion of the commits made by the Github handle "tomzbench", with -+commit author "Thomas", are copyright of -+Thomas Chiantia. -+This document hereby grants the libzmq project team to relicense libzmq, -+including all past, present and future contributions of the author listed above. -+ -+Thomas Chiantia -+2019/08/10 -diff --git a/src/thread.cpp b/src/thread.cpp -index 2cad2adaa..6f07e9cee 100644 ---- a/src/thread.cpp -+++ b/src/thread.cpp -@@ -117,11 +117,14 @@ struct thread_info_t - #pragma pack(pop) - } - --typedef struct _MY_EXCEPTION_REGISTRATION_RECORD -+struct MY_EXCEPTION_REGISTRATION_RECORD - { -- struct _MY_EXCEPTION_REGISTRATION_RECORD *Next; -- void *Handler; --} MY_EXCEPTION_REGISTRATION_RECORD; -+ typedef EXCEPTION_DISPOSITION (NTAPI *HandlerFunctionType) ( -+ EXCEPTION_RECORD *, void *, CONTEXT *, void *); -+ -+ MY_EXCEPTION_REGISTRATION_RECORD *Next; -+ HandlerFunctionType Handler; -+}; - - static EXCEPTION_DISPOSITION NTAPI continue_execution (EXCEPTION_RECORD *rec, - void *frame, diff --git a/contrib/cross/patches/libzmq-win32-release.patch b/contrib/cross/patches/libzmq-win32-release.patch deleted file mode 100644 index e6e205c37..000000000 --- a/contrib/cross/patches/libzmq-win32-release.patch +++ /dev/null @@ -1,198 +0,0 @@ -From 00440f91ebbae83d7d2aeb429b306bee27f3b165 Mon Sep 17 00:00:00 2001 -From: Rick V -Date: Wed, 31 Oct 2019 17:20:05 -0500 -Subject: ZMQ patches for Windows - -Configure with: ./configure [--host=i686-w64-mingw32 --target=i686-w64-mingw32] --disable-shared -CFLAGS='-march=nocona -mfpmath=sse -O3' CPPFLAGS=-DZMQ_HAVE_WINDOWS_TARGET_XP - --rick - ---- - -diff --git a/include/zmq.h b/include/zmq.h -index f5713f80..bb7b818e 100644 ---- a/include/zmq.h -+++ b/include/zmq.h -@@ -65,14 +65,9 @@ extern "C" { - #endif - - #ifdef __MINGW32__ --// Require Windows XP or higher with MinGW for getaddrinfo(). --#if (_WIN32_WINNT >= 0x0501) --#else --#error You need at least Windows XP target --#endif --#endif - #include - #endif -+#endif - - /* Handle DSO symbol visibility */ - #if defined _WIN32 -diff --git a/src/address.hpp b/src/address.hpp -index b20a10e5..f848ec2b 100644 ---- a/src/address.hpp -+++ b/src/address.hpp -@@ -38,6 +38,7 @@ - #include - #else - #include -+#include - #endif - - namespace zmq -diff --git a/src/ip_resolver.cpp b/src/ip_resolver.cpp -index 4a8283de..a8b6fe6c 100644 ---- a/src/ip_resolver.cpp -+++ b/src/ip_resolver.cpp -@@ -595,6 +595,7 @@ int zmq::ip_resolver_t::wchar_to_utf8 (const WCHAR *src_, char **dest_) const - return 0; - } - -+#if !defined ZMQ_HAVE_WINDOWS_TARGET_XP - int zmq::ip_resolver_t::resolve_nic_name (ip_addr_t *ip_addr_, const char *nic_) - { - int rc; -@@ -674,6 +675,17 @@ int zmq::ip_resolver_t::resolve_nic_name (ip_addr_t *ip_addr_, const char *nic_) - } - return 0; - } -+#else -+// On other platforms we assume there are no sane interface names. -+int zmq::ip_resolver_t::resolve_nic_name (ip_addr_t *ip_addr_, const char *nic_) -+{ -+ LIBZMQ_UNUSED (ip_addr_); -+ LIBZMQ_UNUSED (nic_); -+ -+ errno = ENODEV; -+ return -1; -+} -+#endif - - #else - -diff --git a/src/precompiled.hpp b/src/precompiled.hpp -index f22a6937..45e5ba10 100644 ---- a/src/precompiled.hpp -+++ b/src/precompiled.hpp -@@ -85,6 +85,7 @@ - #include - #include - #include -+#include - - // standard C++ headers - #include -diff --git a/src/thread.cpp b/src/thread.cpp -index b14d7075..923d6a3d 100644 ---- a/src/thread.cpp -+++ b/src/thread.cpp -@@ -61,10 +61,10 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_, const char *name_) - strncpy (_name, name_, sizeof (_name) - 1); - #if defined _WIN32_WCE - _descriptor = -- (HANDLE) CreateThread (NULL, 0, &::thread_routine, this, 0, NULL); -+ (HANDLE) CreateThread (NULL, 0, &::thread_routine, this, 0, &_threadID); - #else - _descriptor = -- (HANDLE) _beginthreadex (NULL, 0, &::thread_routine, this, 0, NULL); -+ (HANDLE) _beginthreadex (NULL, 0, &::thread_routine, this, 0, &_threadID); - #endif - win_assert (_descriptor != NULL); - _started = true; -@@ -72,7 +72,7 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_, const char *name_) - - bool zmq::thread_t::is_current_thread () const - { -- return GetCurrentThreadId () == GetThreadId (_descriptor); -+ return GetCurrentThreadId () == _threadID; - } - - void zmq::thread_t::stop () -@@ -124,7 +124,7 @@ void zmq::thread_t:: - thread_info._name = _name; - thread_info._thread_id = -1; - thread_info._flags = 0; -- -+#ifdef _MSC_VER - #pragma warning(push) - #pragma warning(disable : 6320 6322) - __try { -@@ -136,6 +136,9 @@ void zmq::thread_t:: - __except (EXCEPTION_CONTINUE_EXECUTION) { - } - #pragma warning(pop) -+#else -+(void)thread_info; -+#endif - } - - #elif defined ZMQ_HAVE_VXWORKS -diff --git a/src/thread.hpp b/src/thread.hpp -index b13fc923..b4429af4 100644 ---- a/src/thread.hpp -+++ b/src/thread.hpp -@@ -107,6 +107,7 @@ class thread_t - - #ifdef ZMQ_HAVE_WINDOWS - HANDLE _descriptor; -+ unsigned _threadID; - #elif defined ZMQ_HAVE_VXWORKS - int _descriptor; - enum -diff --git a/src/udp_address.cpp b/src/udp_address.cpp -index d0dda564..1228e621 100644 ---- a/src/udp_address.cpp -+++ b/src/udp_address.cpp -@@ -104,7 +104,11 @@ int zmq::udp_address_t::resolve (const char *name_, bool bind_, bool ipv6_) - if (src_name == "*") { - _bind_interface = 0; - } else { -+#ifndef _WIN32 - _bind_interface = if_nametoindex (src_name.c_str ()); -+#else -+ _bind_interface = 0; -+#endif - if (_bind_interface == 0) { - // Error, probably not an interface name. - _bind_interface = -1; -diff --git a/src/windows.hpp b/src/windows.hpp -index 2d3b4985..78c071a7 100644 ---- a/src/windows.hpp -+++ b/src/windows.hpp -@@ -47,14 +47,6 @@ - #define _WIN32_WINNT _WIN32_WINNT_WIN10 - #endif - --#ifdef __MINGW32__ --// Require Windows XP or higher with MinGW for getaddrinfo(). --#if (_WIN32_WINNT >= 0x0501) --#else --#error You need at least Windows XP target --#endif --#endif -- - #include - #include - #include -@@ -78,6 +70,7 @@ struct tcp_keepalive - #endif - - #include -+#include - #include - #if !defined _WIN32_WCE - #include -diff --git a/tests/testutil_monitoring.cpp b/tests/testutil_monitoring.cpp -index 75bd763c..7fb8dedb 100644 ---- a/tests/testutil_monitoring.cpp -+++ b/tests/testutil_monitoring.cpp -@@ -26,6 +26,7 @@ - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . - */ -+#define __USE_MINGW_ANSI_STDIO 1 - #include "testutil_monitoring.hpp" - #include "testutil_unity.hpp" - diff --git a/external/date b/external/date index 9a0ee2542..cac99da8d 160000 --- a/external/date +++ b/external/date @@ -1 +1 @@ -Subproject commit 9a0ee2542848ab8625984fc8cdbfb9b5414c0082 +Subproject commit cac99da8dc88be719a728dc1b597b0ac307c1800 diff --git a/external/ghc-filesystem b/external/ghc-filesystem index e63a58c5b..d8abf146a 160000 --- a/external/ghc-filesystem +++ b/external/ghc-filesystem @@ -1 +1 @@ -Subproject commit e63a58c5bac94a3a75a7083f87bb092531407a92 +Subproject commit d8abf146a43ea12d28b09dfa71ece3bad4168185 diff --git a/external/libuv b/external/libuv index f52786b4b..25f4b8b8a 160000 --- a/external/libuv +++ b/external/libuv @@ -1 +1 @@ -Subproject commit f52786b4badf82e1bfad06b52ade0397b61cd14e +Subproject commit 25f4b8b8a3c0f934158cd37a37b0525d75ca488e diff --git a/external/loki-mq b/external/loki-mq index 30faadf01..0ac1d48bc 160000 --- a/external/loki-mq +++ b/external/loki-mq @@ -1 +1 @@ -Subproject commit 30faadf01a561be8bda1b9fd78cd606bb209576a +Subproject commit 0ac1d48bc8058bab4f10aeb3010343084f7a37d0 diff --git a/external/pybind11 b/external/pybind11 index fe755dce1..3b1dbebab 160000 --- a/external/pybind11 +++ b/external/pybind11 @@ -1 +1 @@ -Subproject commit fe755dce12766820a99eefbde32d6ceb0a828ca8 +Subproject commit 3b1dbebabc801c9cf6f0953a4c20b904d444f879 diff --git a/external/sqlite_orm b/external/sqlite_orm index f7ef17a6b..b30ddc6a5 160000 --- a/external/sqlite_orm +++ b/external/sqlite_orm @@ -1 +1 @@ -Subproject commit f7ef17a6bde6162e8b487deb36519bace412920a +Subproject commit b30ddc6a50dc582c93cd49d8d0cf8f5025ba1d2b