不好意思打扰了,请问下为什么我的编译不了
Closed this issue · 0 comments
不好意思打扰了,想学习下rabit的源码,发现编译不通过,我的环境是gcc 9.2,ubuntu20 ,我在项目根目录直接make有error,用cmake编译也有error,mpi等都装好了,试了下gcc 7也不行
g++ -c -O3 -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -std=c++11 -msse2 -fPIC -I ../dmlc-core/include -I include/ -o allreduce_base.o src/allreduce_base.cc
In file included from include/rabit/internal/./io.h:17:0,
from include/rabit/internal/utils.h:17,
from src/allreduce_base.h:18,
from src/allreduce_base.cc:9:
include/rabit/serializable.h:18:9: error: ‘dmlc’ does not name a type
typedef dmlc::Stream Stream;
^~~~
include/rabit/serializable.h:23:9: error: ‘dmlc’ does not name a type
typedef dmlc::Serializable Serializable;
^~~~
In file included from include/rabit/internal/utils.h:17:0,
from src/allreduce_base.h:18,
from src/allreduce_base.cc:9:
include/rabit/internal/./io.h:22:9: error: ‘dmlc’ does not name a type
typedef dmlc::SeekStream SeekStream;
^~~~
include/rabit/internal/./io.h:24:48: error: expected class-name before ‘{’ token
struct MemoryFixSizeBuffer : public SeekStream {
^
include/rabit/internal/./io.h: In member function ‘virtual void rabit::utils::MemoryFixSizeBuffer::Write(const void*, size_t)’:
include/rabit/internal/./io.h:44:12: error: ‘Assert’ is not a member of ‘rabit::utils’
utils::Assert(curr_ptr_ + size <= buffer_size_,
^~~~~~
include/rabit/internal/./io.h: At global scope:
include/rabit/internal/./io.h:73:47: error: expected class-name before ‘{’ token
struct MemoryBufferStream : public SeekStream {
^
include/rabit/internal/./io.h: In member function ‘virtual size_t rabit::utils::MemoryBufferStream::Read(void*, size_t)’:
include/rabit/internal/./io.h:81:12: error: ‘Assert’ is not a member of ‘rabit::utils’
utils::Assert(curr_ptr_ <= p_buffer_->length(),
^~~~~~
In file included from src/allreduce_base.h:18:0,
from src/allreduce_base.cc:9:
include/rabit/internal/utils.h: In function ‘void rabit::utils::HandleAssertError(const char*)’:
include/rabit/internal/utils.h:90:9: error: ‘dmlc’ has not been declared
throw dmlc::Error(msg);
^~~~
include/rabit/internal/utils.h: In function ‘void rabit::utils::HandleCheckError(const char*)’:
include/rabit/internal/utils.h:98:9: error: ‘dmlc’ has not been declared
throw dmlc::Error(msg);
^~~~
In file included from src/allreduce_base.h:19:0,
from src/allreduce_base.cc:9:
include/rabit/internal/engine.h: At global scope:
include/rabit/internal/engine.h:145:30: error: ‘Serializable’ has not been declared
virtual int LoadCheckPoint(Serializable *global_model,
^~~~~~~~~~~~
include/rabit/internal/engine.h:146:30: error: ‘Serializable’ has not been declared
Serializable *local_model = NULL) = 0;
^~~~~~~~~~~~
include/rabit/internal/engine.h:163:33: error: ‘Serializable’ does not name a type
virtual void CheckPoint(const Serializable *global_model,
^~~~~~~~~~~~
include/rabit/internal/engine.h:164:33: error: ‘Serializable’ does not name a type
const Serializable *local_model = NULL) = 0;
^~~~~~~~~~~~
include/rabit/internal/engine.h:185:37: error: ‘Serializable’ does not name a type
virtual void LazyCheckPoint(const Serializable *global_model) = 0;
^~~~~~~~~~~~
In file included from src/allreduce_base.cc:9:0:
src/allreduce_base.h:181:30: error: ‘Serializable’ has not been declared
virtual int LoadCheckPoint(Serializable *global_model,
^~~~~~~~~~~~
src/allreduce_base.h:182:30: error: ‘Serializable’ has not been declared
Serializable *local_model = NULL) {
^~~~~~~~~~~~
src/allreduce_base.h:201:33: error: ‘Serializable’ does not name a type
virtual void CheckPoint(const Serializable *global_model,
^~~~~~~~~~~~
src/allreduce_base.h:202:33: error: ‘Serializable’ does not name a type
const Serializable *local_model = NULL) {
^~~~~~~~~~~~
src/allreduce_base.h:225:37: error: ‘Serializable’ does not name a type
virtual void LazyCheckPoint(const Serializable *global_model) {