Skip to content

Commit

Permalink
(#6018) rocksdb: add versions 6.0.2 and 6.20.3
Browse files Browse the repository at this point in the history
* rocksdb: Add version 6.0.2

This is needed for backwards compatibility on a project.

* fix: adapt patch file to 6.0.2

* Do not compile RocksDB 6.0.2 with VS > 15

RocksDB 6.0.2 had an invalid use of const, which was later fixed in facebook/rocksdb#6048 Applying the fix as a patch to 6.0.2 could result in a regression, so just don't compile with this compiler instead

* rocksdb: Add version 6.20.3

* rocksdb: Add further invalid configurations
  • Loading branch information
fennibay authored Jun 26, 2021
1 parent a5f9d3c commit b601896
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
12 changes: 12 additions & 0 deletions recipes/rocksdb/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
sources:
"6.0.2":
url: https://github.com/facebook/rocksdb/archive/v6.0.2.tar.gz
sha256: 89e0832f1fb00ac240a9438d4bbdae37dd3e52f7c15c3f646dc26887da16f342
"6.8.1":
url: https://github.com/facebook/rocksdb/archive/v6.8.1.tar.gz
sha256: ca192a06ed3bcb9f09060add7e9d0daee1ae7a8705a3d5ecbe41867c5e2796a2
"6.10.2":
url: https://github.com/facebook/rocksdb/archive/v6.10.2.tar.gz
sha256: 514b315c64159dd767bbbf6430d33313903c0c9240d4249bddead5c4297d128f
"6.20.3":
url: https://github.com/facebook/rocksdb/archive/v6.20.3.tar.gz
sha256: c6502c7aae641b7e20fafa6c2b92273d935d2b7b2707135ebd9a67b092169dca
patches:
"6.0.2":
- patch_file: "patches/6.0.2/0001-Rename-jemalloc-according-to-conan-packages.patch"
base_path: "source_subfolder"
"6.8.1":
- patch_file: "patches/6.8.1/0001-Rename-jemalloc-according-to-conan-packages.patch"
base_path: "source_subfolder"
"6.10.2":
- patch_file: "patches/6.10.2/0001-Rename-jemalloc-according-to-conan-packages.patch"
base_path: "source_subfolder"
"6.20.3":
- patch_file: "patches/6.20.3/0001-Rename-jemalloc-according-to-conan-packages.patch"
base_path: "source_subfolder"
18 changes: 18 additions & 0 deletions recipes/rocksdb/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,24 @@ def configure(self):
self.settings.compiler == "Visual Studio" and \
tools.Version(self.settings.compiler.version) < "15":
raise ConanInvalidConfiguration("Rocksdb requires Visual Studio 15 or later.")

if self.version == "6.0.2" and \
self.settings.os == "Windows" and \
self.settings.compiler == "Visual Studio" and \
tools.Version(self.settings.compiler.version) > "15":
raise ConanInvalidConfiguration("Rocksdb 6.0.2 is not compilable with Visual Studio >15.") # See https://github.com/facebook/rocksdb/issues/6048

if self.version == "6.0.2" and \
self.settings.os == "Linux" and \
self.settings.compiler == "clang" and \
tools.Version(self.settings.compiler.version) > "9":
raise ConanInvalidConfiguration("Rocksdb 6.0.2 is not compilable with clang >9.") # See https://github.com/facebook/rocksdb/pull/7265

if self.version == "6.20.3" and \
self.settings.os == "Linux" and \
self.settings.compiler == "gcc" and \
tools.Version(self.settings.compiler.version) < "5":
raise ConanInvalidConfiguration("Rocksdb 6.20.3 is not compilable with gcc <5.") # See https://github.com/facebook/rocksdb/issues/3522

if self.settings.build_type == "Debug":
self.options.use_rtti = True # Rtti are used in asserts for debug mode...
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -66,5 +66,5 @@ else()
set(WITH_JEMALLOC ON)
else()
if(WITH_JEMALLOC)
- find_package(JeMalloc REQUIRED)
+ find_package(jemalloc REQUIRED)
add_definitions(-DROCKSDB_JEMALLOC -DJEMALLOC_NO_DEMANGLE)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -100,9 +100,9 @@ else()
set(WITH_JEMALLOC ON)
else()
if(WITH_JEMALLOC)
- find_package(JeMalloc REQUIRED)
+ find_package(jemalloc REQUIRED)
add_definitions(-DROCKSDB_JEMALLOC -DJEMALLOC_NO_DEMANGLE)
- list(APPEND THIRDPARTY_LIBS JeMalloc::JeMalloc)
+ list(APPEND THIRDPARTY_LIBS jemalloc::jemalloc)
endif()
endif()

4 changes: 4 additions & 0 deletions recipes/rocksdb/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
versions:
"6.0.2":
folder: all
"6.8.1":
folder: all
"6.10.2":
folder: all
"6.20.3":
folder: all

0 comments on commit b601896

Please sign in to comment.