package/protobuf-c: bump to version 1.5.0
PATCH 1/1 package/protobuf-c: bump to version 1.5.0
- drops support for proto2
- fixes compatibility with protobuf >= 22.0
- to be compatible with new protobuf versions c++17 is now required when building with protoc (which we do for host) [0]
- require host gcc >= 7 for c++17 support, propagate to depending packets
[0] https://github.com/protobuf-c/protobuf-c/pull/673
--- package/collectd/Config.in | 2 ++ package/criu/Config.in | 1 + package/kismet/Config.in | 1 + package/protobuf-c/Config.in | 5 +++-- package/protobuf-c/protobuf-c.hash | 4 ++-- package/protobuf-c/protobuf-c.mk | 6 +++--- package/riemann-c-client/Config.in | 1 + 7 files changed, 13 insertions(+), 7 deletions(-)
package/collectd/Config.in +2 -0
@@ -738,6 +738,7 @@ config BR2_PACKAGE_COLLECTD_RIEMANN # riemann-c-client -> protobuf-c depends on BR2_INSTALL_LIBSTDCPP depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS + depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c select BR2_PACKAGE_RIEMANN_C_CLIENT select BR2_PACKAGE_LIBTOOL help
@@ -772,6 +773,7 @@ config BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS bool "write_prometheus" depends on BR2_INSTALL_LIBSTDCPP # protobuf-c depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c + depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c select BR2_PACKAGE_LIBMICROHTTPD select BR2_PACKAGE_PROTOBUF_C help
package/criu/Config.in +1 -0
@@ -14,6 +14,7 @@ config BR2_PACKAGE_CRIU_ARCH_SUPPORTS # BE/LE endian issues. depends on BR2_USE_MMU # libcap depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c + depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS
package/kismet/Config.in +1 -0
@@ -11,6 +11,7 @@ config BR2_PACKAGE_KISMET depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_USE_MMU # fork() depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c + depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # C++14 select BR2_PACKAGE_LIBPCAP select BR2_PACKAGE_PROTOBUF_C
package/protobuf-c/Config.in +3 -2
@@ -4,12 +4,13 @@ config BR2_PACKAGE_PROTOBUF_C depends on BR2_TOOLCHAIN_HAS_THREADS # host-protobuf only builds on certain architectures depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS + depends on BR2_HOST_GCC_AT_LEAST_7 # c++17 help Code generator and runtime libraries to use Protocol Buffers from pure C (not C++). https://github.com/protobuf-c/protobuf-c -comment "protobuf-c needs a toolchain w/ C++, threads" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS +comment "protobuf-c needs a toolchain w/ C++, threads and host gcc >= 7" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_HOST_GCC_AT_LEAST_7 depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
package/protobuf-c/protobuf-c.hash +2 -2
@@ -1,3 +1,3 @@ # Locally calculated -sha256 4cc4facd508172f3e0a4d3a8736225d472418aee35b4ad053384b137b220339f protobuf-c-1.4.1.tar.gz -sha256 b8999cb392cc5bbe8cd679de59584ad8d2f26033123e76f1d662fa14b9d4f287 LICENSE +sha256 7b404c63361ed35b3667aec75cc37b54298d56dd2bcf369de3373212cc06fd98 protobuf-c-1.5.0.tar.gz +sha256 ad28bbf89340b86d15aad1ff62c4f4590025d836415307dc66cf0338235cc2f4 LICENSE
package/protobuf-c/protobuf-c.mk +3 -3
@@ -4,7 +4,7 @@ # ################################################################################ -PROTOBUF_C_VERSION = 1.4.1 +PROTOBUF_C_VERSION = 1.5.0 PROTOBUF_C_SITE = https://github.com/protobuf-c/protobuf-c/releases/download/v$(PROTOBUF_C_VERSION) PROTOBUF_C_DEPENDENCIES = host-protobuf-c HOST_PROTOBUF_C_DEPENDENCIES = host-protobuf host-pkgconf
@@ -15,8 +15,8 @@ PROTOBUF_C_LICENSE = BSD-2-Clause PROTOBUF_C_LICENSE_FILES = LICENSE PROTOBUF_C_CPE_ID_VENDOR = protobuf-c_project -# host-protobuf needs c++11 (since 3.6.0) -HOST_PROTOBUF_C_CONF_ENV += CXXFLAGS="$(HOST_CXXFLAGS) -std=c++11" +# when building with protoc c++17 is now required +HOST_PROTOBUF_C_CONF_ENV += CXXFLAGS="$(HOST_CXXFLAGS) -std=c++17" $(eval $(autotools-package)) $(eval $(host-autotools-package))
package/riemann-c-client/Config.in +1 -0
@@ -3,6 +3,7 @@ config BR2_PACKAGE_RIEMANN_C_CLIENT depends on BR2_INSTALL_LIBSTDCPP # protobuf-c depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf-c depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c + depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c select BR2_PACKAGE_PROTOBUF_C help Riemann-c-client is a C client library for the Riemann
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Michael,
Sorry for the delay in looking at your patch, and thanks for your patch. A few questions below.
Quoted 2 lines · On Tue, 28 Nov 2023 12:36:34 +0100 Michael Nosthoff via buildroot…
- drops support for proto2
- fixes compatibility with protobuf >= 22.0
Is this fixing some build issues? We currently don't have protobuf >= 22.0 as far as I can see.
Quoted 3 lines
- to be compatible with new protobuf versions c++17 is now required when building with protoc (which we do for host) [0]
- require host gcc >= 7 for c++17 support, propagate to depending packets
Why does this requirement of gcc >= 7 only applies to the host variant of protobuf-c, not the target variant ?
Quoted 13 lines
package/collectd/Config.in +1
-0@@ -738,6 +738,7 @@ config BR2_PACKAGE_COLLECTD_RIEMANN # riemann-c-client -> protobuf-c depends on BR2_INSTALL_LIBSTDCPP depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS + depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c select BR2_PACKAGE_RIEMANN_C_CLIENT select BR2_PACKAGE_LIBTOOL help
package/collectd/Config.in config BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS · line 779
Quoted 7 lines
package/collectd/Config.in +1
-0@@ -772,6 +773,7 @@ config BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS bool "write_prometheus" depends on BR2_INSTALL_LIBSTDCPP # protobuf-c depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c + depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c select BR2_PACKAGE_LIBMICROHTTPD select BR2_PACKAGE_PROTOBUF_C help
We normally add a comment about Config.in dependencies, but admittedly collectd/Config.in has none of these, so OK for this one.
package/criu/Config.in config BR2_PACKAGE_CRIU_ARCH_SUPPORTS · line 17
Quoted 9 lines
package/criu/Config.in +1
-0@@ -14,6 +14,7 @@ config BR2_PACKAGE_CRIU_ARCH_SUPPORTS # BE/LE endian issues. depends on BR2_USE_MMU # libcap depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c + depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c
This dependency is not an architecture, so it should be on BR2_PACKAGE_CRIU, and the Config.in comment should be updated as well:
comment "criu needs a glibc or musl toolchain w/ threads, gcc >= 8, headers >= 4.18, dynamic library, wchar"
depends on BR2_PACKAGE_CRIU_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || !BR2_TOOLCHAIN_HAS_THREADS \
|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18 \
|| BR2_TOOLCHAIN_USES_UCLIBC \
|| BR2_STATIC_LIBS || !BR2_USE_WCHARThis package uses both the target and host variants of protobuf-c, so the question is whether the target variant needs target gcc >= 7 or not (as stated above).
package/kismet/Config.in config BR2_PACKAGE_KISMET · line 17
Quoted 12 lines
package/kismet/Config.in +1
-0@@ -11,6 +11,7 @@ config BR2_PACKAGE_KISMET depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_USE_MMU # fork() depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c + depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # C++14 select BR2_PACKAGE_LIBPCAP select BR2_PACKAGE_PROTOBUF_C
Need an update of the Config.in comment.
Quoted 8 lines
package/protobuf-c/Config.in +0
-0@@ -4,12 +4,13 @@ config BR2_PACKAGE_PROTOBUF_C depends on BR2_TOOLCHAIN_HAS_THREADS # host-protobuf only builds on certain architectures depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
package/protobuf-c/Config.in config BR2_PACKAGE_PROTOBUF_C · line 14
Quoted 10 lines
package/protobuf-c/Config.in +2
-2+ depends on BR2_HOST_GCC_AT_LEAST_7 # c++17 help Code generator and runtime libraries to use Protocol Buffers from pure C (not C++). https://github.com/protobuf-c/protobuf-c -comment "protobuf-c needs a toolchain w/ C++, threads" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS +comment "protobuf-c needs a toolchain w/ C++, threads and host gcc >= 7"
Instead of "and host gcc >= 7", just ", host gcc >= 7"
package/riemann-c-client/Config.in config BR2_PACKAGE_RIEMANN_C_CLIENT · line 6
Quoted 11 lines
package/protobuf-c/Config.in +1
-0+ depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_HOST_GCC_AT_LEAST_7 depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTSpackage/riemann-c-client/Config.in +1
-0@@ -3,6 +3,7 @@ config BR2_PACKAGE_RIEMANN_C_CLIENT depends on BR2_INSTALL_LIBSTDCPP # protobuf-c depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf-c depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c + depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c
Needs an updated of the Config.in comment.
I was going to fix these myself, but then I wondered about the target/host question above, and I preferred to get back to you on this. Could you clarify this point, and submit a v2 that fixes the Config.in comments?
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas,
Quoted 5 lines · Thomas Petazzoni
Hello Michael,
Sorry for the delay in looking at your patch, and thanks for your patch. A few questions below.
Quoted 8 lines
Quoted 2 lines · On Tue, 28 Nov 2023 12:36:34 +0100 Michael Nosthoff via buildroot…
- drops support for proto2
- fixes compatibility with protobuf >= 22.0Is this fixing some build issues? We currently don't have protobuf >= 22.0 as far as I can see.
nope, we currently don't have build issues because we didn't bump protobuf for quite a while now. Main reason is
- raised dependencies of all the google projects (see [0]).
- some API breakages, so projects have to catch up first
this can also be seen at vckpg [1] where they are also still at protobuf (v3.)21.12 (current is (3.)25.1)
so this bump is just one puzzle piece to be able to bump protobuf and grpc in the future. (you might remember I tried to bump grpc early in 2023 and I stopped because it got complicated)
Quoted 7 lines
Quoted 4 lines
- to be compatible with new protobuf versions c++17 is now required when building with protoc (which we do for host) [0]
- require host gcc >= 7 for c++17 support, propagate to depending packetsWhy does this requirement of gcc >= 7 only applies to the host variant of protobuf-c, not the target variant ?
i tried to express this in the line above. We only need c++17 when we build with the usage of protoc, which is always a host tool and supplied by host-protobuf since we don't support compiling protobuf files on the target.
nevertheless it's still a bit weird, that protobuf-c relies on c++17 while latest protobuf versions only require c++14.
(this is where protobuf-c enforces c++17 support when protoc is enabled: [2])
Quoted 5 lines
I was going to fix these myself, but then I wondered about the target/host question above, and I preferred to get back to you on this. Could you clarify this point, and submit a v2 that fixes the Config.in comments?
i would fix the Config.in remarks and respin. Should I add more clarification somewhere in the Patch with the info supplied above?
Quoted 8 lines
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com
Regards,
Michael
[0] https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
[1] https://github.com/microsoft/vcpkg/issues/34995
[2] https://github.com/protobuf-c/protobuf-c/blob/master/build-cmake/CMakeLists.txt#L145
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot