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

no matching function in protobuf #121

Closed
MohamadHalwani opened this issue Jul 26, 2021 · 7 comments · Fixed by Ultimaker/Cura#12708
Closed

no matching function in protobuf #121

MohamadHalwani opened this issue Jul 26, 2021 · 7 comments · Fixed by Ultimaker/Cura#12708
Labels

Comments

@MohamadHalwani
Copy link

when I run make inside build directory I'm having the following error.
home/ubuntu/Desktop/DEAWA_RD/Programs/Codes/libArcus/src/Socket_p.h:551:77: error: no matching function for call to ‘google::protobuf::io::CodedInputStream::SetTotalBytesLimit(const int&, const int&)’

any hep is appreciated

@MohamadHalwani MohamadHalwani changed the title no matching issue in protobuf no matching function in protobuf Jul 26, 2021
@nallath
Copy link
Member

nallath commented Jul 26, 2021

Did you check the build instructions that we provide as a part of Cura? They also include how to build libArcus from source. I've recently tried those from a clean install and those worked. You can find them here: https://github.com/Ultimaker/Cura/wiki/Running-Cura-from-Source-on-Ubuntu#arcus

@mrnexeon
Copy link

mrnexeon commented Aug 2, 2021

In the last releases of protobuf in the master branch some deprecated functions were removed.

So, installing protobuf from 3.15.x branch works for me!

@Ghostkeeper
Copy link
Contributor

Ghostkeeper commented Aug 3, 2021

We are using Protobuf 3.15 ourselves in the Cura builds, indeed:

https://github.com/Ultimaker/cura-build-environment/blob/d76665026132a832316c95a5566abd6896489474/projects/protobuf.cmake#L1

It seems the overload we're using was removed a few weeks ago: protocolbuffers/protobuf#8794

It would be quite easy to remove the second parameter from that function call. However libArcus as a library currently supports Protobuf down to 3.0.0. We'd have to increase that minimum requirement if we want to fix this for the newest protobuf versions. Because back then, the suggested alternative didn't exist yet.

@Ghostkeeper Ghostkeeper added the bug label Aug 3, 2021
@jellespijker
Copy link
Member

@Ghostkeeper We're using Protobuf 3.9.2 in the MinGW cross-building for Windows

@Ghostkeeper
Copy link
Contributor

Okay, interesting! Perhaps we should align that with the rest.

In 3.9.2 the new overload already existed so it shouldn't be a problem, luckily.

@Ghostkeeper
Copy link
Contributor

Developers, see issue CURA-8467.

@ahesford
Copy link

@Ghostkeeper You don't have to drop support for older Protobuf, you just have to take advantage of the GOOGLE_PROTOBUF_VERSION macro. See, e.g., https://github.com/Xilinx/XRT/blob/master/src/runtime_src/core/include/xcl_api_macros.h#L34

There are two issues with the move to Protobuf 3.18.0 or newer: dropping the second argument in SetTotalBytesLimit (which has gone unused for several versions) and dropping ByteSize for ByteSizeLong on messages. The latter returns a size_t instead of an int. I'm patching libArcus for Void Linux, you can adapt something similar inside some compile-time version checks: https://github.com/ahesford/void-packages/blob/protobuf/srcpkgs/libArcus/patches/protobuf.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants