What's your glibc? If it is version 2.24 or 2.25 you probably need the
following patch
--- a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp.ORIG
2017-02-01 20:00:25.000000000 +0100
+++ b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp 2017-02-09
17:14:07.153905985 +0100
@@ -50,6 +50,8 @@
#include "mongo/db/storage/storage_options.h"
#include "mongo/util/clock_source.h"
#include "mongo/util/log.h"
+#define __USE_EXTERN_INLINES
+#include <sys/sysmacros.h>
namespace mongo {
I have compiled it with gcc-5.4.0 as well as with gcc-6.3.0