Skip to content

Instantly share code, notes, and snippets.

@achanda
Last active March 25, 2024 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save achanda/7b583ddd067b32f38298af27701a891d to your computer and use it in GitHub Desktop.
Save achanda/7b583ddd067b32f38298af27701a891d to your computer and use it in GitHub Desktop.
Rocksdb windows build notes
$Env:THIRDPARTY_HOME="C:\path\to\cloned\repo\thirdparty"
$Env:JAVA_HOME="C:\whatever"
$Env:SNAPPY_HOME="C:\path\to\cloned\repo\thirdparty\snappy-1.1.8"
$Env:SNAPPY_INCLUDE="C:\path\to\cloned\repo\thirdparty\snappy-1.1.8;C:\path\to\cloned\repo\thirdparty\snappy-1.1.8\build"
$Env:SNAPPY_LIB_DEBUG="C:\path\to\cloned\repo\thirdparty\snappy-1.1.8\build\Debug\snappy.lib"
mkdir $Env:THIRDPARTY_HOME
cd $Env:THIRDPARTY_HOME
# Download and build snappy
curl -O snappy-1.1.8.zip https://github.com/google/snappy/archive/refs/tags/1.1.8.zip
unzip -q snappy-1.1.8.zip
cd snappy-1.1.8
mkdir build
cd build
cmake -G "Visual Studio 17 2022" ..
msbuild Snappy.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64
# Build rocksdb
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Debug -DOPTDBG=1 -DPORTABLE="$Env:CMAKE_PORTABLE" -DSNAPPY=1 -DJNI=1 ..
cd ..
msbuild build/rocksdb.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64
# Run tests
build_tools\run_ci_db_test.ps1 -SuiteRun arena_test,db_basic_test,db_test,db_test2,db_merge_operand_test,bloom_test,c_test,coding_test,crc32c_test,dynamic_bloom_test,env_basic_test,env_test,hash_test,random_test -Concurrency 16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment