brpc icon indicating copy to clipboard operation
brpc copied to clipboard

../output/bin/protoc-gen-mcpack

Open Lowpower opened this issue 3 years ago • 5 comments

Describe the bug (描述bug) [ 95%] Linking CXX executable ../output/bin/protoc-gen-mcpack CMakeFiles/protoc-gen-mcpack.dir/mcpack2pb/generator.cpp.o: In function google::protobuf::internal::StringTypeTraits::Get(int, google::protobuf::internal::ExtensionSet const&, std::string const&)': /usr/local/include/google/protobuf/extension_set.h:1077: undefined reference to google::protobuf::internal::ExtensionSet::GetString(int, std::string const&) const' CMakeFiles/protoc-gen-mcpack.dir/mcpack2pb/generator.cpp.o: In function google::protobuf::io::Printer::PrintInternal(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >*, char const*)': /usr/local/include/google/protobuf/io/printer.h:304: undefined reference to google::protobuf::io::Printer::Print(std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&, char const*)' /usr/local/include/google/protobuf/io/printer.h:304: undefined reference to google::protobuf::io::Printer::Print(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, char const*)' /usr/local/include/google/protobuf/io/printer.h:304: undefined reference to google::protobuf::io::Printer::Print(std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&, char const*)' /usr/local/include/google/protobuf/io/printer.h:304: undefined reference to google::protobuf::io::Printer::Print(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, char const*)' /usr/local/include/google/protobuf/io/printer.h:304: undefined reference to google::protobuf::io::Printer::Print(std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&, char const*)' CMakeFiles/protoc-gen-mcpack.dir/mcpack2pb/generator.cpp.o:/usr/local/include/google/protobuf/io/printer.h:304: more undefined references to google::protobuf::io::Printer::Print(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&, char const*)' follow CMakeFiles/protoc-gen-mcpack.dir/mcpack2pb/generator.cpp.o:(.data.rel.ro._ZTVN9mcpack2pb16McpackToProtobufE[_ZTVN9mcpack2pb16McpackToProtobufE]+0x28): undefined reference to google::protobuf::compiler::CodeGenerator::GenerateAll(std::vector<google::protobuf::FileDescriptor const*, std::allocator<google::protobuf::FileDescriptor const*> > const&, std::string const&, google::protobuf::compiler::GeneratorContext*, std::string*) const' ../output/lib/libbrpc.so: undefined reference to google::protobuf::Descriptor::DebugString() const' ../output/lib/libbrpc.so: undefined reference to google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::EmptyDefault, std::string const&, google::protobuf::Arena*)' ../output/lib/libbrpc.so: undefined reference to google::protobuf::Message::GetTypeName() const' ../output/lib/libbrpc.so: undefined reference to google::protobuf::internal::InlineGreedyStringParser(std::string*, char const*, google::protobuf::internal::ParseContext*)' ../output/lib/libbrpc.so: undefined reference to google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliasedOutline(unsigned int, std::string const&, unsigned char*)' ../output/lib/libbrpc.so: undefined reference to google::protobuf::EnumDescriptor::FindValueByName(std::string const&) const' ../output/lib/libbrpc.so: undefined reference to google::protobuf::ServiceDescriptor::FindMethodByName(std::string const&) const' ../output/lib/libbrpc.so: undefined reference to google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::EmptyDefault, std::string&&, google::protobuf::Arena*)' ../output/lib/libbrpc.so: undefined reference to google::protobuf::MessageLite::SerializeToString(std::string*) const' ../output/lib/libbrpc.so: undefined reference to leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)' ../output/lib/libbrpc.so: undefined reference to google::protobuf::SetLogHandler(void (*)(google::protobuf::LogLevel, char const*, int, std::string const&))' ../output/lib/libbrpc.so: undefined reference to google::protobuf::Reflection::GetRepeatedStringReference(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*, int, std::string*) const' ../output/lib/libbrpc.so: undefined reference to google::SetCommandLineOption(char const*, char const*)' ../output/lib/libbrpc.so: undefined reference to google::protobuf::Message::ShortDebugString() const' ../output/lib/libbrpc.so: undefined reference to google::protobuf::MessageLite::ParseFromString(std::string const&)' ../output/lib/libbrpc.so: undefined reference to google::protobuf::Reflection::GetString(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const' ../output/lib/libbrpc.so: undefined reference to google::protobuf::Reflection::SetString(google::protobuf::Message*, google::protobuf::FieldDescriptor const*, std::string) const' ../output/lib/libbrpc.so: undefined reference to google::protobuf::Reflection::GetStringReference(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*, std::string*) const' ../output/lib/libbrpc.so: undefined reference to google::protobuf::internal::ArenaStringPtr::Mutable(google::protobuf::internal::ArenaStringPtr::EmptyDefault, google::protobuf::Arena*)' ../output/lib/libbrpc.so: undefined reference to google::protobuf::ServiceDescriptor::DebugString() const' ../output/lib/libbrpc.so: undefined reference to google::GetCommandLineOption(char const*, std::string*)' ../output/lib/libbrpc.so: undefined reference to google::protobuf::Reflection::AddString(google::protobuf::Message*, google::protobuf::FieldDescriptor const*, std::string) const' ../output/lib/libbrpc.so: undefined reference to google::protobuf::internal::fixed_address_empty_string' ../output/lib/libbrpc.so: undefined reference to google::protobuf::Descriptor::FindFieldByName(std::string const&) const' ../output/lib/libbrpc.so: undefined reference to leveldb::Status::ToString() const' ../output/lib/libbrpc.so: undefined reference to google::RegisterFlagValidator(std::string const*, bool ()(char const, std::string const&))' ../output/lib/libbrpc.so: undefined reference to google::FlagRegisterer::FlagRegisterer<std::string>(char const*, char const*, char const*, std::string*, std::string*)' ../output/lib/libbrpc.so: undefined reference to google::protobuf::Message::InitializationErrorString() const'

To Reproduce (复现方法)

Expected behavior (期望行为)

Versions (各种版本) OS:centos7 Compiler:gcc10.1 brpc: protobuf:3.15.7

Additional context/screenshots (更多上下文/截图)

Lowpower avatar Apr 06 '21 08:04 Lowpower

我在Ubuntu 20.04上遇到类似的问题。 undefined reference to `google::FlagRegisterer::FlagRegisterer()

https://github.com/apache/incubator-brpc/issues/1392

yuan-luo avatar May 02 '21 07:05 yuan-luo

老哥,这个问题解决了吗

sangli00 avatar Apr 02 '22 06:04 sangli00

老哥,这个问题解决了吗

你遇到的具体问题是什么,和上面的issue描述一样吗?

wwbmmm avatar Apr 02 '22 06:04 wwbmmm

老哥,这个问题解决了吗

你遇到的具体问题是什么,和上面的issue描述一样吗?

嗯嗯 我这应该是ABI兼容问题。升级了GCC。就编译不过去了

sangli00 avatar Apr 04 '22 02:04 sangli00

anyone fixed this problem?

larryjiang avatar Aug 22 '22 16:08 larryjiang