* [Buildroot] [PATCH 1/3] package/libabseil-cpp: enforce C++11
2020-10-27 17:40 [Buildroot] [PATCH 0/3] fix libabseil-cpp build on older gcc versions buildroot at heine.tech
@ 2020-10-27 17:40 ` buildroot at heine.tech
2020-10-29 22:36 ` Thomas Petazzoni
2020-10-27 17:40 ` [Buildroot] [PATCH 2/3] package/libabseil-cpp: depend on gcc >= 4.9 buildroot at heine.tech
2020-10-27 17:40 ` [Buildroot] [PATCH 3/3] package/grpc: raise (host) gcc dependency to 4.9 buildroot at heine.tech
2 siblings, 1 reply; 13+ messages in thread
From: buildroot at heine.tech @ 2020-10-27 17:40 UTC (permalink / raw)
To: buildroot
From: Michael Nosthoff <buildroot@heine.tech>
For gcc < 6 the c++ default is 98. Abseil needs at least 11
but doesn't enforce this anymore. So we need to do this.
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
package/libabseil-cpp/libabseil-cpp.mk | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/package/libabseil-cpp/libabseil-cpp.mk b/package/libabseil-cpp/libabseil-cpp.mk
index dfcf892f65..8490b6d948 100644
--- a/package/libabseil-cpp/libabseil-cpp.mk
+++ b/package/libabseil-cpp/libabseil-cpp.mk
@@ -20,5 +20,15 @@ HOST_LIBABSEIL_CPP_CONF_OPTS = \
-DABSL_USE_GOOGLETEST_HEAD=OFF \
-DABSL_RUN_TESTS=OFF
+# abseil needs c++ >= 11 but doesn't set this anymore,
+# before gcc6 the default is 98.
+ifeq ($(BR2_GCC_AT_LEAST_6_0),)
+LIBABSEIL_CPP_CONF_OPTS += -DCMAKE_CXX_STANDARD=11
+endif
+
+ifeq ($(BR2_HOST_GCC_AT_LEAST_6_0),)
+HOST_LIBABSEIL_CPP_CONF_OPTS += -DCMAKE_CXX_STANDARD=11
+endif
+
$(eval $(cmake-package))
$(eval $(host-cmake-package))
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 1/3] package/libabseil-cpp: enforce C++11
2020-10-27 17:40 ` [Buildroot] [PATCH 1/3] package/libabseil-cpp: enforce C++11 buildroot at heine.tech
@ 2020-10-29 22:36 ` Thomas Petazzoni
2020-10-30 7:44 ` Michael Nosthoff
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2020-10-29 22:36 UTC (permalink / raw)
To: buildroot
On Tue, 27 Oct 2020 18:40:44 +0100
Michael Nosthoff via buildroot <buildroot@busybox.net> wrote:
> From: Michael Nosthoff <buildroot@heine.tech>
>
> For gcc < 6 the c++ default is 98. Abseil needs@least 11
> but doesn't enforce this anymore. So we need to do this.
>
> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
Is this fixing a build issue? What was the thing that made you write
this patch?
> +# abseil needs c++ >= 11 but doesn't set this anymore,
> +# before gcc6 the default is 98.
> +ifeq ($(BR2_GCC_AT_LEAST_6_0),)
> +LIBABSEIL_CPP_CONF_OPTS += -DCMAKE_CXX_STANDARD=11
> +endif
> +
> +ifeq ($(BR2_HOST_GCC_AT_LEAST_6_0),)
> +HOST_LIBABSEIL_CPP_CONF_OPTS += -DCMAKE_CXX_STANDARD=11
> +endif
Can we do it unconditionally ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 1/3] package/libabseil-cpp: enforce C++11
2020-10-29 22:36 ` Thomas Petazzoni
@ 2020-10-30 7:44 ` Michael Nosthoff
2020-10-30 8:15 ` Thomas Petazzoni
0 siblings, 1 reply; 13+ messages in thread
From: Michael Nosthoff @ 2020-10-30 7:44 UTC (permalink / raw)
To: buildroot
Hi,
On Thursday, October 29, 2020 23:36 CET, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> On Tue, 27 Oct 2020 18:40:44 +0100
> Michael Nosthoff via buildroot <buildroot@busybox.net> wrote:
>
> > From: Michael Nosthoff <buildroot@heine.tech>
> >
> > For gcc < 6 the c++ default is 98. Abseil needs@least 11
> > but doesn't enforce this anymore. So we need to do this.
> >
> > Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
>
> Is this fixing a build issue? What was the thing that made you write
> this patch?
>
I had the links to the broken autobuilders in the Cover letter. Should I put them in the commit instead?
> > +# abseil needs c++ >= 11 but doesn't set this anymore,
> > +# before gcc6 the default is 98.
> > +ifeq ($(BR2_GCC_AT_LEAST_6_0),)
> > +LIBABSEIL_CPP_CONF_OPTS += -DCMAKE_CXX_STANDARD=11
> > +endif
> > +
> > +ifeq ($(BR2_HOST_GCC_AT_LEAST_6_0),)
> > +HOST_LIBABSEIL_CPP_CONF_OPTS += -DCMAKE_CXX_STANDARD=11
> > +endif
>
> Can we do it unconditionally ?
Sure, that was the fallback before (In the CMakeLists). And grpc also just sets C++11 as fallback.
I just thought that, as abseil is all about "bringing newer C++ features to older C++ versions", it would make sense to build it with C++14/17 when it's the compilers default.
But as grpc is also built with "only" C++11 this might not be the best idea in the first place.
Regards,
Michael
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 1/3] package/libabseil-cpp: enforce C++11
2020-10-30 7:44 ` Michael Nosthoff
@ 2020-10-30 8:15 ` Thomas Petazzoni
2020-10-30 8:47 ` Michael Nosthoff
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2020-10-30 8:15 UTC (permalink / raw)
To: buildroot
On Fri, 30 Oct 2020 08:44:06 +0100
"Michael Nosthoff" <buildroot@heine.tech> wrote:
> > Is this fixing a build issue? What was the thing that made you write
> > this patch?
>
> I had the links to the broken autobuilders in the Cover letter. Should I put them in the commit instead?
Sorry, I had missed the cover letters, since I'm mainly looking at
patches through patchwork. And yes, the link to the autobuilder failure
should be in the commit log, like this:
Fixes:
http://autobuild.buildroot.org/...
> > > +# abseil needs c++ >= 11 but doesn't set this anymore,
> > > +# before gcc6 the default is 98.
> > > +ifeq ($(BR2_GCC_AT_LEAST_6_0),)
> > > +LIBABSEIL_CPP_CONF_OPTS += -DCMAKE_CXX_STANDARD=11
> > > +endif
> > > +
> > > +ifeq ($(BR2_HOST_GCC_AT_LEAST_6_0),)
> > > +HOST_LIBABSEIL_CPP_CONF_OPTS += -DCMAKE_CXX_STANDARD=11
> > > +endif
> >
> > Can we do it unconditionally ?
>
> Sure, that was the fallback before (In the CMakeLists). And grpc also just sets C++11 as fallback.
>
> I just thought that, as abseil is all about "bringing newer C++
> features to older C++ versions", it would make sense to build it with
> C++14/17 when it's the compilers default. But as grpc is also built
> with "only" C++11 this might not be the best idea in the first place.
In fact, let's turn this around: if abseil uses C++11 features, then it
should by itself pass -std=c++11 to the compiler, by setting the
appropriate CXX_STANDARD in its CMakeLists.txt. There is no reason
Buildroot should have to help here. So isn't an abseil CMakeLists.txt
fix (submitted upstream) more appropriate here ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 2/3] package/libabseil-cpp: depend on gcc >= 4.9
2020-10-27 17:40 [Buildroot] [PATCH 0/3] fix libabseil-cpp build on older gcc versions buildroot at heine.tech
2020-10-27 17:40 ` [Buildroot] [PATCH 1/3] package/libabseil-cpp: enforce C++11 buildroot at heine.tech
@ 2020-10-27 17:40 ` buildroot at heine.tech
2020-10-29 22:36 ` Thomas Petazzoni
2020-10-27 17:40 ` [Buildroot] [PATCH 3/3] package/grpc: raise (host) gcc dependency to 4.9 buildroot at heine.tech
2 siblings, 1 reply; 13+ messages in thread
From: buildroot at heine.tech @ 2020-10-27 17:40 UTC (permalink / raw)
To: buildroot
From: Michael Nosthoff <buildroot@heine.tech>
abseil depends on gcc >= 4.9
https://abseil.io/docs/cpp/platforms/platforms#linux
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
package/libabseil-cpp/Config.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/package/libabseil-cpp/Config.in b/package/libabseil-cpp/Config.in
index 8018e7b264..222e3a092a 100644
--- a/package/libabseil-cpp/Config.in
+++ b/package/libabseil-cpp/Config.in
@@ -14,6 +14,7 @@ config BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
config BR2_PACKAGE_LIBABSEIL_CPP
bool "libabseil-cpp"
depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_STATIC_LIBS # uses dlfcn.h
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
@@ -26,7 +27,7 @@ config BR2_PACKAGE_LIBABSEIL_CPP
https://github.com/abseil/abseil-cpp
-comment "libabseil-cpp needs a toolchain w/ C++, threads, dynamic library"
+comment "libabseil-cpp needs a toolchain w/ gcc >= 4.9, C++, threads, dynamic library"
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
- BR2_STATIC_LIBS
+ BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 2/3] package/libabseil-cpp: depend on gcc >= 4.9
2020-10-27 17:40 ` [Buildroot] [PATCH 2/3] package/libabseil-cpp: depend on gcc >= 4.9 buildroot at heine.tech
@ 2020-10-29 22:36 ` Thomas Petazzoni
2020-10-30 7:48 ` Michael Nosthoff
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2020-10-29 22:36 UTC (permalink / raw)
To: buildroot
On Tue, 27 Oct 2020 18:40:45 +0100
Michael Nosthoff via buildroot <buildroot@busybox.net> wrote:
> From: Michael Nosthoff <buildroot@heine.tech>
>
> abseil depends on gcc >= 4.9
>
> https://abseil.io/docs/cpp/platforms/platforms#linux
>
> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
Is this fixing a build issue ? If so, is this issue reported in the
autobuilders ? If it's not fixing a build issue, what is the
reason/intention behind this change ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 2/3] package/libabseil-cpp: depend on gcc >= 4.9
2020-10-29 22:36 ` Thomas Petazzoni
@ 2020-10-30 7:48 ` Michael Nosthoff
2020-10-30 8:16 ` Thomas Petazzoni
0 siblings, 1 reply; 13+ messages in thread
From: Michael Nosthoff @ 2020-10-30 7:48 UTC (permalink / raw)
To: buildroot
Hi,
On Thursday, October 29, 2020 23:36 CET, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
>
> Is this fixing a build issue ? If so, is this issue reported in the
> autobuilders ? If it's not fixing a build issue, what is the
> reason/intention behind this change ?
>
The build with 4.8 still fails after applying the first patch of this series. As this is shadowed by the C++11 error it doesn't turn up in the autobuilders.
Should I just include a build error output into the commit?
Regards,
Michael
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 2/3] package/libabseil-cpp: depend on gcc >= 4.9
2020-10-30 7:48 ` Michael Nosthoff
@ 2020-10-30 8:16 ` Thomas Petazzoni
0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2020-10-30 8:16 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 30 Oct 2020 08:48:17 +0100
"Michael Nosthoff" <buildroot@heine.tech> wrote:
> The build with 4.8 still fails after applying the first patch of this
> series. As this is shadowed by the C++11 error it doesn't turn up in
> the autobuilders. Should I just include a build error output into the
> commit?
Yes, and you can explained that this was shadowed by the C++11 failure,
and therefore there are no recorded autobuilder failures.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 3/3] package/grpc: raise (host) gcc dependency to 4.9
2020-10-27 17:40 [Buildroot] [PATCH 0/3] fix libabseil-cpp build on older gcc versions buildroot at heine.tech
2020-10-27 17:40 ` [Buildroot] [PATCH 1/3] package/libabseil-cpp: enforce C++11 buildroot at heine.tech
2020-10-27 17:40 ` [Buildroot] [PATCH 2/3] package/libabseil-cpp: depend on gcc >= 4.9 buildroot at heine.tech
@ 2020-10-27 17:40 ` buildroot at heine.tech
2020-10-29 22:37 ` Thomas Petazzoni
2 siblings, 1 reply; 13+ messages in thread
From: buildroot at heine.tech @ 2020-10-27 17:40 UTC (permalink / raw)
To: buildroot
From: Michael Nosthoff <buildroot@heine.tech>
(host-)libabseil-cpp depends on gcc >= 4.9
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
package/grpc/Config.in | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/package/grpc/Config.in b/package/grpc/Config.in
index 0270b38c35..6151f4b3d1 100644
--- a/package/grpc/Config.in
+++ b/package/grpc/Config.in
@@ -3,7 +3,8 @@ config BR2_PACKAGE_GRPC
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf, re2
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf
- depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf, re2
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # protobuf, re2, libabseil-cpp
+ depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-libabseil-cpp
depends on !BR2_STATIC_LIBS # protobuf, libabseil-cpp
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
@@ -19,9 +20,10 @@ config BR2_PACKAGE_GRPC
http://github.com/grpc/grpc
-comment "grpc needs a toolchain w/ C++, threads, dynamic library, gcc >= 4.8"
+comment "grpc needs a toolchain w/ C++, threads, dynamic library, gcc >= 4.9"
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
- || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+ || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \
+ || !BR2_HOST_GCC_AT_LEAST_4_9
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread