[libcamera-devel] [PATCH 0/2] Fix Android camera HAL compilation on gcc 7 and 8

Jacopo Mondi jacopo at jmondi.org
Wed May 26 09:52:05 CEST 2021


Hi Laurent,
    thanks for addressing this.

On Wed, May 26, 2021 at 03:08:53AM +0300, Laurent Pinchart wrote:
> Hello,
>
> This patch series fixes a compilation breakage of the camera HAL with
> gcc 7 and 8 (technically a link breakage with gcc 8), introduced by
> usage of the file system library.
>
> The first patch is a small refactoring, the second patch includes the
> real fix, details are included there.
>
> The compilation fix is a bit of a hack. If we need to use the file
> system library in more places (and I think we will), we should either
> drop support for gcc 7 completely, or abstract file system operations in
> helper classes. Any opinion ?

I think that's the real question. I had a look around, mostly on the
embedded side of the moon, and I haven't found any big clue that gcc7
is still a requirement. In particular I had a look at toolchains
released by bootlin and linaro, and they ship 9 or 10 for all arch,
except bootlin's one for blackfin which is stuck to 6 or 7.

Buildroot has deprecated gcc versions below 8
I can't really find it out for yocto though :(

True that gcc 7.1 has been released only 4 years ago, and 7.5 has
seen a release in 2019, so it's no ancient at all

For completeness, the linux distro panorama looks quite different
though:

Debian 9 stretch still ships 6.3.0 and has moved to 8.3. in Buster.
Fedora has moved to gcc 8 since release 28
Ubuntu 18.04 ships gcc 7.3.0

The Ubuntu LTS has still 1 year before EOL, Debian 9 is not that
ancient (and requires gcc 6), same for fedora 28.

All in all I feel like it might be a bit early to drop support for gcc 7?

Thanks
   j

>
> Laurent Pinchart (2):
>   android: camera_hal_config: Move include <filesystem> to .cpp file
>   android: Fix file system library usage on gcc 7 and 8
>
>  meson.build                       | 8 ++++++++
>  src/android/camera_hal_config.cpp | 8 ++++++++
>  src/android/camera_hal_config.h   | 1 -
>  3 files changed, 16 insertions(+), 1 deletion(-)
>
> --
> Regards,
>
> Laurent Pinchart
>


More information about the libcamera-devel mailing list