diff --git a/3rd_party/userspace-rcu/conandata.yml b/3rd_party/userspace-rcu/conandata.yml deleted file mode 100644 index 9243c443..00000000 --- a/3rd_party/userspace-rcu/conandata.yml +++ /dev/null @@ -1,4 +0,0 @@ -sources: - "nu2.0.14.0": - url: "https://github.com/urcu/userspace-rcu/archive/refs/tags/v0.14.0.tar.gz" - sha256: "42fb5129a3fffe5a4b790dfe1ea3a734c69ee095fefbf649326269bba94c262d" diff --git a/3rd_party/userspace-rcu/conanfile.py b/3rd_party/userspace-rcu/conanfile.py deleted file mode 100644 index 2aeb6885..00000000 --- a/3rd_party/userspace-rcu/conanfile.py +++ /dev/null @@ -1,86 +0,0 @@ -import os - -from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.env import VirtualBuildEnv -from conan.tools.files import chdir, copy, get, rm, rmdir -from conan.tools.gnu import Autotools, AutotoolsToolchain -from conan.tools.layout import basic_layout - -required_conan_version = ">=1.53.0" - - -class UserspaceRCUConan(ConanFile): - name = "userspace-rcu" - description = "Userspace RCU (read-copy-update) library" - license = "LGPL-2.1" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://liburcu.org/" - topics = "urcu" - - package_type = "library" - settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - } - default_options = { - "shared": False, - "fPIC": True, - } - - def configure(self): - self.settings.rm_safe("compiler.libcxx") - self.settings.rm_safe("compiler.cppstd") - if self.options.shared: - self.options.rm_safe("fPIC") - - def layout(self): - basic_layout(self, src_folder="src") - - def validate(self): - if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: - raise ConanInvalidConfiguration(f"Building for {self.settings.os} unsupported") - if self.version == "0.11.4" and self.settings.compiler == "apple-clang": - # Fails with "cds_hlist_add_head_rcu.c:19:10: fatal error: 'urcu/urcu-memb.h' file not found" - raise ConanInvalidConfiguration(f"{self.ref} is not compatible with apple-clang") - - def build_requirements(self): - self.tool_requires("libtool/2.4.7") - - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) - - def generate(self): - env = VirtualBuildEnv(self) - env.generate() - tc = AutotoolsToolchain(self) - tc.generate() - - def build(self): - autotools = Autotools(self) - autotools.autoreconf() - autotools.configure() - autotools.make() - - def package(self): - copy(self, "LICENSE*", - src=self.source_folder, - dst=os.path.join(self.package_folder, "licenses")) - autotools = Autotools(self) - autotools.install() - - rm(self, "*.la", self.package_folder, recursive=True) - rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - rmdir(self, os.path.join(self.package_folder, "share")) - - def package_info(self): - for lib_type in ["","-memb"]: - component_name = f"urcu{lib_type}" - self.cpp_info.components[component_name].libs = ["urcu-common", component_name] - self.cpp_info.components[component_name].set_property("pkg_config_name", component_name) - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components[component_name].system_libs = ["pthread"] - - # Some definitions needed for MB and Signal variants - self.cpp_info.components["urcu-memb"].defines = ["RCU_MEMB"] \ No newline at end of file diff --git a/conanfile.py b/conanfile.py index 3bb4e716..7da2d949 100644 --- a/conanfile.py +++ b/conanfile.py @@ -9,7 +9,7 @@ class SISLConan(ConanFile): name = "sisl" - version = "13.0.4" + version = "13.0.5" homepage = "https://github.com/eBay/sisl" description = "Library for fast data structures, utilities" @@ -93,7 +93,7 @@ def requirements(self): self.requires("folly/nu2.2023.12.18.00", transitive_headers=True) self.requires("prometheus-cpp/1.1.0", transitive_headers=True) self.requires("snappy/[^1.2]", transitive_headers=True) - self.requires("userspace-rcu/nu2.0.14.0", transitive_headers=True) + self.requires("userspace-rcu/0.11.4", transitive_headers=True) if self.options.grpc: self.requires("grpc/1.54.3", transitive_headers=True) @@ -232,7 +232,7 @@ def package_info(self): self.cpp_info.components["settings"].requires.extend([ "logging", "flatbuffers::flatbuffers", - "userspace-rcu::userspace-rcu", + "userspace-rcu::urcu-memb", ]) self.cpp_info.components["metrics"].requires.extend([ "logging", @@ -243,7 +243,7 @@ def package_info(self): "metrics", "folly::folly", "snappy::snappy", - "userspace-rcu::userspace-rcu", + "userspace-rcu::urcu-memb", ]) self.cpp_info.components["cache"].requires.extend([ "buffer", diff --git a/prepare_v2.sh b/prepare_v2.sh index 60dad499..8ea200fd 100755 --- a/prepare_v2.sh +++ b/prepare_v2.sh @@ -3,6 +3,4 @@ set -eu echo -n "Exporting custom recipes..." echo -n "folly." conan export 3rd_party/folly --name folly --version nu2.2023.12.18.00 >/dev/null -echo -n "userspace rcu." -conan export 3rd_party/userspace-rcu --name userspace-rcu --version nu2.0.14.0 >/dev/null echo "done." diff --git a/src/metrics/CMakeLists.txt b/src/metrics/CMakeLists.txt index 0779cc58..80c19fbb 100644 --- a/src/metrics/CMakeLists.txt +++ b/src/metrics/CMakeLists.txt @@ -12,7 +12,7 @@ target_link_libraries(sisl_metrics PUBLIC sisl_logging folly::folly prometheus-cpp::prometheus-cpp - userspace-rcu::userspace-rcu + userspace-rcu::urcu-memb ) include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/settings/CMakeLists.txt b/src/settings/CMakeLists.txt index 2442339f..01233782 100644 --- a/src/settings/CMakeLists.txt +++ b/src/settings/CMakeLists.txt @@ -7,7 +7,7 @@ target_sources(sisl_settings PRIVATE target_link_libraries(sisl_settings PUBLIC sisl_logging flatbuffers::flatbuffers - userspace-rcu::userspace-rcu + userspace-rcu::urcu-memb ) add_executable(test_settings)