From f0a96f73643fa2f2aff24deaaef17011f4d3e0e6 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 21 Aug 2022 13:23:19 +0200 Subject: [PATCH] package/tesseract-ocr: fix aarch64_be build Fix the following aarch64_be build failure probably raised since the addition of the package: /home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/aarch64_be-none-linux-gnu/10.3.1/../../../../aarch64_be-none-linux-gnu/bin/ld: ./.libs/libtesseract.so: undefined reference to `tesseract::IntSimdMatrix::intSimdMatrixNEON' Fixes: - http://autobuild.buildroot.org/results/b9246a37fcf6be4fabfc491daddadfb09e0a320a Update the comment about _AUTORECONF=YES, list the two patches since both touch configure.ac Signed-off-by: Fabrice Fontaine [yann.morin.1998@free.fr: upsdate comment about _AUTORECONF=YES] Signed-off-by: Yann E. MORIN --- ...configure.ac-fix-build-on-aarch64_be.patch | 32 +++++++++++++++++++ package/tesseract-ocr/tesseract-ocr.mk | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 package/tesseract-ocr/0002-configure.ac-fix-build-on-aarch64_be.patch diff --git a/package/tesseract-ocr/0002-configure.ac-fix-build-on-aarch64_be.patch b/package/tesseract-ocr/0002-configure.ac-fix-build-on-aarch64_be.patch new file mode 100644 index 0000000000..20b8d5ce76 --- /dev/null +++ b/package/tesseract-ocr/0002-configure.ac-fix-build-on-aarch64_be.patch @@ -0,0 +1,32 @@ +From cffb8a36a987cd0d013d73501dd20c553ff69c77 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sun, 21 Aug 2022 10:21:43 +0200 +Subject: [PATCH] configure.ac: fix build on aarch64_be + +Fix the following build failure on aarch64_be: + +/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/aarch64_be-none-linux-gnu/10.3.1/../../../../aarch64_be-none-linux-gnu/bin/ld: ./.libs/libtesseract.so: undefined reference to `tesseract::IntSimdMatrix::intSimdMatrixNEON' + +Fixes: + - http://autobuild.buildroot.org/results/b9246a37fcf6be4fabfc491daddadfb09e0a320a + +Signed-off-by: Fabrice Fontaine +[Retrieved (and backported) from: +https://github.com/tesseract-ocr/tesseract/commit/cffb8a36a987cd0d013d73501dd20c553ff69c77] +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 63579c954f..2b05052395 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -170,7 +170,7 @@ case "${host_cpu}" in + + ;; + +- aarch64) ++ aarch64*) + + # ARMv8 always has NEON and does not need special compiler flags. + AM_CONDITIONAL([HAVE_NEON], true) diff --git a/package/tesseract-ocr/tesseract-ocr.mk b/package/tesseract-ocr/tesseract-ocr.mk index 5e9da0c648..abe3d39ab6 100644 --- a/package/tesseract-ocr/tesseract-ocr.mk +++ b/package/tesseract-ocr/tesseract-ocr.mk @@ -11,6 +11,8 @@ TESSERACT_OCR_LICENSE = Apache-2.0 TESSERACT_OCR_LICENSE_FILES = LICENSE # Source from github, no configure script provided +# 0001-Check-if-platform-supports-feenableexcept.patch +# 0002-configure.ac-fix-build-on-aarch64_be.patch TESSERACT_OCR_AUTORECONF = YES # cairo, pango and icu are optional dependencies, but only needed for