From aae2a48c45a0c0df9602cf0785604b9996c72468 Mon Sep 17 00:00:00 2001 From: dmn-star <52277783+dmn-star@users.noreply.github.com> Date: Mon, 28 Dec 2020 15:48:43 +0100 Subject: [PATCH 1/7] Update conanfile.py Fix to compile libbsd on Xcode 12 --- recipes/libbsd/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/libbsd/all/conanfile.py b/recipes/libbsd/all/conanfile.py index 6e4f913cc161f..05cb317781976 100644 --- a/recipes/libbsd/all/conanfile.py +++ b/recipes/libbsd/all/conanfile.py @@ -48,6 +48,8 @@ def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + if tools.is_apple_os(self.settings.os): + self._autotools.flags.append("-Wno-error=implicit-function-declaration") conf_args = [ ] if self.options.shared: From e2a60cf03cbe876c7416aa96f9b23d22b878b454 Mon Sep 17 00:00:00 2001 From: dmn-star <52277783+dmn-star@users.noreply.github.com> Date: Thu, 31 Dec 2020 18:39:16 +0100 Subject: [PATCH 2/7] Update 0007-allow-builtins.patch Fix Folly to build with current VS version --- .../all/patches/0007-allow-builtins.patch | 121 +++++++++++++++++- 1 file changed, 118 insertions(+), 3 deletions(-) diff --git a/recipes/folly/all/patches/0007-allow-builtins.patch b/recipes/folly/all/patches/0007-allow-builtins.patch index 7ba7a61fbd217..c23974a5703ef 100644 --- a/recipes/folly/all/patches/0007-allow-builtins.patch +++ b/recipes/folly/all/patches/0007-allow-builtins.patch @@ -1,13 +1,128 @@ diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h -index 971cb88..102fda1 100644 +index 971cb8819..e68de4456 100644 --- a/folly/portability/Builtins.h +++ b/folly/portability/Builtins.h -@@ -41,7 +41,7 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { +@@ -41,7 +41,6 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { } } -#if !defined(_MSC_VER) || (_MSC_VER < 1923) -+#if !defined(_MSC_VER) || (_MSC_VER < 1930) FOLLY_ALWAYS_INLINE int __builtin_clz(unsigned int x) { unsigned long index; return int(_BitScanReverse(&index, (unsigned long)x) ? 31 - index : 32); +@@ -93,7 +92,6 @@ FOLLY_ALWAYS_INLINE int __builtin_ctzll(unsigned long long x) { + return int(_BitScanForward64(&index, x) ? index : 64); + } + #endif +-#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) + + FOLLY_ALWAYS_INLINE int __builtin_ffs(int x) { + unsigned long index; +@@ -119,15 +117,12 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) { + return int(__popcnt(x)); + } + +-#if !defined(_MSC_VER) || (_MSC_VER < 1923) + FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) { + static_assert(sizeof(x) == 4, ""); + return int(__popcnt(x)); + } +-#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) + #endif + +-#if !defined(_MSC_VER) || (_MSC_VER < 1923) + #if defined(_M_IX86) + FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { + return int(__popcnt((unsigned int)(x >> 32))) + +@@ -138,7 +133,6 @@ FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { + return int(__popcnt64(x)); + } + #endif +-#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) + + FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { + // I really hope frame is zero... +-- + +diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h +index e68de4456..30caf4003 100644 +--- a/folly/portability/Builtins.h ++++ b/folly/portability/Builtins.h +@@ -16,7 +16,7 @@ + + #pragma once + +-#if defined(_WIN32) && !defined(__clang__) ++#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__clang__) + #include + #include + #include +-- + +diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h +index 30caf4003..e8ef97266 100644 +--- a/folly/portability/Builtins.h ++++ b/folly/portability/Builtins.h +@@ -22,6 +22,14 @@ + #include + #include + ++// MSVC had added support for __builtin_clz etc. in 16.3 (1923) but it will be ++// removed in 16.8 (1928). ++#if (_MSC_VER >= 1923) && (_MSC_VER < 1928) ++#define FOLLY_DETAILFOLLY_DETAIL_MSC_BUILTIN_SUPPORT 1 ++#else ++#define FOLLY_DETAILFOLLY_DETAIL_MSC_BUILTIN_SUPPORT 0 ++#endif ++ + namespace folly { + namespace portability { + namespace detail { +@@ -41,6 +49,7 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { + } + } + ++#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) + FOLLY_ALWAYS_INLINE int __builtin_clz(unsigned int x) { + unsigned long index; + return int(_BitScanReverse(&index, (unsigned long)x) ? 31 - index : 32); +@@ -92,6 +101,7 @@ FOLLY_ALWAYS_INLINE int __builtin_ctzll(unsigned long long x) { + return int(_BitScanForward64(&index, x) ? index : 64); + } + #endif ++#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) + + FOLLY_ALWAYS_INLINE int __builtin_ffs(int x) { + unsigned long index; +@@ -117,12 +127,15 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) { + return int(__popcnt(x)); + } + ++#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) + FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) { + static_assert(sizeof(x) == 4, ""); + return int(__popcnt(x)); + } ++#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) + #endif + ++#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) + #if defined(_M_IX86) + FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { + return int(__popcnt((unsigned int)(x >> 32))) + +@@ -133,6 +146,7 @@ FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { + return int(__popcnt64(x)); + } + #endif ++#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) + + FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { + // I really hope frame is zero... +@@ -141,3 +155,5 @@ FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { + return _ReturnAddress(); + } + #endif ++ ++#undef FOLLY_DETAIL_MSC_BUILTIN_SUPPORT +-- + From 220de6538abf1c6d6e6063bcb7935c5c74b48840 Mon Sep 17 00:00:00 2001 From: dmn Date: Mon, 4 Jan 2021 16:20:33 +0100 Subject: [PATCH 3/7] PR 4048: add cross reference to original folly issue --- recipes/folly/all/patches/0007-allow-builtins.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/folly/all/patches/0007-allow-builtins.patch b/recipes/folly/all/patches/0007-allow-builtins.patch index c23974a5703ef..de09722f02acc 100644 --- a/recipes/folly/all/patches/0007-allow-builtins.patch +++ b/recipes/folly/all/patches/0007-allow-builtins.patch @@ -58,7 +58,7 @@ index e68de4456..30caf4003 100644 #include #include -- - +see https://github.com/facebook/folly/issues/1412 diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h index 30caf4003..e8ef97266 100644 --- a/folly/portability/Builtins.h From 723984f5619183abc2c0348e1092273f3f61784a Mon Sep 17 00:00:00 2001 From: dmn Date: Tue, 5 Jan 2021 19:28:11 +0100 Subject: [PATCH 4/7] PR 4048: Bump max. CMake version to 3.16.2 to fix the Linux build --- recipes/folly/all/conanfile.py | 7 +++++++ 1 file changed, 7 insertions(+) mode change 100644 => 100755 recipes/folly/all/conanfile.py diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py old mode 100644 new mode 100755 index f5ca9284517e0..32330131d8dd9 --- a/recipes/folly/all/conanfile.py +++ b/recipes/folly/all/conanfile.py @@ -83,6 +83,13 @@ def _strip_options_requirements(self): def _required_boost_components(self): return ["context", "filesystem", "program_options", "regex", "system", "thread"] + # TODO: Remove CMake from build_requirements when folly/2019.10.21.00 is removed from CCI + # Bump max. CMake version to 3.16.2 to fix the Linux build + def build_requirements(self): + if tools.os_info.is_linux and self.settings.os == "Linux": + if Version(self.version) == "2019.10.21.00": + self.build_requires("cmake/3.16.2") + def requirements(self): self.requires("boost/1.74.0") self.requires("bzip2/1.0.8") From 8026c21dcee489df3f0f193fb786a14d1c401380 Mon Sep 17 00:00:00 2001 From: dmn Date: Tue, 5 Jan 2021 20:15:09 +0100 Subject: [PATCH 5/7] PR 4048: Bump the openssl version 1.1.1i --- recipes/folly/all/conanfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py index 32330131d8dd9..c2e79b46cafdd 100755 --- a/recipes/folly/all/conanfile.py +++ b/recipes/folly/all/conanfile.py @@ -83,8 +83,7 @@ def _strip_options_requirements(self): def _required_boost_components(self): return ["context", "filesystem", "program_options", "regex", "system", "thread"] - # TODO: Remove CMake from build_requirements when folly/2019.10.21.00 is removed from CCI - # Bump max. CMake version to 3.16.2 to fix the Linux build + # Freeze max. CMake version at 3.16.2 to fix the Linux build def build_requirements(self): if tools.os_info.is_linux and self.settings.os == "Linux": if Version(self.version) == "2019.10.21.00": @@ -98,7 +97,7 @@ def requirements(self): self.requires("glog/0.4.0") self.requires("libevent/2.1.12") self.requires("lz4/1.9.2") - self.requires("openssl/1.1.1h") + self.requires("openssl/1.1.1i") self.requires("snappy/1.1.8") self.requires("zlib/1.2.11") self.requires("zstd/1.4.5") From e679ee7e56fac049730cd5c18898326b53dea158 Mon Sep 17 00:00:00 2001 From: dmn Date: Tue, 5 Jan 2021 21:13:53 +0100 Subject: [PATCH 6/7] PR 4048: Use CMake 3.16.2 for folly/2020.08.10.00 too --- recipes/folly/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py index c2e79b46cafdd..7c3919d2c8d06 100755 --- a/recipes/folly/all/conanfile.py +++ b/recipes/folly/all/conanfile.py @@ -86,7 +86,7 @@ def _required_boost_components(self): # Freeze max. CMake version at 3.16.2 to fix the Linux build def build_requirements(self): if tools.os_info.is_linux and self.settings.os == "Linux": - if Version(self.version) == "2019.10.21.00": + if Version(self.version) <= "2020.08.10.00": self.build_requires("cmake/3.16.2") def requirements(self): From c483c50887c231cabd2061f0218ad5f3e59414e4 Mon Sep 17 00:00:00 2001 From: dmn-star <52277783+dmn-star@users.noreply.github.com> Date: Wed, 6 Jan 2021 16:15:05 +0100 Subject: [PATCH 7/7] Keep the same CMake version for all compilers Co-authored-by: Uilian Ries --- recipes/folly/all/conanfile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py index 7c3919d2c8d06..6279dcd3e04d3 100755 --- a/recipes/folly/all/conanfile.py +++ b/recipes/folly/all/conanfile.py @@ -85,9 +85,7 @@ def _required_boost_components(self): # Freeze max. CMake version at 3.16.2 to fix the Linux build def build_requirements(self): - if tools.os_info.is_linux and self.settings.os == "Linux": - if Version(self.version) <= "2020.08.10.00": - self.build_requires("cmake/3.16.2") + self.build_requires("cmake/3.16.2") def requirements(self): self.requires("boost/1.74.0")