Common Errors when building Hyperledger Iroha from source code

Please find here a step by step guide on how to build Hyperledger Iroha on Raspberry PI from source: Iroha on Raspberry.

[ 14%] Building CXX object schema/CMakeFiles/ordering_grpc.dir/ordering.pb.o
[ 14%] Built target block_creator_common
[ 14%] Generating loader.grpc.pb.h, loader.grpc.pb.cc
[ 14%] Generating loader.pb.h, loader.pb.cc

/home/pi/iroha/irohad/main/server_runner.cpp: In member function 'iroha::expected::Result<int, std::__cxx11::basic_string<char> > ServerRunner::run()':
/home/pi/iroha/irohad/main/server_runner.cpp:47:3: error: 'serverInstanceCV_' was not declared in this scope
   serverInstanceCV_.notify_one();
   ^~~~~~~~~~~~~~~~~

/home/pi/iroha/irohad/main/server_runner.cpp:47:3: note: suggested alternative: 'serverInstance_'
   serverInstanceCV_.notify_one();
   ^~~~~~~~~~~~~~~~~
   serverInstance_

Scanning dependencies of target loader_grpc
[ 14%] Building CXX object schema/CMakeFiles/loader_grpc.dir/loader.pb.o
/home/pi/iroha/irohad/main/server_runner.cpp: In member function 'void ServerRunner::waitForServersReady()':

/home/pi/iroha/irohad/main/server_runner.cpp:60:5: error: 'serverInstanceCV_' was not declared in this scope
     serverInstanceCV_.wait(lock);
     ^~~~~~~~~~~~~~~~~

/home/pi/iroha/irohad/main/server_runner.cpp:60:5: note: suggested alternative: 'serverInstance_'
     serverInstanceCV_.wait(lock);
     ^~~~~~~~~~~~~~~~~
     serverInstance_

[ 15%] Linking CXX static library libyac_grpc.a
make[3]: *** [irohad/main/CMakeFiles/server_runner.dir/build.make:63: irohad/main/CMakeFiles/server_runner.dir/server_runner.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:1340: irohad/main/CMakeFiles/server_runner.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....

[ 21%] Building CXX object schema/CMakeFiles/endpoint.dir/endpoint.grpc.pb.o

In file included from /home/pi/PKG/iroha11/irohad/main/server_runner.cpp:6:
/home/pi/PKG/iroha11/irohad/main/server_runner.hpp:62:8: error: 'condition_variable' in namespace 'std' does not name a type
   std::condition_variable serverInstanceCV_;
    ^~~~~~~~~~~~~~~~~~

/home/pi/PKG/iroha11/irohad/main/server_runner.hpp:62:3: note: 'std::condition_variable' is defined in header '<condition_variable>'; did you forget to '#include <condition_variable>'?
/home/pi/PKG/iroha11/irohad/main/server_runner.hpp:13:1:
+#include <condition_variable>
/home/pi/PKG/iroha11/irohad/main/server_runner.hpp:62:3:
   std::condition_variable serverInstanceCV_;
   ^~~

/home/pi/PKG/iroha11/irohad/main/server_runner.cpp: In member function 'iroha::expected::Result<int, std::__cxx11::basic_string<char> > ServerRunner::run()': /home/pi/PKG/iroha11/irohad/main/server_runner.cpp:47:3: error: 'serverInstanceCV_' was not declared in this scope    serverInstanceCV_.notify_one();    ^~~~~~~~~~~~~~~~~ /home/pi/PKG/iroha11/irohad/main/server_runner.cpp:47:3: note: suggested alternative: 'serverInstance_'    serverInstanceCV_.notify_one();    ^~~~~~~~~~~~~~~~~    serverInstance_ /home/pi/PKG/iroha11/irohad/main/server_runner.cpp: In member function 'void ServerRunner::waitForServersReady()': /home/pi/PKG/iroha11/irohad/main/server_runner.cpp:60:5: error: 'serverInstanceCV_' was not declared in this scope      serverInstanceCV_.wait(lock);      ^~~~~~~~~~~~~~~~~ /home/pi/PKG/iroha11/irohad/main/server_runner.cpp:60:5: note: suggested alternative: 'serverInstance_'      serverInstanceCV_.wait(lock);      ^~~~~~~~~~~~~~~~~      serverInstance_ [ 22%] Building CXX object irohad/ordering/CMakeFiles/on_demand_ordering_gate.dir/impl/ordering_gate_cache/on_demand_cache.o make[3]: *** [irohad/main/CMakeFiles/server_runner.dir/build.make:63: irohad/main/CMakeFiles/server_runner.dir/server_runner.o] Error 1 make[2]: *** [CMakeFiles/Makefile2:1340: irohad/main/CMakeFiles/server_runner.dir/all] Error 2 make[2]: *** Waiting for unfinished jobs....

SOLUTION: add

#include <condition_variable>

to: irohad/main/server_runner.hpp