# How to build rocksdb support?

**URL:** <https://forums.percona.com/t/how-to-build-rocksdb-support/5684>\
**Category:** Percona Server for MongoDB\
**Created:** [June 15, 2017, 9:43am UTC](https://forums.percona.com/t/how-to-build-rocksdb-support/5684 "2017-06-15T09:43:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mareks](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@mareks](https://forums.percona.com/u/mareks)\
**Post date:** [June 15, 2017, 9:43am UTC](https://forums.percona.com/t/how-to-build-rocksdb-support/5684/1 "2017-06-15T09:43:41Z")

</div>

As far as I ca see, you should use “scons --rocksdb=on all” to build it, but I’ll get an error:

```auto
In file included from src/mongo/db/storage/rocks/src/rocks_parameters.h:32:0,
from src/mongo/db/storage/rocks/src/rocks_parameters.cpp:32:
src/mongo/db/storage/rocks/src/rocks_engine.h:40:27: fatal error: rocksdb/cache.h: No such file or directory
compilation terminated.

```

Is it just me or there is something wrong with scons files?

---

<div class="post-metadata">

**Author:** ![Tomislav\_Plavcic](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/tomislav_plavcic/32/9717_2.png) [@Tomislav\_Plavcic](https://forums.percona.com/u/Tomislav_Plavcic)\
**Post date:** [June 16, 2017, 2:06am UTC](https://forums.percona.com/t/how-to-build-rocksdb-support/5684/2 "2017-06-16T02:06:51Z")

</div>

Hi mareks,

There’s a script here which can build PSMDB 3.4 from github repo: [url][psmdb-misc-scripts/build\_psmdb\_3.4.sh at master · Percona-QA/psmdb-misc-scripts · GitHub](https://github.com/Percona-QA/psmdb-misc-scripts/blob/master/build_psmdb_3.4.sh#L112-L124%5B/url%5D)  
I have marked the lines which could be of interest to you, but you might as well use the whole script.  
Before using it you need to do “git submodule init” and “git submodule update”.  
Also notice the script builds the mongo tools also so you’ll need golang for that or just comment that part if you don’t need it.

---

<div class="post-metadata">

**Author:** ![mareks](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@mareks](https://forums.percona.com/u/mareks)\
**Post date:** [June 16, 2017, 4:39am UTC](https://forums.percona.com/t/how-to-build-rocksdb-support/5684/3 "2017-06-16T04:39:08Z")

</div>

Oh, that is really helpful. Thanks!
