-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
[v30.0-rc2 regression] src/google/protobuf/compiler/java/context.h
causes compile error C2079 in MSVC with /std:c++20
and /Zc:__cplusplus
#20331
Comments
@sbenzaquen I think using forward declaration should be fine right? Is there something we can do here? |
No, we should not use incomplete types in the container. |
Due to the build failure on Windows that happens when using protobuf with abseil 20250127.0 [1], we cannot yet update abseil. This commit updates the bzlmod depencencies as follows. abseil: 20240722.0.bcr.2 re2: 2024-07-02.bcr.1 googletest: 1.15.2 [1]: protocolbuffers/protobuf#20331
Due to the build failure on Windows that happens when using protobuf with abseil 20250127.0 [1], we cannot yet update abseil. This commit updates the bzlmod depencencies as follows. abseil: 20240722.0.bcr.2 re2: 2024-07-02.bcr.1 protobuf: 29.3 googletest: 1.15.2 [1]: protocolbuffers/protobuf#20331
Due to the build failure on Windows that happens when using protobuf with abseil 20250127.0 [1], we cannot yet update abseil. This commit updates the bzlmod depencencies as follows. abseil: 20240722.0.bcr.2 re2: 2024-07-02.bcr.1 protobuf: 29.3 googletest: 1.15.2 [1]: protocolbuffers/protobuf#20331
* To fix build failures on Windows with Bazel. + protocolbuffers/protobuf#20331 * abseil-cpp: 20240722.0.bcr.2 * re2: 2024-07-02.bcr.1 * protobuf: 29.3 * googletest: 1.15.2 PiperOrigin-RevId: 729343696
With this commit we start using 'clang-cl' to build Mozc for Windows with Bazel. While the original motivation of switching to 'clang-cl' is that protobuf is planning to stop supporting cl.exe with bazel build in protobuf v34 [1], but there is also an on-going build breakage that happens when combining protobuf and abseil-cpp 20250127.0, which is not yet fixed [2]. The latter one is more critical for us because more and more bzlmod dependencies start requiring abseil-cpp 20250127.0 or higher. There must be no impact on Windows GYP build. Closes google#1179. [1]: protocolbuffers/protobuf#20085 [2]: protocolbuffers/protobuf#20331
With this commit we start using 'clang-cl' to build Mozc for Windows with Bazel. While the original motivation of switching to 'clang-cl' is that protobuf is planning to stop supporting cl.exe with bazel build in protobuf v34 [1], but there is also an on-going build breakage that happens when combining protobuf and abseil-cpp 20250127.0, which is not yet fixed [2]. The latter one is more critical for us because more and more bzlmod dependencies start requiring abseil-cpp 20250127.0 or higher. There must be no impact on Windows GYP build. Closes google#1179. [1]: protocolbuffers/protobuf#20085 [2]: protocolbuffers/protobuf#20331
With this commit we start using 'clang-cl' to build Mozc for Windows with Bazel. While the original motivation of switching to 'clang-cl' is that protobuf is planning to stop supporting cl.exe with bazel build in protobuf v34 [1], but there is also an on-going build breakage that happens when combining protobuf and abseil-cpp 20250127.0, which is not yet fixed [2]. The latter one is more critical for us because more and more bzlmod dependencies start requiring abseil-cpp 20250127.0 or higher. There must be no impact on Windows GYP build. Closes google#1179. [1]: protocolbuffers/protobuf#20085 [2]: protocolbuffers/protobuf#20331
src/google/protobuf/compiler/java/context.h
causes compile error C2079 in MSVC with /std:c++20
and /Zc:__cplusplus
src/google/protobuf/compiler/java/context.h
causes compile error C2079 in MSVC with /std:c++20
and /Zc:__cplusplus
Updating the title to make it clear that this is now obvious in v30.0-rc2, which starts requiring abseil-cpp 20250127.0. |
What version of protobuf and what language are you using?
Version: 40ec76e
Language: C++
What operating system (Linux, Windows, ...) and version?
Windows 11 24H2
What runtime / compiler are you using (e.g., python version or gcc version)
Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34438 for x64
What did you do?
Steps to reproduce the behavior:
What did you expect to see
The build succeeds.
What did you see instead?
Anything else we should know about your project / environment
Here is the relevant error message.
Here are the lines in question.
protobuf/src/google/protobuf/compiler/java/context.h
Lines 39 to 40 in 40ec76e
protobuf/src/google/protobuf/compiler/java/context.h
Lines 80 to 83 in 40ec76e
src/google/protobuf/compiler/java/context.h
looks to be trying to pass a forward declared type to the second type parameter ofabsl::flat_hash_map
, which I'm not quite sure if it's really supported or not.Other observations
/Zc:__cplusplus
compiler option.The text was updated successfully, but these errors were encountered: