You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/08/20 07:02:35 UTC

[GitHub] [incubator-brpc] darionyaphet opened a new issue #1537: protobuf 版本问题

darionyaphet opened a new issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537


   **Describe the bug (描述bug)**
   
   ```
   src/mcpack2pb/generator.o: In function `google::protobuf::internal::StringTypeTraits::Get(int, google::protobuf::internal::ExtensionSet const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
   /usr/local/include/google/protobuf/extension_set.h:691: undefined reference to `google::protobuf::internal::ExtensionSet::GetString(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
   src/mcpack2pb/generator.o: In function `mcpack2pb::generate_declarations(std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, google::protobuf::io::Printer&)':
   /data/darion/incubator-brpc-0.9.7/src/mcpack2pb/generator.cpp:187: undefined reference to `google::protobuf::io::Printer::Print(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
   /data/darion/incubator-brpc-0.9.7/src/mcpack2pb/generator.cpp:200: undefined reference to `google::protobuf::io::Printer::Print(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
   
   ```
   
   **To Reproduce (复现方法)**
   
   
   **Expected behavior (期望行为)**
   
   
   **Versions (各种版本)**
   OS:
   Compiler:
   brpc:
   protobuf:
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


-- 
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


[GitHub] [incubator-brpc] darionyaphet commented on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
darionyaphet commented on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-903394634


   @guodongxiaren 请问 您这边protobuf 版本是?


-- 
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


[GitHub] [incubator-brpc] guodongxiaren edited a comment on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
guodongxiaren edited a comment on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-904312309


   ```
   strings libprotobuf.so|grep Print
   ```
   看能不能搜到符号,然后把搜到的符号用c++fit命令解析一下。看看参数类型有没有cxx11的命名空间


-- 
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


[GitHub] [incubator-brpc] darionyaphet commented on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
darionyaphet commented on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-904300296


   > protobuf是怎么安装的
   
   下载源码编译安装的


-- 
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


[GitHub] [incubator-brpc] guodongxiaren commented on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
guodongxiaren commented on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-904312309


   strings libprotobuf.so|grep Print
   
   看能不能搜到符号,然后把搜到的符号用c++fit命令解析一下。看看参数类型有没有cxx11的命名空间


-- 
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


[GitHub] [incubator-brpc] darionyaphet commented on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
darionyaphet commented on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-904276478


   > 2和3我都和brpc联编过。你这个不是protobuf的版本问题,是编译protobuf的g++版本问题
   
   您好 我这边G++ 版本是 `g++ (GCC) 9.4.0`


-- 
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


[GitHub] [incubator-brpc] wasphin commented on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
wasphin commented on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-903419520


   可能和 #1487重复.
   
   issue 模板中有设置需要提供的各种版本信息, 什么都不提供的情况下只抛个问题, 这样不是很好.
   
   protobuf  2.4+ 应该都是没有问题的.


-- 
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


[GitHub] [incubator-brpc] wasphin edited a comment on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
wasphin edited a comment on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-903419520


   可能和 #1487 重复.
   
   issue 模板中有设置需要提供的各种版本信息, 什么都不提供的情况下只抛个问题, 这样不是很好.
   
   protobuf  2.4+ 应该都是没有问题的.


-- 
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


[GitHub] [incubator-brpc] guodongxiaren commented on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
guodongxiaren commented on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-903403303


   2和3我都和brpc联编过。你这个不是protobuf的版本问题,是编译protobuf的g++版本问题


-- 
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


[GitHub] [incubator-brpc] guodongxiaren commented on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
guodongxiaren commented on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-904295936


   protobuf是怎么安装的


-- 
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


[GitHub] [incubator-brpc] guodongxiaren commented on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
guodongxiaren commented on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-903254369


   看起来应该是你系统里面编译的protobuf和编译brpc时ABI不匹配(g++版本问题)
   可以在你的机器上用protobuf源码重新编译一份protobuf放到默认的路径上,覆盖掉旧版libprotobuf.so。
   
   或者给brpc的Makefile中的CPPFLAGS增加`-D_GLIBCXX_USE_CXX11_ABI=0` 试试


-- 
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


[GitHub] [incubator-brpc] darionyaphet edited a comment on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
darionyaphet edited a comment on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-904276478


   > 2和3我都和brpc联编过。你这个不是protobuf的版本问题,是编译protobuf的g++版本问题
   
   您好 我这边G++ 版本是 `g++ (GCC) 9.4.0`
   
   
   我在 Makefile 的`CPPFLAGS`中增加了 `-D_GLIBCXX_USE_CXX11_ABI=0` 重新make 还是存在上面的问题  谢谢
   
   
   
   ```
   CPPFLAGS+=-DBTHREAD_USE_FAST_PTHREAD_MUTEX -D_GLIBCXX_USE_CXX11_ABI=0 -D__const__= -D_GNU_SOURCE -DUSE_SYMBOLIZE -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -DBRPC_REVISION=\"$(shell ./tools/get_brpc_revision.sh .)\"
   ```


-- 
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


[GitHub] [incubator-brpc] darionyaphet edited a comment on issue #1537: protobuf 版本问题

Posted by GitBox <gi...@apache.org>.
darionyaphet edited a comment on issue #1537:
URL: https://github.com/apache/incubator-brpc/issues/1537#issuecomment-904276478


   > 2和3我都和brpc联编过。你这个不是protobuf的版本问题,是编译protobuf的g++版本问题
   
   您好 我这边G++ 版本是 `g++ (GCC) 9.4.0`
   
   
   我在 Makefile 的`CPPFLAGS`中增加了 `-D_GLIBCXX_USE_CXX11_ABI=0` 重新make 还是存在上面的问题  谢谢


-- 
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