From 8a433489a1980251912018c05266adc0933ac85a Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 1 May 2020 10:30:23 -0700 Subject: [PATCH] eden: enable rocksdb in the windows build Summary: In the initial stages of the windows port we had problems building rocksdb on windows, so we disabled it. These days we're able to build it and detect it--we even require it in the cmake code, but hadn't gotten around to telling the rest of the code that we can use it. This commit re-enables it in the build but leaves sqlite as the default engine until we're able to perform some benchmarking. Rocksdb itself has some build issues on Windows; it doesn't use cmake to locate dependencies, so even though we built snappy it doesn't know how to find it without modifying the source: https://github.com/facebook/rocksdb/blob/master/thirdparty.inc#L4 For that reason, we disable the use of Snappy in the Windows build. However, in the version of rocksdb that we were using, it would default to trying to use Snappy even though it wasn't compiled in and throw an exception. I've upgraded to a newer version of rocksdb that will simply not use compression if no compression was enabled at build time. Given that we mostly store relatively small objects, I'm assuming that the lack of compression is fine for now. Reviewed By: xavierd Differential Revision: D21319896 fbshipit-source-id: 2a2d06d4bd5382706e9220f9b4a2de99dc18311d --- build/fbcode_builder/getdeps/builder.py | 4 ++++ build/fbcode_builder/manifests/rocksdb | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/build/fbcode_builder/getdeps/builder.py b/build/fbcode_builder/getdeps/builder.py index 5a402ba76..1ccee0211 100644 --- a/build/fbcode_builder/getdeps/builder.py +++ b/build/fbcode_builder/getdeps/builder.py @@ -428,6 +428,10 @@ if __name__ == "__main__": ccache = path_search(env, "ccache") if ccache: defines["CMAKE_CXX_COMPILER_LAUNCHER"] = ccache + else: + # rocksdb does its own probing for ccache. + # Ensure that it is disabled on sandcastle + env["CCACHE_DISABLE"] = "1" if "GITHUB_ACTIONS" in os.environ and self.build_opts.is_windows(): # GitHub actions: the host has both gcc and msvc installed, and diff --git a/build/fbcode_builder/manifests/rocksdb b/build/fbcode_builder/manifests/rocksdb index 6b4d2f764..73fea58c2 100644 --- a/build/fbcode_builder/manifests/rocksdb +++ b/build/fbcode_builder/manifests/rocksdb @@ -2,8 +2,8 @@ name = rocksdb [download] -url = https://github.com/facebook/rocksdb/archive/v5.18.3.tar.gz -sha256 = 7fb6738263d3f2b360d7468cf2ebe333f3109f3ba1ff80115abd145d75287254 +url = https://github.com/facebook/rocksdb/archive/v6.8.1.tar.gz +sha256 = ca192a06ed3bcb9f09060add7e9d0daee1ae7a8705a3d5ecbe41867c5e2796a2 [dependencies] lz4 @@ -11,12 +11,13 @@ snappy [build] builder = cmake -subdir = rocksdb-5.18.3 +subdir = rocksdb-6.8.1 [cmake.defines] WITH_SNAPPY=ON -WITH_LZ4=ON +WITH_LZ4=OFF WITH_TESTS=OFF +WITH_BENCHMARK_TOOLS=OFF # We get relocation errors with the static gflags lib, # and there's no clear way to make it pick the shared gflags # so just turn it off.