Repository: conan-io/conan-center-index

Issue:
folly: bump libunwind version to 1.5.0
This follows https://github.com/conan-io/conan-center-index/pull/3588 where I added `libunwind` 1.5.0 to fix a compile issue I was hitting on Fedora 33 (and maybe other places). The only remaining step is bumping the version in `folly` (and bumping `wt` in the process https://github.com/conan-io/conan-center-index/pull/3676). There are no breaking changes with this release.

- [x] I've read the [guidelines](https://github.com/conan-io/conan-center-index/blob/master/docs/how_to_add_packages.md) for contributing.
- [x] I've followed the [PEP8](https://www.python.org/dev/peps/pep-0008/) style guides for Python code in the recipes.
- [x] I've used the [latest](https://github.com/conan-io/conan/releases/latest) Conan client version.
- [x] I've tried at least one configuration locally with the
      [conan-center hook](https://github.com/conan-io/hooks.git) activated.



Discussion:
I detected other pull requests that are modifying folly/all recipe:
- #3711
- #3177

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

An unexpected error happened and has been reported. Help is on its way! :horse_racing: 
An unexpected error happened and has been reported. Help is on its way! :horse_racing: 
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

what do I do about CI?
close the PR wait 15s and then re-open the PR... this will trigger it to re-run.... ⚠️ folly is a pain to build you might hit #3983 
Some configurations of 'folly/2019.10.21.00' failed in build 3 (`c32d7d7dcb2b33ea7349fcc899ce300616311fec`):
-   **Windows x86_64, Release, Visual Studio 16,  MD. Options:  folly:shared-False**
    - [Log download](https://c3i.jfrog.io/c3i/misc/logs/pr/3675/3/folly/2019.10.21.00/2b23524776ea8aed81b7c3c463fafb666d244c30/create_stdout.txt)
    - [Log error Download](https://c3i.jfrog.io/c3i/misc/logs/pr/3675/3/folly/2019.10.21.00/2b23524776ea8aed81b7c3c463fafb666d244c30/create_stderr.txt)
    - [Profile](https://c3i.jfrog.io/c3i/misc/logs/pr/3675/3/folly/2019.10.21.00/2b23524776ea8aed81b7c3c463fafb666d244c30/profile.txt)
- [Access to all the logs](https://c3i.jfrog.io/c3i/misc/logs/pr/3675/3/folly/2019.10.21.00/)
@arlyon The windows build is fixed, you can try to rebuild your PR again. 
I added the changes to mine as well
Thanks guys!
All green in build 4 (`c32d7d7dcb2b33ea7349fcc899ce300616311fec`)! :blush:
- `folly/2019.10.21.00`: Generated 82 packages. [All logs here](https://c3i.jfrog.io/c3i/misc/logs/pr/3675/4/folly/2019.10.21.00/) 
- `folly/2020.08.10.00`: Generated 62 packages. [All logs here](https://c3i.jfrog.io/c3i/misc/logs/pr/3675/4/folly/2020.08.10.00/) 

Wonderful! Cheers :)

Resolving patch:
diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py
--- a/recipes/folly/all/conanfile.py
+++ b/recipes/folly/all/conanfile.py
@@ -3,7 +3,8 @@
 from conans.tools import Version
 from conans.errors import ConanInvalidConfiguration
 
-required_conan_version = ">=1.28.0"
+required_conan_version = ">=1.32.0"
+
 
 class FollyConan(ConanFile):
     name = "folly"
@@ -44,74 +45,61 @@ def config_options(self):
     def configure(self):
         if self.options.shared:
             del self.options.fPIC
-        if self.settings.get_safe("compiler.cppstd"):
+        if self.settings.compiler.get_safe("cppstd"):
             tools.check_min_cppstd(self, self._minimum_cpp_standard)
-        min_version = self._minimum_compilers_version.get(
-            str(self.settings.compiler))
+        min_version = self._minimum_compilers_version.get(str(self.settings.compiler))
         if not min_version:
-            self.output.warn("{} recipe lacks information about the {} compiler support.".format(
-                self.name, self.settings.compiler))
+            self.output.warn("{} recipe lacks information about the {} compiler support.".format(self.name, self.settings.compiler))
         else:
             if tools.Version(self.settings.compiler.version) < min_version:
-                raise ConanInvalidConfiguration("{} requires C++14 support. The current compiler {} {} does not support it.".format(
-                    self.name, self.settings.compiler, self.settings.compiler.version))
+                raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format(
+                    self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version))
 
         if self.settings.os == "Windows" and self.settings.arch != "x86_64":
-            raise ConanInvalidConfiguration("Folly requires a 64bit target architecture")
-        elif self.settings.os == "Windows" and self.settings.compiler == "Visual Studio" and \
-                "MT" in self.settings.compiler.runtime:
-            raise ConanInvalidConfiguration("Folly could not be build with runtime MT")
-        elif self.settings.os == "Macos" and self.options.shared:
-            raise ConanInvalidConfiguration("Folly could not be built by apple-clang as shared library")
-        elif self.settings.os == "Windows" and self.options.shared:
-            raise ConanInvalidConfiguration("Folly could not be built on Windows as a shared library")
-        elif Version(self.version) >= "2020.08.10.00" and self.settings.compiler == "Visual Studio" and \
-                not self.options.shared:
-            raise ConanInvalidConfiguration("Folly could not be built on Windows as a static library")
-        elif Version(self.version) >= "2020.08.10.00" and self.settings.compiler == "clang" and \
-                self.options.shared:
-            raise ConanInvalidConfiguration("Folly could not be built by clang as a shared library")
+            raise ConanInvalidConfiguration("Folly requires a 64bit target architecture on Windows")
 
-        self._strip_options_requirements()
+        if self.settings.os in ["Macos", "Windows"] and self.options.shared:
+            raise ConanInvalidConfiguration("Folly could not be built on {} as shared library".format(self.settings.os))
 
-    def _strip_options_requirements(self):
-        self.options["boost"].header_only = False
-        for boost_comp in self._required_boost_components:
-            setattr(self.options["boost"], "without_{}".format(boost_comp), False)
-
-    @property
-    def _required_boost_components(self):
-        return ["context", "filesystem", "program_options", "regex", "system", "thread"]
+        if self.version == "2020.08.10.00" and self.settings.compiler == "clang" and self.options.shared:
+            raise ConanInvalidConfiguration("Folly could not be built by clang as a shared library")
 
     # Freeze max. CMake version at 3.16.2 to fix the Linux build
     def build_requirements(self):
         self.build_requires("cmake/3.16.2")
 
     def requirements(self):
-        self.requires("boost/1.74.0")
+        self.requires("boost/1.75.0")
         self.requires("bzip2/1.0.8")
         self.requires("double-conversion/3.1.5")
         self.requires("gflags/2.2.2")
         self.requires("glog/0.4.0")
         self.requires("libevent/2.1.12")
-        self.requires("lz4/1.9.2")
+        self.requires("lz4/1.9.3")
         self.requires("openssl/1.1.1i")
         self.requires("snappy/1.1.8")
         self.requires("zlib/1.2.11")
-        self.requires("zstd/1.4.5")
-        if Version(self.version) >= "2019.01.01.00":
-            self.requires("libdwarf/20191104")
-            self.requires("libsodium/1.0.18")
-            self.requires("xz_utils/5.2.4")
-            if self.settings.os == "Linux":
-                self.requires("libiberty/9.1.0")
-                self.requires("libunwind/1.5.0")
+        self.requires("zstd/1.4.8")
+        self.requires("libdwarf/20191104")
+        self.requires("libsodium/1.0.18")
+        self.requires("xz_utils/5.2.5")
+        # FIXME: Causing compilation issues on clang: self.requires("jemalloc/5.2.1")
+        if self.settings.os == "Linux":
+            self.requires("libiberty/9.1.0")
+            self.requires("libunwind/1.5.0")
         if Version(self.version) >= "2020.08.10.00":
             self.requires("fmt/7.0.3")
 
-    def _validate_dependency_graph(self):
+    @property
+    def _required_boost_components(self):
+        return ["context", "filesystem", "program_options", "regex", "system", "thread"]
+
+    def validate(self):
+        if self.options["boost"].header_only:
+            raise ConanInvalidConfiguration("Folly could not be built with a header only Boost")
+
         miss_boost_required_comp = any(getattr(self.options["boost"], "without_{}".format(boost_comp), True) for boost_comp in self._required_boost_components)
-        if self.options["boost"].header_only or miss_boost_required_comp:
+        if miss_boost_required_comp:
             raise ConanInvalidConfiguration("Folly requires these boost components: {}".format(", ".join(self._required_boost_components)))
 
     def source(self):
@@ -123,8 +111,7 @@ def _configure_cmake(self):
         if not self._cmake:
             self._cmake = CMake(self)
             self._cmake.definitions["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True)
-            self._cmake.definitions["CXX_STD"] = self.settings.get_safe(
-                "compiler.cppstd") or "c++14"
+            self._cmake.definitions["CXX_STD"] = self.settings.compiler.get_safe("cppstd") or "c++14"
             if self.settings.compiler == "Visual Studio":
                 self._cmake.definitions["MSVC_ENABLE_ALL_WARNINGS"] = False
                 self._cmake.definitions["MSVC_USE_STATIC_RUNTIME"] = "MT" in self.settings.compiler.runtime
@@ -132,15 +119,13 @@ def _configure_cmake(self):
         return self._cmake
 
     def build(self):
-        self._validate_dependency_graph()
         for patch in self.conan_data["patches"][self.version]:
             tools.patch(**patch)
         cmake = self._configure_cmake()
         cmake.build()
 
     def package(self):
-        self.copy(pattern="LICENSE", dst="licenses",
-                  src=self._source_subfolder)
+        self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder)
         cmake = self._configure_cmake()
         cmake.install()
         tools.rmdir(os.path.join(self.package_folder, "lib", "cmake"))
@@ -155,7 +140,29 @@ def package_info(self):
         self.cpp_info.components["libfolly"].names["cmake_find_package"] = "folly"
         self.cpp_info.components["libfolly"].names["cmake_find_package_multi"] = "folly"
         self.cpp_info.components["libfolly"].names["pkg_config"] = "libfolly"
-        self.cpp_info.components["libfolly"].libs = tools.collect_libs(self)
+
+        if Version(self.version) == "2019.10.21.00":
+            self.cpp_info.components["libfolly"].libs = [
+                "follybenchmark",
+                "folly_test_util",
+                "folly"
+            ]
+        if Version(self.version) == "2020.08.10.00":
+            if self.settings.os == "Linux":
+                self.cpp_info.components["libfolly"].libs = [
+                    "folly_exception_counter",
+                    "folly_exception_tracer",
+                    "folly_exception_tracer_base",
+                    "folly_test_util",
+                    "follybenchmark",
+                    "folly"
+                ]
+            else:
+                self.cpp_info.components["libfolly"].libs = [
+                    "folly_test_util",
+                    "follybenchmark",
+                    "folly"
+                ]
         self.cpp_info.components["libfolly"].requires = [
             "boost::boost",
             "bzip2::bzip2",
@@ -167,25 +174,23 @@ def package_info(self):
             "openssl::openssl",
             "snappy::snappy",
             "zlib::zlib",
-            "zstd::zstd"
+            "zstd::zstd",
+            "libdwarf::libdwarf",
+            "libsodium::libsodium",
+            "xz_utils::xz_utils"
         ]
-        if Version(self.version) >= "2019.01.01.00":
-            self.cpp_info.components["libfolly"].requires.extend([
-                "libdwarf::libdwarf",
-                "libsodium::libsodium",
-                "xz_utils::xz_utils"
-            ])
-            if self.settings.os == "Linux":
-                self.cpp_info.components["libfolly"].requires.extend([
-                    "libiberty::libiberty",
-                    "libunwind::libunwind"
-                ])
-        if Version(self.version) >= "2020.08.10.00":
-            self.cpp_info.components["libfolly"].requires.append("fmt::fmt")
         if self.settings.os == "Linux":
+            self.cpp_info.components["libfolly"].requires.extend(["libiberty::libiberty", "libunwind::libunwind"])
             self.cpp_info.components["libfolly"].system_libs.extend(["pthread", "dl", "rt"])
+
+        if Version(self.version) >= "2020.08.10.00":
+            self.cpp_info.components["libfolly"].requires.append("fmt::fmt")
+            if self.settings.os == "Linux":
+                self.cpp_info.components["libfolly"].defines.append("FOLLY_HAVE_ELF")
+
         elif self.settings.os == "Windows":
-            self.cpp_info.components["libfolly"].system_libs.extend(["ws2_32", "Iphlpapi", "Crypt32"])
+            self.cpp_info.components["libfolly"].system_libs.extend(["ws2_32", "iphlpapi", "crypt32"])
+
         if (self.settings.os == "Linux" and self.settings.compiler == "clang" and
             self.settings.compiler.libcxx == "libstdc++") or \
            (self.settings.os == "Macos" and self.settings.compiler == "apple-clang" and


Test patch:
diff --git a/recipes/folly/all/test_package/test_package.cpp b/recipes/folly/all/test_package/test_package.cpp
--- a/recipes/folly/all/test_package/test_package.cpp
+++ b/recipes/folly/all/test_package/test_package.cpp
@@ -1,24 +1,30 @@
-#include <cstdlib>
-#include <iostream>
-#include <utility>
-#include <folly/Format.h>
-#include <folly/futures/Future.h>
-#include <folly/executors/ThreadedExecutor.h>
-#include <folly/Uri.h>
-#include <folly/FBString.h>
-
-static void print_uri(const folly::fbstring& value) {
-    const folly::Uri uri(value);
-    const auto authority = folly::format("The authority from {} is {}", value, uri.authority());
-    std::cout << authority << std::endl;
-}
-
-int main() {
-    folly::ThreadedExecutor executor;
-    folly::Promise<std::string> promise;
-    folly::Future<std::string> future = promise.getSemiFuture().via(&executor);
-    folly::Future<folly::Unit> unit = std::move(future).thenValue(print_uri);
-    promise.setValue("https://github.com/bincrafters");
-    std::move(unit).get();
-    return EXIT_SUCCESS;
-}
+#include <cstdlib>
+#include <iostream>
+#include <utility>
+#include <folly/Format.h>
+#include <folly/futures/Future.h>
+#include <folly/executors/ThreadedExecutor.h>
+#include <folly/Uri.h>
+#include <folly/FBString.h>
+#if FOLLY_HAVE_ELF
+#include <folly/experimental/symbolizer/Elf.h>
+#endif
+
+static void print_uri(const folly::fbstring& value) {
+    const folly::Uri uri(value);
+    const auto authority = folly::format("The authority from {} is {}", value, uri.authority());
+    std::cout << authority << std::endl;
+}
+
+int main() {
+    folly::ThreadedExecutor executor;
+    folly::Promise<std::string> promise;
+    folly::Future<std::string> future = promise.getSemiFuture().via(&executor);
+    folly::Future<folly::Unit> unit = std::move(future).thenValue(print_uri);
+    promise.setValue("https://github.com/bincrafters");
+    std::move(unit).get();
+#if FOLLY_HAVE_ELF
+    folly::symbolizer::ElfFile elffile;
+#endif
+    return EXIT_SUCCESS;
+}