# Compile failed with PSMDB 3.0.9-1.4

**URL:** <https://forums.percona.com/t/compile-failed-with-psmdb-3-0-9-1-4/4772>\
**Category:** Percona Server for MongoDB\
**Created:** [March 11, 2016, 9:54pm UTC](https://forums.percona.com/t/compile-failed-with-psmdb-3-0-9-1-4/4772 "2016-03-11T21:54:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![goldstrike](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@goldstrike](https://forums.percona.com/u/goldstrike)\
**Post date:** [March 11, 2016, 9:54pm UTC](https://forums.percona.com/t/compile-failed-with-psmdb-3-0-9-1-4/4772/1 "2016-03-11T21:54:14Z")

</div>

My OS is Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-79-generic x86\_64)

I use “scons all” command to build percona-server-mongodb-3.0.9-1.4 but failed.

the error response is following, Is there anyone who can help me?

g++ -o build/linux2/normal/mongo/db/client.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fno-omit-frame-pointer -fPIC -fno-strict-aliasing -ggdb -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-missing-braces -fno-builtin-memcmp -DBOOST\_ALL\_NO\_LIB -D\_SCONS -DMONGO\_EXPOSE\_MACROS -DPCRE\_STATIC -DSUPPORT\_UTF8 -DMONGO\_OPTIMIZED\_BUILD -DMONGO\_BYTE\_ORDER=1234 -D\_FILE\_OFFSET\_BITS=64 -DMONGO\_HAVE\_\_\_THREAD -DMONGO\_HAVE\_CXX11\_ATOMICS -DBOOST\_SYSTEM\_NO\_DEPRECATED -DMONGO\_HAVE\_HEADER\_UNISTD\_H -DMONGO\_HAVE\_POSIX\_MONOTONIC\_CLOCK -DMONGO\_HAVE\_EXECINFO\_BACKTRACE -Isrc/third\_party/snappy-1.1.2 -Isrc/third\_party/s2 -Isrc/third\_party/pcre-8.37 -Isrc/third\_party/boost -Isrc/third\_party/install/include -Isrc/third\_party/tokubackup/include -Ibuild/linux2/normal -Isrc src/mongo/db/client.cpp  
src/mongo/db/client.cpp:44:34: fatal error: rocksdb/perf\_context.h: No such file or directory  
#include \<rocksdb/perf\_context.h\>  
^  
compilation terminated.  
scons: \*\*\* [build/linux2/normal/mongo/db/client.o] Error 1  
scons: building terminated because of errors.

---

<div class="post-metadata">

**Author:** ![DBennett](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/dbennett/32/17_2.png) [@DBennett](https://forums.percona.com/u/DBennett)\
**Post date:** [March 12, 2016, 3:06pm UTC](https://forums.percona.com/t/compile-failed-with-psmdb-3-0-9-1-4/4772/2 "2016-03-12T15:06:20Z")

</div>

Hi Goldstrike,

Before building PSMDB, you will also need to build the matching tagged static versions of TokuBackup ([GitHub - percona/Percona-TokuBackup](http://github.com/percona/Percona-TokuBackup)), PerconaFT ([GitHub - percona/PerconaFT: PerconaFT is a high-performance, transactional key-value store](http://github.com/percona/PerconaFT)) and the 4.1 release of rocksdb ([GitHub - facebook/rocksdb: A library that provides an embeddable, persistent key-value store for fast storage.](http://github.com/facebook/rocksdb))

After they are built, the headers and static libraries must be installed into src/third\_party/install.

The scons command to build with all of the release features is:

scons --variant-dir=percona --audit --release --ssl --opt=on --cc=${CC} --cxx=${CXX} --use-sasl-client   
CPPPATH=${INSTALLDIR}/include LIBPATH=${INSTALLDIR}/lib --PerconaFT --rocksdb --wiredtiger --tokubackup mongo mongod mongos

Where ${CC} is the path to gcc, ${CXX} is the path to g++ and ${INSTALLDIR} is the full path to src/third\_party/install

It is also important to mention that we currently compile everything with g++ 4.8.x. There are known issues with the javascript v8 engine used by MongoDB upstream when compiled with g++ 4.9 or greater.

As I mentioned in a previous post, 3.0.9-1.4 is now GA released so you can download the binaries or update your system.

–Dave

---

<div class="post-metadata">

**Author:** ![goldstrike](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@goldstrike](https://forums.percona.com/u/goldstrike)\
**Post date:** [March 13, 2016, 7:53am UTC](https://forums.percona.com/t/compile-failed-with-psmdb-3-0-9-1-4/4772/3 "2016-03-13T07:53:06Z")

</div>

Thank you so much for your help.
