Closed rafaelcaricio closed 3 years ago
Hi @rafaelcaricio ,
I think you're hitting this issue
https://github.com/ccouzens/tesseract-sys/issues/4
which has been reported to rust-bindgen here: https://github.com/rust-lang/rust-bindgen/issues/1948
If I remember correctly the issue comes from the current Mac version of clang being weird.
The solution (if you're happy to use brew
) is to install brew's clang
brew install llvm tesseract leptonica
And then you need to set a couple environment variables before running your build:
PATH="/usr/local/opt/llvm/bin:$PATH" BINDGEN_EXTRA_CLANG_ARGS='-I"/usr/local/Cellar/tesseract/4.1.1/include" -I"/usr/local/Cellar/leptonica/1.80.0/include"' cargo test
Hope that helps,
Chris
@ccouzens It worked for me, thank you! 🙏
I'm trying to use this crate in my project and I get an error from the bindings generation from
tesseract-sys
:This is the version of tesseract I have installed:
Do you have any pointers to what might be happening?