Skip to contentSkip to conversation

package/tesseract-ocr: override neon check

PATCH Applied Fabrice Fontaine 2 participants 2 messages Jan 25, 2022 – Feb 1, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/tesseract-ocr: override neon check

Override neon check to avoid the following build failure with uclibc-ng raised since bump to version 5.0.1 in commit df3f0c226fccd8d6143b09a1e05a0f5f23587136:

src/arch/simddetect.cpp:61:14: fatal error: sys/auxv.h: No such file or directory
61 | # include <sys/auxv.h>

      |              ^~~~~~~~~~~~

It should be noted that a patch to properly fix this build failure was rejected by upstream as "ARM support without NEON would result in a very slow Tesseract": https://github.com/tesseract-ocr/tesseract/pull/3717

So, a follow-up patch adding a dependency on !BR2_TOOLCHAIN_USES_UCLIBC for all CPU architectures or only for ARM without NEON could be approriate.

Fixes:
- http://autobuild.buildroot.org/results/0bac6491188b6681df2ca13eb230706e83cbb130

---
 package/tesseract-ocr/tesseract-ocr.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/tesseract-ocr/tesseract-ocr.mk +6 -0
index 7e23e64136..a7498931fb 100644
@@ -24,6 +24,12 @@ TESSERACT_OCR_CONF_ENV = \
 TESSERACT_OCR_CONF_OPTS = \
 	--disable-opencl
 
+ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
+TESSERACT_OCR_CONF_ENV += ax_cv_check_cxxflags__mfpu_neon=yes
+else
+TESSERACT_OCR_CONF_ENV += ax_cv_check_cxxflags__mfpu_neon=no
+endif
+
 # Language data files download
 ifeq ($(BR2_PACKAGE_TESSERACT_OCR_LANG_ENG),y)
 TESSERACT_OCR_DATA_FILES += eng.traineddata
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 12 lines · Fabrice Fontaine

Override neon check to avoid the following build failure with uclibc-ng raised since bump to version 5.0.1 in commit df3f0c226fccd8d6143b09a1e05a0f5f23587136:

src/arch/simddetect.cpp:61:14: fatal error: sys/auxv.h: No such file or directory

    61 | #    include <sys/auxv.h>
       |              ^~~~~~~~~~~~

It should be noted that a patch to properly fix this build failure was rejected by upstream as "ARM support without NEON would result in a very slow Tesseract": https://github.com/tesseract-ocr/tesseract/pull/3717

Quoted 8 lines

So, a follow-up patch adding a dependency on !BR2_TOOLCHAIN_USES_UCLIBC for all CPU architectures or only for ARM without NEON could be approriate.

Fixes:
- http://autobuild.buildroot.org/results/0bac6491188b6681df2ca13eb230706e83cbb130

Applied to master, thanks.

Regards,
Arnout

Quoted 11 lines
---
  package/tesseract-ocr/tesseract-ocr.mk | 6 ++++++
  1 file changed, 6 insertions(+)
package/tesseract-ocr/tesseract-ocr.mk +0 -0
index 7e23e64136..a7498931fb 100644
@@ -24,6 +24,12 @@ TESSERACT_OCR_CONF_ENV = \
  TESSERACT_OCR_CONF_OPTS = \
  	--disable-opencl

package/tesseract-ocr/tesseract-ocr.mk TESSERACT_OCR_CONF_ENV = \ · line 35

Quoted 10 lines
package/tesseract-ocr/tesseract-ocr.mk +6 -0
 
+ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
+TESSERACT_OCR_CONF_ENV += ax_cv_check_cxxflags__mfpu_neon=yes
+else
+TESSERACT_OCR_CONF_ENV += ax_cv_check_cxxflags__mfpu_neon=no
+endif
+
  # Language data files download
  ifeq ($(BR2_PACKAGE_TESSERACT_OCR_LANG_ENG),y)
  TESSERACT_OCR_DATA_FILES += eng.traineddata

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot