Message ID | 1434995939-8236-1-git-send-email-george.redivo@datacom.ind.br |
---|---|
State | Changes Requested |
Headers | show |
>>>>> "George" == George Redivo <george.redivo@datacom.ind.br> writes: > * Adds powerpc architecture support > Signed-off-by: George Redivo <george.redivo@datacom.ind.br> I was about to commit this after also updating the architecture dependency of ola (which selects protobuf), but then I did a test build on powerpc (603e, default external toolchain) which failed: libtool: compile: /home/peko/source/buildroot/output/host/usr/bin/powerpc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c google/protobuf/stubs/atomicops_internals_x86_gcc.cc -fPIC -DPIC -o google/protobuf/stubs/.libs/atomicops_internals_x86_gcc.o In file included from google/protobuf/stubs/atomicops_internals_x86_msvc.cc:37:0: ./google/protobuf/stubs/atomicops.h:209:1: error: stray '#' in program In file included from ./google/protobuf/stubs/once.h:81:0, from google/protobuf/stubs/common.cc:34: ./google/protobuf/stubs/atomicops.h:209:1: error: stray '#' in program In file included from ./google/protobuf/stubs/once.h:81:0, from google/protobuf/stubs/once.cc:38: ./google/protobuf/stubs/atomicops.h:209:1: error: stray '#' in program In file included from google/protobuf/stubs/atomicops_internals_x86_gcc.cc:36:0: ./google/protobuf/stubs/atomicops.h:209:1: error: stray '#' in program ./google/protobuf/stubs/atomicops.h:209:1: error: 'error' does not name a type Makefile:2067: recipe for target 'google/protobuf/stubs/atomicops_internals_x86_msvc.lo' failed [snip] package/pkg-generic.mk:156: recipe for target '/home/peko/source/buildroot/output/build/protobuf-v2.6.1/.stamp_built' failed So something seems wrong here. The 'x86' in the file name also looks suspicious. If you want to reproduce, the defconfig is simply: BR2_powerpc=y BR2_powerpc_603e=y BR2_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_OLA=y (put in .config and run make olddefconfig; make) Care to investigate & fix and send an updated patch? Thanks.
George, On Mon, Jun 22, 2015 at 12:58 PM, George Redivo < george.redivo@datacom.ind.br> wrote: > * Adds powerpc architecture support > FYI, there is an old email thread related to a previous attempt at bumping where any compiler older then GCC4.7 has build issues with atomics. http://lists.busybox.net/pipermail/buildroot/2014-October/110418.html There was also some discussion at one of the previous Buildroot developer meetings about the direction suggested for handling this case. I was leaning towards just restricting based on toolchain version..... Thanks,
Hi, Peter. I looked to the ola's Config.in file and there is no powerpc dependency declared in there. So I'm not sure if it's valid to try to make a build to powerpc arch including this package. Is it? Anyway, I tried to reproduce the reported error by adding those flags in my .config file. In addition, I removed BR2_powerpc_8548=y, that was declared. I ran make olddefconfig and the .config changed. The BR2_PACKAGE_OLA flag simply dropped out from the .config file. May you send me your entire .config after running make olddefconfig please? Thanks for your attention. George Redivo DATACOM Ethernet Switches Rua América, 1000 - Eldorado do Sul, RS Ramal: 3444 george.redivo@datacom.ind.br www.datacom.ind.br De: "Matthew Weber" <matthew.weber@rockwellcollins.com> Para: "DATACOM" <george.redivo@datacom.ind.br> Cc: "buildroot" <buildroot@buildroot.org> Enviadas: Segunda-feira, 22 de junho de 2015 18:21:13 Assunto: Re: [Buildroot] [PATCH 1/1] protobuf: bump version to 2.6.1 George, On Mon, Jun 22, 2015 at 12:58 PM, George Redivo < george.redivo@datacom.ind.br > wrote: * Adds powerpc architecture support FYI, there is an old email thread related to a previous attempt at bumping where any compiler older then GCC4.7 has build issues with atomics. http://lists.busybox.net/pipermail/buildroot/2014-October/110418.html There was also some discussion at one of the previous Buildroot developer meetings about the direction suggested for handling this case. I was leaning towards just restricting based on toolchain version..... Thanks,
Dear George Redivo, On Wed, 24 Jun 2015 15:51:54 -0300 (BRT), George Redivo wrote: > I looked to the ola's Config.in file and there is no powerpc dependency declared in there. > So I'm not sure if it's valid to try to make a build to powerpc arch including this package. Is it? I think Peter added || BR2_powerpc in ola/Config.in. The ola package itself does not have any architecture dependency, it only has such dependencies because it selects protobuf. So if protobuf now supports PowerPC, then it should also be possible to build Ola. And anyway, the error reported by Peter occurred during the build of protobuf itself, so Ola is not relevant here. > Anyway, I tried to reproduce the reported error by adding those flags in my .config file. > In addition, I removed BR2_powerpc_8548=y, that was declared. > > I ran make olddefconfig and the .config changed. > The BR2_PACKAGE_OLA flag simply dropped out from the .config file. > > May you send me your entire .config after running make olddefconfig please? Just do: $ cat > .config <<EOF BR2_powerpc=y BR2_powerpc_603e=y BR2_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_OLA=y EOF and then: $ make olddefconfig $ make As explained by Peter. Thanks! Thomas
Hi, Thomas. I could not reproduce this error. I inserted these flags in .config and followed exactly what you sad, but it worked fine. I looked the code and I found 2 interesting things: 1) There is a syntax error in a protobuf's header file. The code that should generate an error message is broke and generates a compilation error itself. 2) Anyway, at this point it has to generate an error (at least it was the intention). This error is trigged by compiler version. It looks that it is exacltly the your problem. So to the problem (1), I fixed the wrong syntax and I've done a pull request on Google Protobuf. I have a patch for this. May I include it in this Buildroot patch? And to the problem (2), maybe the problem is your compiler version. Would you let me know your compiler version? If this problem is really this, I'll try to do the protobuf dependent to GCC version. Thanks George Redivo DATACOM Ethernet Switches Rua América, 1000 - Eldorado do Sul, RS Ramal: 3444 george.redivo@datacom.ind.br www.datacom.ind.br ----- Mensagem original ----- De: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com> Para: "DATACOM" <george.redivo@datacom.ind.br> Cc: "Peter Korsgaard" <jacmet@gmail.com>, "buildroot" <buildroot@buildroot.org> Enviadas: Terça-feira, 30 de junho de 2015 11:48:14 Assunto: Re: [Buildroot] [PATCH 1/1] protobuf: bump version to 2.6.1 Dear George Redivo, On Wed, 24 Jun 2015 15:51:54 -0300 (BRT), George Redivo wrote: > I looked to the ola's Config.in file and there is no powerpc dependency declared in there. > So I'm not sure if it's valid to try to make a build to powerpc arch including this package. Is it? I think Peter added || BR2_powerpc in ola/Config.in. The ola package itself does not have any architecture dependency, it only has such dependencies because it selects protobuf. So if protobuf now supports PowerPC, then it should also be possible to build Ola. And anyway, the error reported by Peter occurred during the build of protobuf itself, so Ola is not relevant here. > Anyway, I tried to reproduce the reported error by adding those flags in my .config file. > In addition, I removed BR2_powerpc_8548=y, that was declared. > > I ran make olddefconfig and the .config changed. > The BR2_PACKAGE_OLA flag simply dropped out from the .config file. > > May you send me your entire .config after running make olddefconfig please? Just do: $ cat > .config <<EOF BR2_powerpc=y BR2_powerpc_603e=y BR2_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_OLA=y EOF and then: $ make olddefconfig $ make As explained by Peter. Thanks! Thomas
diff --git a/package/protobuf/Config.in b/package/protobuf/Config.in index bbb927f..d112d4e 100644 --- a/package/protobuf/Config.in +++ b/package/protobuf/Config.in @@ -3,8 +3,7 @@ config BR2_PACKAGE_PROTOBUF depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS # See src/google/protobuf/stubs/platform_macros.h for supported archs. - # PowerPC doesn't actually work. - depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 || BR2_powerpc # host-protobuf only builds on certain architectures depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" help @@ -15,5 +14,5 @@ config BR2_PACKAGE_PROTOBUF comment "protobuf needs a toolchain w/ C++, threads" depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS - depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 || BR2_powerpc depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk index 0426fce..144e5fb 100644 --- a/package/protobuf/protobuf.mk +++ b/package/protobuf/protobuf.mk @@ -4,7 +4,7 @@ # ################################################################################ -PROTOBUF_VERSION = v2.5.0 +PROTOBUF_VERSION = v2.6.1 PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION)) PROTOBUF_LICENSE = BSD-3c PROTOBUF_LICENSE_FILES = COPYING.txt
* Adds powerpc architecture support Signed-off-by: George Redivo <george.redivo@datacom.ind.br> --- package/protobuf/Config.in | 5 ++--- package/protobuf/protobuf.mk | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-)