Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if platform supports sys/auxv.h #3717

Closed
wants to merge 1 commit into from
Closed

Check if platform supports sys/auxv.h #3717

wants to merge 1 commit into from

Conversation

ffontaine
Copy link
Contributor

sys/auxv.h is not supported by uclibc

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

sys/auxv.h is not supported by uclibc

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@stweil stweil marked this pull request as draft January 11, 2022 20:12
Copy link
Contributor

@stweil stweil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid that Tesseract will be very slow on 32 bit ARM and uClibc with this patch. Please try to find a solution which allows NEON detection with uClibc.

@stweil stweil marked this pull request as ready for review January 11, 2022 20:18
@stweil
Copy link
Contributor

stweil commented Jan 11, 2022

Ideally uClibc should be fixed to support the missing functionality instead of compiling Tesseract code with restricted functions (this also applies to pull request #3716).

@ffontaine
Copy link
Contributor Author

Unfortunately, uclibc-ng won't be patched any time soon. The project is not very active and dedicated to embedded systems. If you think that this PR doesn't make sense, an other option is to disable tesseract with uclibc on buildroot side.

@stweil
Copy link
Contributor

stweil commented Jan 11, 2022

@egorpugin, please don't merge this PR.

@ffontaine
Copy link
Contributor Author

Would it be acceptable to merge this PR?

It seems that the conclusion of #3716 is that function checks are better than #ifdef blocks.

@stweil
Copy link
Contributor

stweil commented Jan 25, 2022

I see no use for ARM support without NEON because that would result in a very slow Tesseract. Therefore I prefer disabling the Tesseract build for such platforms on the buildroot side as you suggested above.

buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this pull request Feb 1, 2022
Override neon check to avoid the following build failure with uclibc-ng
raised since bump to version 5.0.1 in commit
df3f0c2:

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": tesseract-ocr/tesseract#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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
@amitdo amitdo closed this Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants