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

brpc build failed in x64-linux #2721

Closed
Cheney-W opened this issue Aug 2, 2024 · 4 comments · Fixed by #2722
Closed

brpc build failed in x64-linux #2721

Cheney-W opened this issue Aug 2, 2024 · 4 comments · Fixed by #2722

Comments

@Cheney-W
Copy link

Cheney-W commented Aug 2, 2024

Describe the bug (描述bug)
I'm a member of vcpkg team, when I tried to update the version of brpc to 1.10.0, I got an error as below:

vcpkg/buildtrees/brpc/src/1.10.0-6977522ae8.clean/src/brpc/serialized_response.h:56:9: error: ‘int brpc::SerializedResponse::GetCachedSize() const’ marked ‘override’, but does not override
   56 |     int GetCachedSize() const override { return (int)_serialized.size(); }
      |         ^~~~~~~~~~~~~
vcpkg/buildtrees/brpc/src/1.10.0-6977522ae8.clean/src/brpc/serialized_response.h:74:10: error: ‘void brpc::SerializedResponse::SetCachedSize(int) const’ marked ‘override’, but does not override
   74 |     void SetCachedSize(int size) const override;
      |          ^~~~~~~~~~~~~

I found above issue occurs due to the version of protobuf in vcpkg was 4.25.1, which there is no corresponding virtual function in the base class.

I know from the brcp documentation that you are using protobuf version 3.0-3.25, so I'm not sure if you support version 4.25.1.
I am currently trying to add a patch in vcpkg to remove the override keyword from those two functions, and I would like to confirm with you if this is a feasible solution.

To Reproduce (复现方法)
Build brpc 1.10.0 with protobuf 4.25.1.

Expected behavior (期望行为)
No error.

Versions (各种版本)
OS: Ubuntu 23.10
Compiler: GNU 13.2.0
brpc: 1.10.0
protobuf: 4.25.1

Additional context/screenshots (更多上下文/截图)

@chenBright
Copy link
Contributor

Are there any other compilation errors?

@Cheney-W
Copy link
Author

Cheney-W commented Aug 2, 2024

No, only those two above.

@chenBright
Copy link
Contributor

chenBright commented Aug 3, 2024

I am currently trying to add a patch in vcpkg to remove the override keyword from those two functions, and I would like to confirm with you if this is a feasible solution.

It is best to refer to #2722 .

@Cheney-W
Copy link
Author

Cheney-W commented Aug 5, 2024

Thanks for your reply! I will modify my patch based on this PR.

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

Successfully merging a pull request may close this issue.

2 participants