[libcamera-devel] Fwd: [autobuild.buildroot.net] Your build results for 2019-06-09

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Jun 12 10:25:10 CEST 2019


Hi Kieran,

On Wed, Jun 12, 2019 at 12:22:18AM +0100, Kieran Bingham wrote:
> On 11/06/2019 14:41, Laurent Pinchart wrote:
> > On Mon, Jun 10, 2019 at 01:44:13PM +0100, Kieran Bingham wrote:
> >> Hi all,
> >>
> >> Interestingly, I received this build failure for libcamera on buildroots
> >> CI systems today.
> >>
> >> Bizarrely it's a failure on x86_64, at a known point that I was tested,
> >> so I'm not sure what happened on their CI systems to cause this failure.
> >>
> >> The build failure is:
> >>
> >>> [10/35] Compiling C++ object 'src/libcamera/4ab8042@@camera at sha/event_dispatcher_poll.cpp.o'.
> >>> FAILED: src/libcamera/4ab8042@@camera at sha/event_dispatcher_poll.cpp.o 
> >>> /home/buildroot/autobuild/run/instance-0/output/host/bin/x86_64-amd-linux-gnu-g++ -Isrc/libcamera/4ab8042@@camera at sha -Isrc/libcamera -I../src/libcamera -Iinclude -I../include -I../src/libcamera/include -I/home/buildroot/autobuild/run/instance-0/output/host/usr/bin/../x86_64-buildroot-linux-gnu/sysroot/usr/include -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++11 -O3 -Wno-unused-parameter -include config.h -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -fPIC -MD -MQ 'src/libcamera/4ab8042@@camera at sha/event_dispatcher_poll.cpp.o' -MF 'src/libcamera/4ab8042@@camera at sha/event_dispatcher_poll.cpp.o.d' -o 'src/libcamera/4ab8042@@camera at sha/event_dispatcher_poll.cpp.o' -c ../src/libcamera/event_dispatcher_poll.cpp
> >>> ../src/libcamera/event_dispatcher_poll.cpp: In member function 'void libcamera::EventDispatcherPoll::processNotifiers(const std::vector<pollfd>&)':
> >>> ../src/libcamera/event_dispatcher_poll.cpp:231:13: error: types may not be defined in a for-range-declaration [-Werror]
> >>>   for (const struct pollfd &pfd : pollfds) {
> >>>              ^~~~~~
> >>> cc1plus: all warnings being treated as errors
> >>
> >> and it is at our libcamera commit: ab0188fc8bbb6f397ac3aa11c9377662b7bd88b0
> > 
> > I've trued reproducing this with gcc-7.4.0 locally, but the above error
> > doesn't show :-S
> > 
> > According to
> > https://stackoverflow.com/questions/39823434/is-this-types-may-not-be-defined-in-a-for-range-declaration-notification-erron
> > it's the struct keyword that confuses gcc, so I think we can just drop
> > it. https://github.com/PowerDNS/pdns/issues/5007 seems to confirm this.
> 
> Yes, thats about the only references I could find too.
> 
> Aha - i can now reproduce this in godbolt...
> 
> 	https://godbolt.org/z/-wLKBk
> 
> The following shows up the issue with -Werror enabled on GCCv6.3
> 
> > #include <vector>
> > #include <poll.h>
> > 
> > void processNotifiers(const std::vector<struct pollfd> &pollfds) {
> >     	for (const struct pollfd &pfd : pollfds) {
> > 
> >         }
> > }
> 
> It occurs on GCC v6.3 for both Arm and x86 at least.
> 
> Would you prefer just removing the struct keyword? or moving to use an auto?

I'd prefer just dropping the struct keyword.

> >> -------- Forwarded Message --------
> >> Subject: [autobuild.buildroot.net] Your build results for 2019-06-09
> >> Date: Mon, 10 Jun 2019 06:00:40 -0000
> >> From: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
> >> To: Kieran Bingham <kieran.bingham at ideasonboard.com>
> >>
> >> Hello,
> >>
> >> This is the list of Buildroot build failures that occured on
> >> 2019-06-09, and for which you are a registered architecture developer
> >> or package developer. Please help us improving the quality of
> >> Buildroot by investigating those build failures and sending patches to
> >> fix them. Thanks!
> >>
> >> Results for the 'master' branch
> >> ===============================
> >>
> >> Build failures related to your packages:
> >>
> >>       x86_64 | libcamera-ab0188fc8bbb6f397... |
> >> http://autobuild.buildroot.net/results/a477fe1617c59f595515361a5718fac3d24231a8
> >>
> >> -- 
> >> http://autobuild.buildroot.net

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list