Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
eden: enable rocksdb in the windows build
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wez authored and facebook-github-bot committed May 1, 2020
1 parent a0912cb commit f2bb67b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions build/fbcode_builder/getdeps/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,10 @@ def _compute_cmake_define_args(self, env):
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
Expand Down
9 changes: 5 additions & 4 deletions build/fbcode_builder/manifests/rocksdb
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
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
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.
Expand Down

0 comments on commit f2bb67b

Please sign in to comment.