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

C3848: 具有类型“const google::protobuf::compiler::java::anonymous-namespace'::FieldDescriptorCompare”的表达式会丢失一些 const-volatile 限定符以调用“bool google::protobuf::compiler::java::anonymous-namespace'::FieldDescriptorCompare::operator ()(const google::protobuf::FieldDescriptor *,const google::protobuf::FieldDescriptor *)” #19025

Open
EaonL opened this issue Oct 29, 2024 · 1 comment

Comments

@EaonL
Copy link

EaonL commented Oct 29, 2024

What version of protobuf and what language are you using?
Version: main,last version(v29.0-rc2 also make the bug)
Language: C++

What operating system (Linux, Windows, ...) and version?
Windows 10

What runtime / compiler are you using (e.g., python version or gcc version)
Microsofrt Visual Studio 16 2019

What did you do?
Steps to reproduce the behavior:

  1. build this lib 《protobuf

What did you expect to see
build success...

What did you see instead?
27>D:\Program Files\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(24
1,5): error MSB8066: “D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_p
rotobuf-mkdir.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_prot
obuf-download.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_prot
obuf-update.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_protob
uf-patch.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_protobuf-
configure.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_protobuf
-build.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_protobuf-in
stall.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\9b6d8d43a47d7db9d14bb709f559897f\extern_protobuf-com
plete.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\dd9531fc40ca8a1795f8a662a680d3a2\extern_protobuf.rul
e”的自定义生成已退出,代码为 1。 [D:\AI\Paddle-Lite-2.12\build.lite.x86\extern_protobuf.vcxproj]

“D:\AI\Paddle-Lite-2.12\build.lite.x86\lite\publish_inference.vcxproj”(默认目标) (1) ->
“D:\AI\Paddle-Lite-2.12\build.lite.x86\lite\publish_inference_x86_cxx_lib.vcxproj”(默认目标) (2) ->
“D:\AI\Paddle-Lite-2.12\build.lite.x86\lite\api\bundle_full_api.vcxproj”(默认目标) (3) ->
“D:\AI\Paddle-Lite-2.12\build.lite.x86\lite\api\paddle_api_full.vcxproj”(默认目标) (4) ->
“D:\AI\Paddle-Lite-2.12\build.lite.x86\lite\core\core.vcxproj”(默认目标) (6) ->
“D:\AI\Paddle-Lite-2.12\build.lite.x86\extern_protobuf.vcxproj”(默认目标) (27) ->
(CustomBuild 目标) ->
d:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtree(1601,1): error
C3848: 具有类型“const google::protobuf::compiler::java::anonymous-namespace'::FieldDescriptorCompare”的表达式会丢失一些 con st-volatile 限定符以调用“bool google::protobuf::compiler::java::anonymous-namespace'::FieldDescriptorCompare::operato
r ()(const google::protobuf::FieldDescriptor *,const google::protobuf::FieldDescriptor *)” (编译源文件 D:\AI\Paddle-L
ite-2.12\third-party\protobuf-host\src\google\protobuf\compiler\java\java_file.cc) [D:\AI\Paddle-Lite-2.12\third
-party\protobuf-host\src\extern_protobuf-build\libprotoc.vcxproj] [D:\AI\Paddle-Lite-2.12\build.lite.x86\extern_
protobuf.vcxproj]
d:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtree(1591,1): error
C3848: 具有类型“const google::protobuf::compiler::java::anonymous-namespace'::FieldDescriptorCompare”的表达式会丢失一些 con st-volatile 限定符以调用“bool google::protobuf::compiler::java::anonymous-namespace'::FieldDescriptorCompare::operato
r ()(const google::protobuf::FieldDescriptor *,const google::protobuf::FieldDescriptor *)” (编译源文件 D:\AI\Paddle-L
ite-2.12\third-party\protobuf-host\src\google\protobuf\compiler\java\java_file.cc) [D:\AI\Paddle-Lite-2.12\third
-party\protobuf-host\src\extern_protobuf-build\libprotoc.vcxproj] [D:\AI\Paddle-Lite-2.12\build.lite.x86\extern_
protobuf.vcxproj]
D:\Program Files\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(
241,5): error MSB8066: “D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern
_protobuf-mkdir.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_pr
otobuf-download.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_pr
otobuf-update.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_prot
obuf-patch.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_protobu
f-configure.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_protob
uf-build.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\f80f93ffe1154d7538aed890d912e188\extern_protobuf-
install.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\9b6d8d43a47d7db9d14bb709f559897f\extern_protobuf-c
omplete.rule;D:\AI\Paddle-Lite-2.12\build.lite.x86\CMakeFiles\dd9531fc40ca8a1795f8a662a680d3a2\extern_protobuf.r
ule”的自定义生成已退出,代码为 1。 [D:\AI\Paddle-Lite-2.12\build.lite.x86\extern_protobuf.vcxproj]

109 个警告
3 个错误

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment
instead the file: \protobuf-host\src\google\protobuf\compiler\java\java_file.cc line 68:
bool operator ()(const FieldDescriptor* f1, const FieldDescriptor* f2) {
as
bool operator ()(const FieldDescriptor* f1, const FieldDescriptor* f2) const {

@EaonL EaonL added the untriaged auto added to all issues by default when created. label Oct 29, 2024
@sbenzaquen
Copy link
Contributor

Are you sure this is using the latest build?
The bug it talks about was fixed years ago in 01a05a5
And that file no longer uses std::set, it uses absl::btree_set, which makes the error more suspicious.

@sbenzaquen sbenzaquen added wait for user action and removed untriaged auto added to all issues by default when created. labels Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants