Compile failed with PSMDB 3.0.9-1.4

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.

Hi Goldstrike,

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

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

Thank you so much for your help.