All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/protobuf: depend on gcc >= 4.5
@ 2017-04-26 16:28 mrugiero at gmail.com
  2017-04-29 12:31 ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: mrugiero at gmail.com @ 2017-04-26 16:28 UTC (permalink / raw)
  To: buildroot

From: "Mario J. Rugiero" <mrugiero@gmail.com>

Protobuf hits a bug in gcc < 4.5 which breaks the build.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=189

Signed-off-by: Mario J. Rugiero <mrugiero@gmail.com>
---
 package/protobuf/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/protobuf/Config.in b/package/protobuf/Config.in
index 03d118cfc..e3c94dcd6 100644
--- a/package/protobuf/Config.in
+++ b/package/protobuf/Config.in
@@ -22,6 +22,7 @@ config BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
 	default y if BR2_x86_64
 	default y if BR2_sparc64
 	default y if BR2_TOOLCHAIN_HAS_ATOMIC
+	depends on BR2_HOST_GCC_AT_LEAST_4_5
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	depends on BR2_USE_MMU # fork()
 
@@ -30,6 +31,7 @@ config BR2_PACKAGE_PROTOBUF
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
 	depends on !BR2_STATIC_LIBS
 	help
 	  Protocol buffers are Google's language-neutral, platform-neutral,
@@ -37,7 +39,7 @@ config BR2_PACKAGE_PROTOBUF
 
 	  https://developers.google.com/protocol-buffers
 
-comment "protobuf needs a toolchain w/ C++, threads, dynamic library"
+comment "protobuf needs a toolchain w/ C++, threads, dynamic library, gcc >= 4.5"
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
-		|| BR2_STATIC_LIBS
+		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
-- 
2.12.2

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

* [Buildroot] [PATCH] package/protobuf: depend on gcc >= 4.5
  2017-04-26 16:28 [Buildroot] [PATCH] package/protobuf: depend on gcc >= 4.5 mrugiero at gmail.com
@ 2017-04-29 12:31 ` Thomas Petazzoni
  2017-04-29 14:54   ` Mario Rugiero
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2017-04-29 12:31 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 26 Apr 2017 13:28:50 -0300, mrugiero at gmail.com wrote:
> From: "Mario J. Rugiero" <mrugiero@gmail.com>
> 
> Protobuf hits a bug in gcc < 4.5 which breaks the build.
> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=189

This bug is marked as FIXED, and it has been fixed since many years.

What is the actual problem you are seeing? Is there a reference to an
autobuilder issue?

I've tried to build with gcc 4.3, and indeed I'm getting:

./google/protobuf/metadata.h: In constructor 'google::protobuf::internal::InternalMetadataWithArena::InternalMetadataWithArena(google::protobuf::Arena*)':
./google/protobuf/metadata.h:175: error: class 'google::protobuf::internal::InternalMetadataWithArena' does not have any field named 'InternalMetadataWithArenaBase'
./google/protobuf/metadata.h: In constructor 'google::protobuf::internal::InternalMetadataWithArenaLite::InternalMetadataWithArenaLite(google::protobuf::Arena*)':
./google/protobuf/metadata.h:204: error: class 'google::protobuf::internal::InternalMetadataWithArenaLite' does not have any field named 'InternalMetadataWithArenaBase'

Is this the issue we're talking about ?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] package/protobuf: depend on gcc >= 4.5
  2017-04-29 12:31 ` Thomas Petazzoni
@ 2017-04-29 14:54   ` Mario Rugiero
  2017-04-29 20:02     ` Mario Rugiero
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Rugiero @ 2017-04-29 14:54 UTC (permalink / raw)
  To: buildroot

2017-04-29 9:31 GMT-03:00 Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>:
> Hello,
>
> On Wed, 26 Apr 2017 13:28:50 -0300, mrugiero at gmail.com wrote:
>> From: "Mario J. Rugiero" <mrugiero@gmail.com>
>>
>> Protobuf hits a bug in gcc < 4.5 which breaks the build.
>> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=189
>
> This bug is marked as FIXED, and it has been fixed since many years.
>
> What is the actual problem you are seeing? Is there a reference to an
> autobuilder issue?
>
> I've tried to build with gcc 4.3, and indeed I'm getting:
>
> ./google/protobuf/metadata.h: In constructor 'google::protobuf::internal::InternalMetadataWithArena::InternalMetadataWithArena(google::protobuf::Arena*)':
> ./google/protobuf/metadata.h:175: error: class 'google::protobuf::internal::InternalMetadataWithArena' does not have any field named 'InternalMetadataWithArenaBase'
> ./google/protobuf/metadata.h: In constructor 'google::protobuf::internal::InternalMetadataWithArenaLite::InternalMetadataWithArenaLite(google::protobuf::Arena*)':
> ./google/protobuf/metadata.h:204: error: class 'google::protobuf::internal::InternalMetadataWithArenaLite' does not have any field named 'InternalMetadataWithArenaBase'
>
> Is this the issue we're talking about ?
Exactly.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* [Buildroot] [PATCH] package/protobuf: depend on gcc >= 4.5
  2017-04-29 14:54   ` Mario Rugiero
@ 2017-04-29 20:02     ` Mario Rugiero
  2017-04-30  7:29       ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Rugiero @ 2017-04-29 20:02 UTC (permalink / raw)
  To: buildroot

I just realized there was more before The question I answered. The bug got
fixed in versi?n 4.5.0 of gcc, thus it is unsupported to build with earlier
versions. The message seen is an instance of this bug.

El abr. 29, 2017 11:54, "Mario Rugiero" <mrugiero@gmail.com> escribi?:

> 2017-04-29 9:31 GMT-03:00 Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com>:
> > Hello,
> >
> > On Wed, 26 Apr 2017 13:28:50 -0300, mrugiero at gmail.com wrote:
> >> From: "Mario J. Rugiero" <mrugiero@gmail.com>
> >>
> >> Protobuf hits a bug in gcc < 4.5 which breaks the build.
> >> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=189
> >
> > This bug is marked as FIXED, and it has been fixed since many years.
> >
> > What is the actual problem you are seeing? Is there a reference to an
> > autobuilder issue?
> >
> > I've tried to build with gcc 4.3, and indeed I'm getting:
> >
> > ./google/protobuf/metadata.h: In constructor
> 'google::protobuf::internal::InternalMetadataWithArena::
> InternalMetadataWithArena(google::protobuf::Arena*)':
> > ./google/protobuf/metadata.h:175: error: class
> 'google::protobuf::internal::InternalMetadataWithArena' does not have any
> field named 'InternalMetadataWithArenaBase'
> > ./google/protobuf/metadata.h: In constructor
> 'google::protobuf::internal::InternalMetadataWithArenaLite::
> InternalMetadataWithArenaLite(google::protobuf::Arena*)':
> > ./google/protobuf/metadata.h:204: error: class
> 'google::protobuf::internal::InternalMetadataWithArenaLite' does not have
> any field named 'InternalMetadataWithArenaBase'
> >
> > Is this the issue we're talking about ?
> Exactly.
> >
> > Thomas
> > --
> > Thomas Petazzoni, CTO, Free Electrons
> > Embedded Linux and Kernel engineering
> > http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170429/e3124482/attachment.html>

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

* [Buildroot] [PATCH] package/protobuf: depend on gcc >= 4.5
  2017-04-29 20:02     ` Mario Rugiero
@ 2017-04-30  7:29       ` Thomas Petazzoni
  2017-05-01  4:57         ` Mario Rugiero
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2017-04-30  7:29 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 29 Apr 2017 17:02:26 -0300, Mario Rugiero wrote:

> I just realized there was more before The question I answered. The bug got
> fixed in versi?n 4.5.0 of gcc, thus it is unsupported to build with earlier
> versions. The message seen is an instance of this bug.

Then we also have a problem with the host variant: host-protobuf also
requires gcc >= 4.5.0. I've restarted my autobuilder, and it uses an
old version of gcc on the host, which causes host-protobuf to fail
building:

  http://autobuild.buildroot.net/results/539/53908fe11b5b6497205e17c151f02e94fab10999/build-end.log

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] package/protobuf: depend on gcc >= 4.5
  2017-04-30  7:29       ` Thomas Petazzoni
@ 2017-05-01  4:57         ` Mario Rugiero
  2017-05-02  1:43           ` Matthew Weber
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Rugiero @ 2017-05-01  4:57 UTC (permalink / raw)
  To: buildroot

2017-04-30 4:29 GMT-03:00 Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>:
> Hello,
>
Hi
> On Sat, 29 Apr 2017 17:02:26 -0300, Mario Rugiero wrote:
>
> Then we also have a problem with the host variant: host-protobuf also
> requires gcc >= 4.5.0. I've restarted my autobuilder, and it uses an
> old version of gcc on the host, which causes host-protobuf to fail
> building:
I'll give it a shot at reproducing locally. Hopefully I can patch the
triggering instances.
If I succeed, I'll commit a different patch to support building on
older versions of gcc,
and will send it upstream, too, so the patches can be dropped in a
following version.
Wish me luck!
>
>   http://autobuild.buildroot.net/results/539/53908fe11b5b6497205e17c151f02e94fab10999/build-end.log
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

Regards,
Mario.

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

* [Buildroot] [PATCH] package/protobuf: depend on gcc >= 4.5
  2017-05-01  4:57         ` Mario Rugiero
@ 2017-05-02  1:43           ` Matthew Weber
  2017-05-02 12:03             ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Matthew Weber @ 2017-05-02  1:43 UTC (permalink / raw)
  To: buildroot

All,

On Sun, Apr 30, 2017 at 11:57 PM, Mario Rugiero <mrugiero@gmail.com> wrote:
>
> 2017-04-30 4:29 GMT-03:00 Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com>:
> > Hello,
> >
> Hi
> > On Sat, 29 Apr 2017 17:02:26 -0300, Mario Rugiero wrote:
> >
> > Then we also have a problem with the host variant: host-protobuf also
> > requires gcc >= 4.5.0. I've restarted my autobuilder, and it uses an
> > old version of gcc on the host, which causes host-protobuf to fail
> > building:
> I'll give it a shot at reproducing locally. Hopefully I can patch the
> triggering instances.
> If I succeed, I'll commit a different patch to support building on
> older versions of gcc,
> and will send it upstream, too, so the patches can be dropped in a
> following version.
> Wish me luck!


Another data point,  This Ubuntu host GCC seems to not have the issue,
so some distros have pulled the fix in.
g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4


Matt

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

* [Buildroot] [PATCH] package/protobuf: depend on gcc >= 4.5
  2017-05-02  1:43           ` Matthew Weber
@ 2017-05-02 12:03             ` Thomas Petazzoni
  2017-05-02 15:04               ` Mario Rugiero
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2017-05-02 12:03 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 1 May 2017 20:43:27 -0500, Matthew Weber wrote:

> > I'll give it a shot at reproducing locally. Hopefully I can patch the
> > triggering instances.
> > If I succeed, I'll commit a different patch to support building on
> > older versions of gcc,
> > and will send it upstream, too, so the patches can be dropped in a
> > following version.
> > Wish me luck!  
> 
> Another data point,  This Ubuntu host GCC seems to not have the issue,
> so some distros have pulled the fix in.
> g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

Well, the problem has been fixed in gcc upstream since 4.5 apparently,
so obviously a 4.8 gcc does not exhibit the issue, and it's not because
of distro-specific patches.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] package/protobuf: depend on gcc >= 4.5
  2017-05-02 12:03             ` Thomas Petazzoni
@ 2017-05-02 15:04               ` Mario Rugiero
  0 siblings, 0 replies; 9+ messages in thread
From: Mario Rugiero @ 2017-05-02 15:04 UTC (permalink / raw)
  To: buildroot

I got gcc 4.3 to build on my Arch box, so I'll try to get it building with it.
I'll probably send the patches to work around this issue by the weekend.

Cheers,
Mario.

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

end of thread, other threads:[~2017-05-02 15:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26 16:28 [Buildroot] [PATCH] package/protobuf: depend on gcc >= 4.5 mrugiero at gmail.com
2017-04-29 12:31 ` Thomas Petazzoni
2017-04-29 14:54   ` Mario Rugiero
2017-04-29 20:02     ` Mario Rugiero
2017-04-30  7:29       ` Thomas Petazzoni
2017-05-01  4:57         ` Mario Rugiero
2017-05-02  1:43           ` Matthew Weber
2017-05-02 12:03             ` Thomas Petazzoni
2017-05-02 15:04               ` Mario Rugiero

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.