dmlc/ps-lite

How to fix 'kEmptyString' is not a member of 'google::protobuf::internal' ?

Opened this issue · 4 comments

...

./ps-lite/src/proto/task.pb.h: In member function ‘void ps::Task::set_allocated_msg(std::string*)’:
./ps-lite/src/proto/task.pb.h:540:16: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
   if (msg_ != &::google::protobuf::internal::kEmptyString) {
                ^
./ps-lite/src/proto/task.pb.h:548:41: error: ‘kEmptyString’ is not a member of ‘google::protobuf::internal’
     msg_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);

...
mli commented

it seems a problem with google protobuf. which os and compiler are you using?

Ubuntu 14.04
g++ 4.9.1

这个问题已经没有了,我也不太清楚是怎么改对的,可能是我安装的protobuf版本不一致?
我已经尝试编译Cxxnet 好几天了,始终会出现各种各样的编译错误,我通过手动安装一些依赖,或者直接更改 Makefile 添加编译器查找路径等,解决掉了许多。但每次都会出现新问题,太令人崩溃了。。。

现在的问题是

 ps-lite/build/libps.a(ps_main.o):在函数‘ps::App::Create(int, char**)’中:
 /home/gece/cxxnet/ps-lite/src/ps_main.cc:7:对‘CreateServerNode(int, char**)’未定义的引用 
 collect2: error: ld returned 1 exit status
 Makefile:150: recipe for target 'bin/cxxnet.ps' failed
 make: *** [bin/cxxnet.ps] Error 1

很可能之后还会出现很多错误,能不能把 Cxxnet 的build脚本改善一下,至少能比较容易地编译通过吧。。。

mli commented

oh, my apologies for the staled build script, i'll update it on this weekend (on travel now)

@drcege @mli I'm having a similar issue with 'kEmptyString' in the 'google::protobuf' package. I'm running Ubuntu 14.04 and have successfully installed (and subsequently tested) both protoc 2.6 and protoc 3.2. Both yield this error when I try to run a program that depends on the protoc library. Do you know how I might resolve this?