Build fails with protobuf 3.18
ncopa opened this issue · comments
Build of libArcus 4.11.0 fails with protobuf 3.18.1 on alpine linux (x86_64):
...
[ 22%] Building CXX object CMakeFiles/Arcus.dir/src/Error.cpp.o
In file included from /home/ncopa/aports/testing/libarcus/src/libArcus-4.11.0/src/Socket.cpp:20:
/home/ncopa/aports/testing/libarcus/src/libArcus-4.11.0/src/Socket_p.h: In member function 'void Arcus::Socket::Private::sendMessage(const MessagePtr&)':
/home/ncopa/aports/testing/libarcus/src/libArcus-4.11.0/src/Socket_p.h:365:51: warning: 'int google::protobuf::MessageLite::ByteSize() const' is deprecated: Please use ByteSizeLong() instead [-Wdeprecated-declarations]
365 | uint32_t message_size = message->ByteSize();
| ^
In file included from /usr/include/google/protobuf/generated_enum_util.h:36,
from /usr/include/google/protobuf/generated_enum_reflection.h:44,
from /usr/include/google/protobuf/generated_message_reflection.h:46,
from /usr/include/google/protobuf/message.h:122,
from /home/ncopa/aports/testing/libarcus/src/libArcus-4.11.0/src/Socket_p.h:41,
from /home/ncopa/aports/testing/libarcus/src/libArcus-4.11.0/src/Socket.cpp:20:
/usr/include/google/protobuf/message_lite.h:433:7: note: declared here
433 | int ByteSize() const { return internal::ToIntSize(ByteSizeLong()); }
| ^~~~~~~~
In file included from /home/ncopa/aports/testing/libarcus/src/libArcus-4.11.0/src/Socket.cpp:20:
/home/ncopa/aports/testing/libarcus/src/libArcus-4.11.0/src/Socket_p.h: In member function 'void Arcus::Socket::Private::handleMessage(const std::shared_ptr<Arcus::Private::WireMessage>&)':
/home/ncopa/aports/testing/libarcus/src/libArcus-4.11.0/src/Socket_p.h:551:77: error: no matching function for call to 'google::protobuf::io::CodedInputStream::SetTotalBytesLimit(const int&, const int&)'
551 | stream.SetTotalBytesLimit(message_size_maximum, message_size_warning);
| ^
In file included from /usr/include/google/protobuf/message_lite.h:47,
from /usr/include/google/protobuf/generated_enum_util.h:36,
from /usr/include/google/protobuf/generated_enum_reflection.h:44,
from /usr/include/google/protobuf/generated_message_reflection.h:46,
from /usr/include/google/protobuf/message.h:122,
from /home/ncopa/aports/testing/libarcus/src/libArcus-4.11.0/src/Socket_p.h:41,
from /home/ncopa/aports/testing/libarcus/src/libArcus-4.11.0/src/Socket.cpp:20:
/usr/include/google/protobuf/io/coded_stream.h:401:8: note: candidate: 'void google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int)'
401 | void SetTotalBytesLimit(int total_bytes_limit);
| ^~~~~~~~~~~~~~~~~~
/usr/include/google/protobuf/io/coded_stream.h:401:8: note: candidate expects 1 argument, 2 provided
make[2]: *** [CMakeFiles/Arcus.dir/build.make:76: CMakeFiles/Arcus.dir/src/Socket.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:128: CMakeFiles/Arcus.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Indeed, it's a duplicate. Thanks for the report! We have this in our backlog at the moment as a technical debt item.