-
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
Which abseil is current protobuf compatible with? #10768
Comments
We have not made a release of protobuf that uses abseil yet. The main branch has a dependency on abseil and can use it. |
Is there a work-around for this? |
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 webruntime $ grep include/absl 94-r59.2/temp/log.do_compile.* | sort -u 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:21: note: ‘std::string_view’ is only available from C++17 onwards 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:26: error: ‘string_view’ in namespace ‘std’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:686:8: error: ‘string_view’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:697:11: error: ‘string_view’ does not name a type * it still builds own version of host absl with or without abseil-cpp-native dependency: 94-r59.2/temp/log.do_compile.1947113:[11550/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp 94-r59.2/temp/log.do_compile.2082512:[11326/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp but at least now it works even with newer absl on host Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 webruntime $ grep include/absl 94-r59.2/temp/log.do_compile.* | sort -u 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:21: note: ‘std::string_view’ is only available from C++17 onwards 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:26: error: ‘string_view’ in namespace ‘std’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:686:8: error: ‘string_view’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:697:11: error: ‘string_view’ does not name a type * it still builds own version of host absl with or without abseil-cpp-native dependency: 94-r59.2/temp/log.do_compile.1947113:[11550/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp 94-r59.2/temp/log.do_compile.2082512:[11326/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp but at least now it works even with newer absl on host Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 webruntime $ grep include/absl 94-r59.2/temp/log.do_compile.* | sort -u 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:21: note: ‘std::string_view’ is only available from C++17 onwards 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:26: error: ‘string_view’ in namespace ‘std’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:686:8: error: ‘string_view’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:697:11: error: ‘string_view’ does not name a type * it still builds own version of host absl with or without abseil-cpp-native dependency: 94-r59.2/temp/log.do_compile.1947113:[11550/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp 94-r59.2/temp/log.do_compile.2082512:[11326/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp but at least now it works even with newer absl on host Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 webruntime $ grep include/absl 94-r59.2/temp/log.do_compile.* | sort -u 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:21: note: ‘std::string_view’ is only available from C++17 onwards 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:26: error: ‘string_view’ in namespace ‘std’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:686:8: error: ‘string_view’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:697:11: error: ‘string_view’ does not name a type * it still builds own version of host absl with or without abseil-cpp-native dependency: 94-r59.2/temp/log.do_compile.1947113:[11550/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp 94-r59.2/temp/log.do_compile.2082512:[11326/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp but at least now it works even with newer absl on host Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 webruntime $ grep include/absl 94-r59.2/temp/log.do_compile.* | sort -u 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:21: note: ‘std::string_view’ is only available from C++17 onwards 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:26: error: ‘string_view’ in namespace ‘std’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:686:8: error: ‘string_view’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:697:11: error: ‘string_view’ does not name a type * it still builds own version of host absl with or without abseil-cpp-native dependency: 94-r59.2/temp/log.do_compile.1947113:[11550/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp 94-r59.2/temp/log.do_compile.2082512:[11326/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp but at least now it works even with newer absl on host Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 webruntime $ grep include/absl 94-r59.2/temp/log.do_compile.* | sort -u 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:21: note: ‘std::string_view’ is only available from C++17 onwards 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:26: error: ‘string_view’ in namespace ‘std’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:686:8: error: ‘string_view’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:697:11: error: ‘string_view’ does not name a type * it still builds own version of host absl with or without abseil-cpp-native dependency: 94-r59.2/temp/log.do_compile.1947113:[11550/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp 94-r59.2/temp/log.do_compile.2082512:[11326/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp but at least now it works even with newer absl on host Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 Signed-off-by: Martin Jansa <[email protected]>
* on gentoo with gcc-13 on host there is one more issue with dev-cpp/abseil-cpp-20230125.2 while older dev-cpp/abseil-cpp-20220623.1 works fine when building host's flatbuffers, similar to: protocolbuffers/protobuf#10768 webruntime $ grep include/absl 94-r59.2/temp/log.do_compile.* | sort -u 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:21: note: ‘std::string_view’ is only available from C++17 onwards 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:52:26: error: ‘string_view’ in namespace ‘std’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:686:8: error: ‘string_view’ does not name a type 94-r59.2/temp/log.do_compile.2082512:/usr/include/absl/strings/string_view.h:697:11: error: ‘string_view’ does not name a type * it still builds own version of host absl with or without abseil-cpp-native dependency: 94-r59.2/temp/log.do_compile.1947113:[11550/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp 94-r59.2/temp/log.do_compile.2082512:[11326/43007] STAMP host/obj/third_party/abseil-cpp/absl.stamp but at least now it works even with newer absl on host Signed-off-by: Martin Jansa <[email protected]>
In the official release v23.2, for protobuf_ABSL_PROVIDER, there are ONLY 2 options:
Which one to choose and build protobuf? It looks to me: no matter it's a module, or it's package, protobuf is ALWAYS based on abseil, isn't it? |
Please define the minimum required abseil version in the |
If abseil build with -std=c++17 (default since GCC 11), then protobuf and python module need build with c++17 too. |
Protobuf is compiled with -std=c++14, so abseil must be as well. Details can be found here: protocolbuffers/protobuf#10768
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment. This issue is labeled |
The documentation still doesn't mention which versions of abseil are supported. |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment. This issue is labeled |
Documentation hasn't been update, e.g.: |
Thanks, Maximilian, for keeping this open. |
Independent of the doc update needs, @jiapei100, the errors that you experienced appear to be that you're building with |
Slight correction. Abseil has not dropped support for C++14. Very likely you are compiling in an interesting mixed configuration. |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment. This issue is labeled |
Still relevant |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment. This issue is labeled |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it. This issue was closed and archived because there has been no new activity in the 14 days since the |
Any news on this one? The documentation still doesn't provide any useful info. |
For this use case, you can take a look at the Documentation: https://bazel.build/external/mod-command Sample command:
|
Thanks for responding! Is there a way to do it with CMake? (our project does not use Bazel) |
Our CMake support is best-effort compared with Bazel, but I suspect you can try the following:
Look for the following line:
There might be a better way to do this. TBH I'm not a CMake expert. |
I tried to build protobuf 21.7 from source, with abseil-cpp 20220623.1, but got the following ERROR messages:
Seems to be a compatibility issue of protobuf and abseil ???
The text was updated successfully, but these errors were encountered: