From 5db84e2a5b8fae5fcffa3a86b683b2fdf9c1c3a3 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:31:07 +0000 Subject: [PATCH 1/4] revert: partial dash#3003 (Fix 2 common Travis failures which happen when Travis has network issues) commits reverted: - 9a4524162111870308fcf3313b3e0cf5402f079f - 41f46f5ea68df4b6bd97baf5660f9076643294ba --- depends/Makefile | 1 + depends/builders/darwin.mk | 2 +- depends/builders/linux.mk | 2 +- depends/funcs.mk | 2 -- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/depends/Makefile b/depends/Makefile index 823be933a7..67d4fae792 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -49,6 +49,7 @@ PATCHES_PATH = $(BASEDIR)/patches BASEDIR = $(CURDIR) HASH_LENGTH:=11 DOWNLOAD_CONNECT_TIMEOUT:=30 +DOWNLOAD_RETRIES:=3 HOST_ID_SALT ?= salt BUILD_ID_SALT ?= salt diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk index e298d302ca..4721c1a354 100644 --- a/depends/builders/darwin.mk +++ b/depends/builders/darwin.mk @@ -7,7 +7,7 @@ build_darwin_OTOOL:=$(shell xcrun -f otool) build_darwin_NM:=$(shell xcrun -f nm) build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) build_darwin_SHA256SUM=shasum -a 256 -build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) -o +build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o #darwin host on darwin builder. overrides darwin host preferences. darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) -isysroot$(shell xcrun --show-sdk-path) diff --git a/depends/builders/linux.mk b/depends/builders/linux.mk index 9af0d066a0..b03f424010 100644 --- a/depends/builders/linux.mk +++ b/depends/builders/linux.mk @@ -1,2 +1,2 @@ build_linux_SHA256SUM = sha256sum -build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) -o +build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o diff --git a/depends/funcs.mk b/depends/funcs.mk index deca7806cc..87052bf6e0 100644 --- a/depends/funcs.mk +++ b/depends/funcs.mk @@ -37,8 +37,6 @@ endef define fetch_file ( test -f $$($(1)_source_dir)/$(4) || \ ( $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5)) || \ - (sleep 5 && $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5))) || \ - (sleep 10 && $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5))) || \ $(call fetch_file_inner,$(1),$(FALLBACK_DOWNLOAD_PATH),$(3),$(4),$(5)))) endef From f15e1db4770691e88890e98e1d2842a4bb57c145 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:37:02 +0000 Subject: [PATCH 2/4] fix: make `std::unary_function` suppression flag no longer contingent on `--enable-suppress-external-warnings` This is in line with how it's done in 880d4aaf upstream. This wasn't noticed with CI as we build with `--enable-suppress-external-warnings` by default. --- configure.ac | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 84eeaa7299..c4ace5c7de 100644 --- a/configure.ac +++ b/configure.ac @@ -1458,6 +1458,12 @@ AX_BOOST_BASE([1.64.0],[],[AC_MSG_ERROR([Boost is not available!])]) if test x$want_boost = xno; then AC_MSG_ERROR([[only libdashconsensus can be built without boost]]) fi + +dnl Prevent use of std::unary_function, which was removed in C++17, +dnl and will generate warnings with newer compilers. +dnl See: https://github.com/boostorg/container_hash/issues/22. +BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE" + AX_BOOST_FILESYSTEM dnl Opt-in to Boost Process @@ -1471,11 +1477,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], fi if test x$suppress_external_warnings != xno; then - dnl Prevent use of std::unary_function, which was removed in C++17, - dnl and will generate warnings with newer compilers. - dnl See: https://github.com/boostorg/container_hash/issues/22. - BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE" - BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS) fi From 3c622a3916d25b6462ad30bd7a246b56ce004a45 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Thu, 11 Jul 2024 15:30:01 +0000 Subject: [PATCH 3/4] revert: partial dash#5610 (make depends compilable with Xcode 15 on macos) reverted commit: - aa7ba58804b6d514ad94b1654dd0b89970d05ab8 --- depends/packages/boost.mk | 6 ------ 1 file changed, 6 deletions(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index d0e3498269..09d12c210e 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -21,12 +21,8 @@ $(package)_config_opts_i686_android=address-model=32 $(package)_config_opts_aarch64_android=address-model=64 $(package)_config_opts_x86_64_android=address-model=64 $(package)_config_opts_armv7a_android=address-model=32 -unary_function=unary_function ifneq (,$(findstring clang,$($(package)_cxx))) $(package)_toolset_$(host_os)=clang -ifeq ($(build_os),darwin) -unary_function=__unary_function -endif else $(package)_toolset_$(host_os)=gcc endif @@ -39,9 +35,7 @@ $(package)_cxxflags_android=-fPIC $(package)_cxxflags_x86_64=-fcf-protection=full endef -# Fix missing unary_function in clang15 on macos, can be removed after upgrading to 1.81 define $(package)_preprocess_cmds - sed -i.old "s/unary_function/$(unary_function)/" boost/container_hash/hash.hpp && \ echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cflags)\" \"$($(package)_cxxflags)\" \"$($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_ar)\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef From bbc99571f36ecfd817dc33b883c5e6f120240270 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Thu, 11 Jul 2024 15:31:08 +0000 Subject: [PATCH 4/4] fix: sidestep c++17 std::unary_function removal by compiling boost with c++11 we can revert this after upgrading to boost 1.81 --- depends/packages/boost.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 09d12c210e..77ada65e0f 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -27,7 +27,7 @@ else $(package)_toolset_$(host_os)=gcc endif $(package)_config_libraries=filesystem,test -$(package)_cxxflags=-std=c++17 +$(package)_cxxflags=-std=c++11 $(package)_cxxflags_linux=-fPIC $(package)_cxxflags_freebsd=-fPIC $(package)_cxxflags_openbsd=-fPIC