package/tesseract-ocr: needs gcc >= 8

Since Buildroot commit [1] tesseract-ocr fails to build with gcc 7,
with error:

    src/api/baseapi.cpp:67:10: fatal error: filesystem: No such file or directory
     #include <filesystem> // for std::filesystem
              ^~~~~~~~~~~~

In Buildroot, tesseract-ocr has a C++17 requirement captured as
gcc >= 7. Gcc 7 has only a partial and experimental C++17 support,
which was sufficient, prior [1].

The tesseract-ocr upstream commit [2] introduced a usage of
std::filesystem. This commit is included in version 5.5.0,
bumped in [1].

The C++17 with std::filesystem support was introduced in gcc 8.1.
See [3].

This commit fixes the issue by raising the gcc version requirement to
8.x.

Fixes: f32da8b984

[1] f32da8b984
[2] 4e42f9de54
[3] https://gcc.gnu.org/gcc-8/changes.html#libstdcxx

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
Julien Olivain
2025-03-14 22:03:12 +01:00
committed by Arnout Vandecappelle
parent 440e99e579
commit 22ffdea9e6

View File

@@ -1,13 +1,13 @@
comment "tesseract-ocr needs a toolchain w/ threads, C++, gcc >= 7, dynamic library, wchar"
comment "tesseract-ocr needs a toolchain w/ threads, C++, gcc >= 8, dynamic library, wchar"
depends on BR2_USE_MMU
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
!BR2_TOOLCHAIN_GCC_AT_LEAST_8 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
menuconfig BR2_PACKAGE_TESSERACT_OCR
bool "tesseract-ocr"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # C++17 filesystem
depends on BR2_USE_MMU # fork()
depends on !BR2_STATIC_LIBS
depends on BR2_USE_WCHAR