[libcamera-devel] [PATCH] ipa: raspberrypi: Add functional include to pwl.h
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Thu Jul 28 17:37:43 CEST 2022
Hi Eric,
On Thu, Jul 28, 2022 at 03:37:01PM +0100, Eric Curtin wrote:
> On Thu, 28 Jul 2022 at 14:27, Laurent Pinchart wrote:
> > On Thu, Jul 28, 2022 at 01:01:30PM +0100, Eric Curtin wrote:
> > > Was failing without this include on Fedora 36 compiler toolchain.
> >
> > Could you tell what compiler and compiler version that is ? Could you
> > also please share the error message ?
>
> Fedora 36
>
> gcc --version
> gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)
> Copyright (C) 2022 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> You can see the compiler error here:
>
> https://github.com/ericcurtin/twincam/runs/7558719653
Thank you. I've updated the commit message to
--------
ipa: raspberrypi: Add functional include to pwl.h
The Pwl class uses std::function, defined in <functional>, without
including the header directly. This results in a compilation error with
the Fedora 36 compiler toolchain (gcc 12.1.1):
In file included from ../src/ipa/raspberrypi/controller/rpi/awb.h:14,
from ../src/ipa/raspberrypi/controller/rpi/awb.cpp:14:
../src/ipa/raspberrypi/controller/rpi/../pwl.h:97:18: error: 'std::function' has not been declared
97 | void map(std::function<void(double x, double y)> f) const;
| ^~~
Fix it by including <functional>.
Fixes: c1597f989654 ("ipa: raspberrypi: Use YamlParser to replace dependency on boost")
Signed-off-by: Eric Curtin <ecurtin at redhat.com>
--------
> > > Signed-off-by: Eric Curtin <ecurtin at redhat.com>
> > > ---
> > > src/ipa/raspberrypi/controller/pwl.h | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/src/ipa/raspberrypi/controller/pwl.h b/src/ipa/raspberrypi/controller/pwl.h
> > > index 546482cd..691c4700 100644
> > > --- a/src/ipa/raspberrypi/controller/pwl.h
> > > +++ b/src/ipa/raspberrypi/controller/pwl.h
> > > @@ -7,6 +7,7 @@
> > > #pragma once
> > >
> > > #include <math.h>
> > > +#include <functional>
> >
> > Alphabetical order please. I can fix that when applying, no need to send
> > a v2 just for this.
>
> Sorry I wasn't sure if you liked to split the C and C++ ones, took the
> wrong guess and just sorted the C++ ones
No worries :-)
> > > #include <vector>
> > >
> > > #include "libcamera/internal/yaml_parser.h"
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list