Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protobuf compatibility... #22915

Closed
jiapei100 opened this issue Dec 3, 2022 · 1 comment
Closed

Protobuf compatibility... #22915

jiapei100 opened this issue Dec 3, 2022 · 1 comment
Labels
category: build/install duplicate question (invalid tracker) ask questions and other "no action" items here: https://forum.opencv.org

Comments

@jiapei100
Copy link

Descripe the feature and motivation

My ENV:

  • Ubuntu 22.04
  • gcc: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  • Protobuf: 3.20.3
  • OpenCV 4.6.0 (building)

Failed to build OpenCV dnn caffe with this version of Protobuf:

/usr/local/include/google/protobuf/arenastring.h:318:8: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::ClearToEmpty()’
  318 |   void ClearToEmpty();
      |        ^~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:318:8: note:   candidate expects 0 arguments, 2 provided
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h: In member function ‘void opencv_caffe::PythonParameter::_internal_set_layer(const string&)’:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36145:13: error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::Set(const string*, const string&, google::protobuf::Arena*)’
36145 |   layer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
      |   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:266:8: note: candidate: ‘template<class RefWrappedType> void google::protobuf::internal::ArenaStringPtr::Set(std::reference_wrapper<_Tp>, google::protobuf::Arena*)’
  266 |   void Set(std::reference_wrapper<RefWrappedType> const_string_ref,
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:266:8: note:   template argument deduction/substitution failed:
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36145:13: note:   mismatched types ‘std::reference_wrapper<_Tp>’ and ‘const string*’ {aka ‘const std::__cxx11::basic_string<char>*’}
36145 |   layer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
      |   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:255:8: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::ConstStringParam, google::protobuf::Arena*)’
  255 |   void Set(ConstStringParam value, Arena* arena);
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:255:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:256:8: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(std::string&&, google::protobuf::Arena*)’
  256 |   void Set(std::string&& value, Arena* arena);
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:256:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:401:13: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(const char*, google::protobuf::Arena*)’
  401 | inline void ArenaStringPtr::Set(const char* s, Arena* arena) {
      |             ^~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:401:13: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:405:13: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(const char*, size_t, google::protobuf::Arena*)’
  405 | inline void ArenaStringPtr::Set(const char* s, size_t n, Arena* arena) {
      |             ^~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:405:45: note:   no known conversion for argument 1 from ‘const string*’ {aka ‘const std::__cxx11::basic_string<char>*’} to ‘const char*’
  405 | inline void ArenaStringPtr::Set(const char* s, size_t n, Arena* arena) {
      |                                 ~~~~~~~~~~~~^
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h: In member function ‘void opencv_caffe::PythonParameter::set_layer(std::string&&)’:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36149:13: error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::Set(const string*, std::remove_reference<std::__cxx11::basic_string<char>&>::type, google::protobuf::Arena*)’
36149 |   layer_.Set(
      |   ~~~~~~~~~~^
36150 |     &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:266:8: note: candidate: ‘template<class RefWrappedType> void google::protobuf::internal::ArenaStringPtr::Set(std::reference_wrapper<_Tp>, google::protobuf::Arena*)’
  266 |   void Set(std::reference_wrapper<RefWrappedType> const_string_ref,
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:266:8: note:   template argument deduction/substitution failed:
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36149:13: note:   mismatched types ‘std::reference_wrapper<_Tp>’ and ‘const string*’ {aka ‘const std::__cxx11::basic_string<char>*’}
36149 |   layer_.Set(
      |   ~~~~~~~~~~^
36150 |     &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:255:8: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::ConstStringParam, google::protobuf::Arena*)’
  255 |   void Set(ConstStringParam value, Arena* arena);
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:255:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:256:8: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(std::string&&, google::protobuf::Arena*)’
  256 |   void Set(std::string&& value, Arena* arena);
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:256:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:401:13: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(const char*, google::protobuf::Arena*)’
  401 | inline void ArenaStringPtr::Set(const char* s, Arena* arena) {
      |             ^~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:401:13: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:405:13: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(const char*, size_t, google::protobuf::Arena*)’
  405 | inline void ArenaStringPtr::Set(const char* s, size_t n, Arena* arena) {
      |             ^~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:405:45: note:   no known conversion for argument 1 from ‘const string*’ {aka ‘const std::__cxx11::basic_string<char>*’} to ‘const char*’
  405 | inline void ArenaStringPtr::Set(const char* s, size_t n, Arena* arena) {
      |                                 ~~~~~~~~~~~~^
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h: In member function ‘void opencv_caffe::PythonParameter::set_layer(const char*)’:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36156:13: error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::Set(const string*, std::string, google::protobuf::Arena*)’
36156 |   layer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
      |   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36157 |               GetArena());
      |               ~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:266:8: note: candidate: ‘template<class RefWrappedType> void google::protobuf::internal::ArenaStringPtr::Set(std::reference_wrapper<_Tp>, google::protobuf::Arena*)’
  266 |   void Set(std::reference_wrapper<RefWrappedType> const_string_ref,
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:266:8: note:   template argument deduction/substitution failed:
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36156:13: note:   mismatched types ‘std::reference_wrapper<_Tp>’ and ‘const string*’ {aka ‘const std::__cxx11::basic_string<char>*’}
36156 |   layer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
      |   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36157 |               GetArena());
      |               ~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:255:8: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::ConstStringParam, google::protobuf::Arena*)’
  255 |   void Set(ConstStringParam value, Arena* arena);
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:255:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:256:8: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(std::string&&, google::protobuf::Arena*)’
  256 |   void Set(std::string&& value, Arena* arena);
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:256:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:401:13: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(const char*, google::protobuf::Arena*)’
  401 | inline void ArenaStringPtr::Set(const char* s, Arena* arena) {
      |             ^~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:401:13: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:405:13: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(const char*, size_t, google::protobuf::Arena*)’
  405 | inline void ArenaStringPtr::Set(const char* s, size_t n, Arena* arena) {
      |             ^~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:405:45: note:   no known conversion for argument 1 from ‘const string*’ {aka ‘const std::__cxx11::basic_string<char>*’} to ‘const char*’
  405 | inline void ArenaStringPtr::Set(const char* s, size_t n, Arena* arena) {
      |                                 ~~~~~~~~~~~~^
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h: In member function ‘void opencv_caffe::PythonParameter::set_layer(const char*, size_t)’:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36163:13: error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::Set(const string*, std::string, google::protobuf::Arena*)’
36163 |   layer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
      |   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36164 |       reinterpret_cast<const char*>(value), size), GetArena());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:266:8: note: candidate: ‘template<class RefWrappedType> void google::protobuf::internal::ArenaStringPtr::Set(std::reference_wrapper<_Tp>, google::protobuf::Arena*)’
  266 |   void Set(std::reference_wrapper<RefWrappedType> const_string_ref,
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:266:8: note:   template argument deduction/substitution failed:
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36163:13: note:   mismatched types ‘std::reference_wrapper<_Tp>’ and ‘const string*’ {aka ‘const std::__cxx11::basic_string<char>*’}
36163 |   layer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
      |   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36164 |       reinterpret_cast<const char*>(value), size), GetArena());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:255:8: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::ConstStringParam, google::protobuf::Arena*)’
  255 |   void Set(ConstStringParam value, Arena* arena);
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:255:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:256:8: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(std::string&&, google::protobuf::Arena*)’
  256 |   void Set(std::string&& value, Arena* arena);
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:256:8: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:401:13: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(const char*, google::protobuf::Arena*)’
  401 | inline void ArenaStringPtr::Set(const char* s, Arena* arena) {
      |             ^~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:401:13: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/google/protobuf/arenastring.h:405:13: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::Set(const char*, size_t, google::protobuf::Arena*)’
  405 | inline void ArenaStringPtr::Set(const char* s, size_t n, Arena* arena) {
      |             ^~~~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:405:45: note:   no known conversion for argument 1 from ‘const string*’ {aka ‘const std::__cxx11::basic_string<char>*’} to ‘const char*’
  405 | inline void ArenaStringPtr::Set(const char* s, size_t n, Arena* arena) {
      |                                 ~~~~~~~~~~~~^
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h: In member function ‘std::string* opencv_caffe::PythonParameter::_internal_mutable_layer()’:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36169:24: error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::Mutable(const string*, google::protobuf::Arena*)’
36169 |   return layer_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
      |          ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:275:16: note: candidate: ‘std::string* google::protobuf::internal::ArenaStringPtr::Mutable(google::protobuf::Arena*)’
  275 |   std::string* Mutable(Arena* arena);
      |                ^~~~~~~
/usr/local/include/google/protobuf/arenastring.h:275:16: note:   candidate expects 1 argument, 2 provided
/usr/local/include/google/protobuf/arenastring.h:276:16: note: candidate: ‘std::string* google::protobuf::internal::ArenaStringPtr::Mutable(const google::protobuf::internal::LazyString&, google::protobuf::Arena*)’
  276 |   std::string* Mutable(const LazyString& default_value, Arena* arena);
      |                ^~~~~~~
/usr/local/include/google/protobuf/arenastring.h:276:42: note:   no known conversion for argument 1 from ‘const string*’ {aka ‘const std::__cxx11::basic_string<char>*’} to ‘const google::protobuf::internal::LazyString&’
  276 |   std::string* Mutable(const LazyString& default_value, Arena* arena);
      |                        ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h: In member function ‘std::string* opencv_caffe::PythonParameter::release_layer()’:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36177:17: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘ReleaseNonDefault’; did you mean ‘ClearToDefault’?
36177 |   return layer_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
      |                 ^~~~~~~~~~~~~~~~~
      |                 ClearToDefault
....../opencv/build/modules/dnn/opencv-caffe.pb.h: In member function ‘void opencv_caffe::PythonParameter::set_allocated_layer(std::string*)’:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36185:22: error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::SetAllocated(const string*, std::string*&, google::protobuf::Arena*)’
36185 |   layer_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), layer,
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36186 |       GetArena());
      |       ~~~~~~~~~~~     
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:309:8: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::SetAllocated(std::string*, google::protobuf::Arena*)’
  309 |   void SetAllocated(std::string* value, Arena* arena);
      |        ^~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:309:8: note:   candidate expects 2 arguments, 3 provided
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h: In member function ‘void opencv_caffe::PythonParameter::clear_param_str()’:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36199:26: error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::ClearToEmpty(const string*, google::protobuf::Arena*)’
36199 |   param_str_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
      |   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:318:8: note: candidate: ‘void google::protobuf::internal::ArenaStringPtr::ClearToEmpty()’
  318 |   void ClearToEmpty();
      |        ^~~~~~~~~~~~
/usr/local/include/google/protobuf/arenastring.h:318:8: note:   candidate expects 0 arguments, 2 provided
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h: In member function ‘void opencv_caffe::PythonParameter::_internal_set_param_str(const string&)’:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36219:17: error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::Set(const string*, const string&, google::protobuf::Arena*)’
36219 |   param_str_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
      |   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.h:25,
                 from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
/usr/local/include/google/protobuf/arenastring.h:266:8: note: candidate: ‘template<class RefWrappedType> void google::protobuf::internal::ArenaStringPtr::Set(std::reference_wrapper<_Tp>, google::protobuf::Arena*)’
  266 |   void Set(std::reference_wrapper<RefWrappedType> const_string_ref,
      |        ^~~
/usr/local/include/google/protobuf/arenastring.h:266:8: note:   template argument deduction/substitution failed:
In file included from ....../opencv/build/modules/dnn/opencv-caffe.pb.cc:4:
....../opencv/build/modules/dnn/opencv-caffe.pb.h:36219:17: note:   mismatched types ‘std::reference_wrapper<_Tp>’ and ‘const string*’ {aka ‘const std::__cxx11::basic_string<char>*’}
36219 |   param_str_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
      |   ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Did anybody meet the same issue?

Additional context

No response

@fengyuentau fengyuentau added category: build/install question (invalid tracker) ask questions and other "no action" items here: https://forum.opencv.org and removed feature labels Dec 4, 2022
@fengyuentau
Copy link
Member

Have a try with this solution: #22674 (comment)


Build & installation questions should go to https://forum.opencv.org/ by the way.

@dkurt dkurt closed this as completed Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: build/install duplicate question (invalid tracker) ask questions and other "no action" items here: https://forum.opencv.org
Projects
None yet
Development

No branches or pull requests

4 participants