[code]
(...)
[ 95%] Building CXX object src/CMakeFiles/objxgboost.dir/__/rabit/src/engine_mpi.cc.o
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:9: warning: "NOMINMAX" redefined
    9 | #define NOMINMAX
      | 
<command-line>: note: this is the location of the previous definition
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc: In member function ‘virtual void rabit::engine::MPIEngine::Broadcast(void*, size_t, int)’:
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:40:10: error: ‘COMM_WORLD’ is not a member of ‘MPI’
   40 |     MPI::COMM_WORLD.Bcast(sendrecvbuf_, size, MPI::CHAR, root);
      |          ^~~~~~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:40:52: error: ‘CHAR’ is not a member of ‘MPI’
   40 |     MPI::COMM_WORLD.Bcast(sendrecvbuf_, size, MPI::CHAR, root);
      |                                                    ^~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc: In member function ‘virtual int rabit::engine::MPIEngine::GetRank() const’:
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:59:17: error: ‘COMM_WORLD’ is not a member of ‘MPI’
   59 |     return MPI::COMM_WORLD.Get_rank();
      |                 ^~~~~~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc: In member function ‘virtual int rabit::engine::MPIEngine::GetWorldSize() const’:
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:63:17: error: ‘COMM_WORLD’ is not a member of ‘MPI’
   63 |     return MPI::COMM_WORLD.Get_size();
      |                 ^~~~~~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc: In member function ‘virtual std::string rabit::engine::MPIEngine::GetHost() const’:
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:73:10: error: ‘Get_processor_name’ is not a member of ‘MPI’
   73 |     MPI::Get_processor_name(name, len);
      |          ^~~~~~~~~~~~~~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc: In function ‘bool rabit::engine::Init(int, char**)’:
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:94:10: error: ‘Init’ is not a member of ‘MPI’; did you mean ‘rabit::engine::Init’?
   94 |     MPI::Init(argc, argv);
      |          ^~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:92:6: note: ‘rabit::engine::Init’ declared here
   92 | bool Init(int argc, char *argv[]) {
      |      ^~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc: In function ‘bool rabit::engine::Finalize()’:
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:104:10: error: ‘Finalize’ is not a member of ‘MPI’; did you mean ‘rabit::engine::Finalize’?
  104 |     MPI::Finalize();
      |          ^~~~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:102:6: note: ‘rabit::engine::Finalize’ declared here
  102 | bool Finalize(void) {
      |      ^~~~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc: At global scope:
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:117:49: error: return type ‘class MPI::Datatype’ is incomplete
  117 | inline MPI::Datatype GetType(mpi::DataType dtype) {
      |                                                 ^
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc: In function ‘void rabit::engine::GetType(mpi::DataType)’:
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:120:29: error: ‘CHAR’ is not a member of ‘MPI’
  120 |     case kChar: return MPI::CHAR;
      |                             ^~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:121:30: error: ‘BYTE’ is not a member of ‘MPI’
  121 |     case kUChar: return MPI::BYTE;
      |                              ^~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:122:28: error: ‘INT’ is not a member of ‘MPI’
  122 |     case kInt: return MPI::INT;
      |                            ^~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:123:29: error: ‘UNSIGNED’ is not a member of ‘MPI’
  123 |     case kUInt: return MPI::UNSIGNED;
      |                             ^~~~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:124:29: error: ‘LONG’ is not a member of ‘MPI’
  124 |     case kLong: return MPI::LONG;
      |                             ^~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:125:30: error: ‘UNSIGNED_LONG’ is not a member of ‘MPI’
  125 |     case kULong: return MPI::UNSIGNED_LONG;
      |                              ^~~~~~~~~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:126:30: error: ‘FLOAT’ is not a member of ‘MPI’
  126 |     case kFloat: return MPI::FLOAT;
      |                              ^~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:127:31: error: ‘DOUBLE’ is not a member of ‘MPI’
  127 |     case kDouble: return MPI::DOUBLE;
      |                               ^~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:128:33: error: ‘LONG_LONG’ is not a member of ‘MPI’
  128 |     case kLongLong: return MPI::LONG_LONG;
      |                                 ^~~~~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:129:34: error: ‘UNSIGNED_LONG_LONG’ is not a member of ‘MPI’
  129 |     case kULongLong: return MPI::UNSIGNED_LONG_LONG;
      |                                  ^~~~~~~~~~~~~~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:132:15: error: ‘CHAR’ is not a member of ‘MPI’
  132 |   return MPI::CHAR;
      |               ^~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc: At global scope:
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:135:13: error: ‘Op’ in namespace ‘MPI’ does not name a type
  135 | inline MPI::Op GetOp(mpi::OpType otype) {
      |             ^~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc: In function ‘void rabit::engine::Allreduce_(void*, size_t, size_t, void (*)(const void*, void*, int, const MPI::Datatype&), mpi::DataType, mpi::OpType, void (*)(void*), void*)’:
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:156:8: error: ‘COMM_WORLD’ is not a member of ‘MPI’
  156 |   MPI::COMM_WORLD.Allreduce(MPI_IN_PLACE, sendrecvbuf,
      |        ^~~~~~~~~~
/home/alarm/aur/python-xgboost/src/xgboost-2.0.3/rabit/src/engine_mpi.cc:157:52: error: ‘GetOp’ was not declared in this scope
  157 |                             count, GetType(dtype), GetOp(op));
      |                                                    ^~~~~
make[2]: *** [src/CMakeFiles/objxgboost.dir/build.make:1224: src/CMakeFiles/objxgboost.dir/__/rabit/src/engine_mpi.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:282: src/CMakeFiles/objxgboost.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...[/code]
Hi,
Need your help to figure why those errors are occurring. I had a look on src code of both openmpi and xgboot but is not obvious to me how these MPI::XXXX are supposed to be resolved.
			
		
