All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/grpc: needs host gcc >= 4.9
@ 2020-07-26 21:08 Yann E. MORIN
  2020-07-26 22:11 ` ratbert90
  2020-07-27 15:43 ` Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Yann E. MORIN @ 2020-07-26 21:08 UTC (permalink / raw)
  To: buildroot

On some versions of gcc 4.8, like the one packaged in Ubuntu 14.04 (in
extended support until 2022-04). Researching the cause for the bug was
non-conclusive, except for:

     https://github.com/grpc/grpc/issues/19265

which ends with the less than informative "I've settled it."

The trails leads to https://github.com/oudalab/co-incidents/issues/29,
which leads to https://github.com/protocolbuffers/protobuf/issues/5353.

Although the reporter provided a very good initial investigation, with
bisection of grpc *and* protobuf, the report has just lingered untouched
for almost two years now. One of the remaining commits in the protobuf
bisect is this giant hairball:

    https://github.com/protocolbuffers/protobuf/commit/0400cca3236de1ca
    Integrated internal changes from Google
    282 changed files with 15,223 additions and 14,041 deletions.

No surprise the reporter of protobuf!5353 got very frustrated to find
such a monster commit to investigate... :-(

Another lead brings us similar reports, too:

     https://github.com/grpc/grpc/issues/22781

which concludes that "I've already fixed this issue. Can you try it on
1.29.1?"

But we're already usign 1.30.2, and we still have the issue (so maybe
it's a different one...)

So, because the issue manifests itself only on an ancient system, Ubuntu
14.04, with a now ancient gcc 4.8, we just make grpc depend on a host
gcc >= 4.9.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <aduskett@gmail.com>
---
 package/collectd/Config.in | 1 +
 package/grpc/Config.in     | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/package/collectd/Config.in b/package/collectd/Config.in
index 188be3c0fb..77f088e76d 100644
--- a/package/collectd/Config.in
+++ b/package/collectd/Config.in
@@ -565,6 +565,7 @@ config BR2_PACKAGE_COLLECTD_GRAPHITE
 
 config BR2_PACKAGE_COLLECTD_GRPC
 	bool "grpc"
+	depends on BR2_HOST_GCC_AT_LEAST_4_9 # grpc
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC # grpc
 	depends on BR2_INSTALL_LIBSTDCPP # grpc -> protobuf
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # grpc -> protobuf
diff --git a/package/grpc/Config.in b/package/grpc/Config.in
index 45299888ea..8257f7c8a5 100644
--- a/package/grpc/Config.in
+++ b/package/grpc/Config.in
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_GRPC
 	bool "grpc"
+	depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-grpc fails to build on some gcc-4.8 versions
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf
@@ -17,8 +18,9 @@ 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.8, host gcc >= 4.9"
 	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_8 \
+		|| !BR2_HOST_GCC_AT_LEAST_4_9
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package/grpc: needs host gcc >= 4.9
  2020-07-26 21:08 [Buildroot] [PATCH] package/grpc: needs host gcc >= 4.9 Yann E. MORIN
@ 2020-07-26 22:11 ` ratbert90
  2020-07-27 15:42   ` Thomas Petazzoni
  2020-07-27 15:43 ` Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: ratbert90 @ 2020-07-26 22:11 UTC (permalink / raw)
  To: buildroot

Hey Yann;

________________________________
From: Yann E. MORIN <yann.morin.1998@gmail.com> on behalf of Yann E. MORIN <yann.morin.1998@free.fr>
Sent: Sunday, July 26, 2020 14:08
To: buildroot at buildroot.org
Cc: Yann E. MORIN; Adam Duskett
Subject: [PATCH] package/grpc: needs host gcc >= 4.9

On some versions of gcc 4.8, like the one packaged in Ubuntu 14.04 (in
extended support until 2022-04). Researching the cause for the bug was
non-conclusive, except for:

     https://github.com/grpc/grpc/issues/19265

which ends with the less than informative "I've settled it."

The trails leads to https://github.com/oudalab/co-incidents/issues/29,
which leads to https://github.com/protocolbuffers/protobuf/issues/5353.

Although the reporter provided a very good initial investigation, with
bisection of grpc *and* protobuf, the report has just lingered untouched
for almost two years now. One of the remaining commits in the protobuf
bisect is this giant hairball:

    https://github.com/protocolbuffers/protobuf/commit/0400cca3236de1ca
    Integrated internal changes from Google
    282 changed files with 15,223 additions and 14,041 deletions.

No surprise the reporter of protobuf!5353 got very frustrated to find
such a monster commit to investigate... :-(

Another lead brings us similar reports, too:

     https://github.com/grpc/grpc/issues/22781

which concludes that "I've already fixed this issue. Can you try it on
1.29.1?"

But we're already usign 1.30.2, and we still have the issue (so maybe
it's a different one...)

So, because the issue manifests itself only on an ancient system, Ubuntu
14.04, with a now ancient gcc 4.8, we just make grpc depend on a host
gcc >= 4.9.

The problem here is two fold:
1) CentOS7 also comes with gcc4.8 and compiles fine.

2) Ubuntu 14.04 still fails even when using newer GCC versions from a PPA (I tried with gcc 6 and the same error occurred)

So a user could in theory decide to try and install a newer GCC on Ubuntu 14.04 like I did in testing and will still get a bad experience. :(

I?m not sure what the correct answer to this issue is, but I have a hard time accepting this patch is the proper fix due to the above.

Adam


Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <aduskett@gmail.com>
---
 package/collectd/Config.in | 1 +
 package/grpc/Config.in     | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/package/collectd/Config.in b/package/collectd/Config.in
index 188be3c0fb..77f088e76d 100644
--- a/package/collectd/Config.in
+++ b/package/collectd/Config.in
@@ -565,6 +565,7 @@ config BR2_PACKAGE_COLLECTD_GRAPHITE

 config BR2_PACKAGE_COLLECTD_GRPC
         bool "grpc"
+       depends on BR2_HOST_GCC_AT_LEAST_4_9 # grpc
         depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC # grpc
         depends on BR2_INSTALL_LIBSTDCPP # grpc -> protobuf
         depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # grpc -> protobuf
diff --git a/package/grpc/Config.in b/package/grpc/Config.in
index 45299888ea..8257f7c8a5 100644
--- a/package/grpc/Config.in
+++ b/package/grpc/Config.in
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_GRPC
         bool "grpc"
+       depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-grpc fails to build on some gcc-4.8 versions
         depends on BR2_INSTALL_LIBSTDCPP
         depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf
         depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf
@@ -17,8 +18,9 @@ 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.8, host gcc >= 4.9"
         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_8 \
+               || !BR2_HOST_GCC_AT_LEAST_4_9
         depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
--
2.20.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200726/c7f4d03b/attachment.html>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package/grpc: needs host gcc >= 4.9
  2020-07-26 22:11 ` ratbert90
@ 2020-07-27 15:42   ` Thomas Petazzoni
  2020-07-27 15:43     ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2020-07-27 15:42 UTC (permalink / raw)
  To: buildroot

On Sun, 26 Jul 2020 22:11:00 +0000
ratbert90 <aduskett@gmail.com> wrote:

> The problem here is two fold:
> 1) CentOS7 also comes with gcc4.8 and compiles fine.
> 
> 2) Ubuntu 14.04 still fails even when using newer GCC versions from a PPA (I tried with gcc 6 and the same error occurred)

Dammit, I've just seeing this comment now. This e-mail was weirdly
formatted and not recorded on patchwork:

  https://patchwork.ozlabs.org/project/buildroot/patch/20200726210823.20922-1-yann.morin.1998 at free.fr/

In the light of this, I've gone ahead and reverted the patch, as
obviously the problem is not related to the gcc version.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package/grpc: needs host gcc >= 4.9
  2020-07-27 15:42   ` Thomas Petazzoni
@ 2020-07-27 15:43     ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2020-07-27 15:43 UTC (permalink / raw)
  To: buildroot

On Mon, 27 Jul 2020 17:42:21 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> On Sun, 26 Jul 2020 22:11:00 +0000
> ratbert90 <aduskett@gmail.com> wrote:
> 
> > The problem here is two fold:
> > 1) CentOS7 also comes with gcc4.8 and compiles fine.
> > 
> > 2) Ubuntu 14.04 still fails even when using newer GCC versions from a PPA (I tried with gcc 6 and the same error occurred)  
> 
> Dammit, I've just seeing this comment now. This e-mail was weirdly
> formatted and not recorded on patchwork:
> 
>   https://patchwork.ozlabs.org/project/buildroot/patch/20200726210823.20922-1-yann.morin.1998 at free.fr/
> 
> In the light of this, I've gone ahead and reverted the patch, as
> obviously the problem is not related to the gcc version.

Lucky me, someone had pushed to the repo in between, so my "git push"
was rejected, and I was able to discard the patch before it was pushed
the official repo \o/

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] package/grpc: needs host gcc >= 4.9
  2020-07-26 21:08 [Buildroot] [PATCH] package/grpc: needs host gcc >= 4.9 Yann E. MORIN
  2020-07-26 22:11 ` ratbert90
@ 2020-07-27 15:43 ` Thomas Petazzoni
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2020-07-27 15:43 UTC (permalink / raw)
  To: buildroot

On Sun, 26 Jul 2020 23:08:23 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> So, because the issue manifests itself only on an ancient system, Ubuntu
> 14.04, with a now ancient gcc 4.8, we just make grpc depend on a host
> gcc >= 4.9.

According to Adam's comment, depending host gcc >= 4.9 is not the right
thing, unfortunately :-/

>  config BR2_PACKAGE_COLLECTD_GRPC
>  	bool "grpc"
> +	depends on BR2_HOST_GCC_AT_LEAST_4_9 # grpc

You had forgotten to update the Config.in comment with this new
dependency.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-27 15:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-26 21:08 [Buildroot] [PATCH] package/grpc: needs host gcc >= 4.9 Yann E. MORIN
2020-07-26 22:11 ` ratbert90
2020-07-27 15:42   ` Thomas Petazzoni
2020-07-27 15:43     ` Thomas Petazzoni
2020-07-27 15:43 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.