You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "missximon (via GitHub)" <gi...@apache.org> on 2024/03/22 09:14:34 UTC

[I] protobuf 3.7.1 编译最新brpc报错 (brpc)

missximon opened a new issue, #2578:
URL: https://github.com/apache/brpc/issues/2578

   [root@937d9313ad58 buildTest]# make
   Consolidate compiler generated dependencies of target PROTO_LIB
   [ 11%] Built target PROTO_LIB
   Consolidate compiler generated dependencies of target BUTIL_LIB
   [ 44%] Built target BUTIL_LIB
   Consolidate compiler generated dependencies of target SOURCES_LIB
   [ 94%] Built target SOURCES_LIB
   [ 94%] Built target brpc-static
   Consolidate compiler generated dependencies of target protoc-gen-mcpack
   [ 94%] 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:1056: 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:300: 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:300: 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:300: 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:300: 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:300: 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*)'
   CMakeFiles/protoc-gen-mcpack.dir/mcpack2pb/generator.cpp.o:/usr/local/include/google/protobuf/io/printer.h:300: 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'
   collect2: error: ld returned 1 exit status
   make[2]: *** [output/bin/protoc-gen-mcpack] Error 1
   make[1]: *** [src/CMakeFiles/protoc-gen-mcpack.dir/all] Error 2
   make: *** [all] Error 2
   
   有知道解决办法的吗...使用pb2.5直接报错:
   [root@b8c6e7132fc1 build]# make
   [  0%] Generating brpc/grpc_health_check.pb.h, brpc/grpc_health_check.pb.cc
   brpc/grpc_health_check.proto:38:51: Expected ")".
   make[2]: *** [brpc/grpc_health_check.pb.h] Error 1
   make[1]: *** [CMakeFiles/PROTO_LIB.dir/all] Error 2
   make: *** [all] Error 2
   
   发现需要升级到3+,就升级到了3.7.1,然后还是报错


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] protobuf 3.7.1 编译最新brpc报错 (brpc)

Posted by "missximon (via GitHub)" <gi...@apache.org>.
missximon commented on issue #2578:
URL: https://github.com/apache/brpc/issues/2578#issuecomment-2014668873

   brpc version: commit id d4695c90092c2574d27e9f6eaa9dc9a86137be40


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] protobuf 3.7.1 编译最新brpc报错 (brpc)

Posted by "wasphin (via GitHub)" <gi...@apache.org>.
wasphin commented on issue #2578:
URL: https://github.com/apache/brpc/issues/2578#issuecomment-2014862673

   像是编译的 protobuf 和 brpc 的 `_GLIBCXX_USE_CXX11_ABI ` 不一样导致的,可以统一下配置


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org