tesseract-sys
tesseract-sys copied to clipboard
wrapper_capi.h:1:10: fatal error: 'tesseract/capi.h' file not found
I'm sure that I'm doing something stupid.
Windows 10. (I have tried linux and mac with 0 issues 👍🏽 , but alas, the deployment target for this binary is Windows... 👎🏽 )
>dir env:
Name Value
---- -----
/* snip...*/
GOPATH C:\Users\jer\go
HOMEDRIVE C:
HOMEPATH \Users\jer
INTEL_DEV_REDIST C:\Program Files (x86)\Common Files\Intel\Shared Libraries\
LEPTONICA_INCLUDE_PATH C:\vcpkg\packages\leptonica_x86-windows\include
LEPTONICA_LINK_LIBS C:\vcpkg\packages\leptonica_x86-windows\lib
LEPTONICA_LINK_PATHS C:\vcpkg\packages\leptonica_x86-windows\
LIBCLANG_PATH C:\Program Files\LLVM\lib
/* snip...*/
TESSERACT_INCLUDE_PATHS C:\vcpkg\packages\tesseract_x86-windows\include\tesseract
TESSERACT_LINK_LIBS C:\vcpkg\installed\x86-windows\bin\tesseract41
TESSERACT_LINK_PATHS C:\vcpkg\packages\tesseract\build\lib
Build Output from cargo:
>cargo build
/* snip...*/
error: failed to run custom build command for `tesseract-sys v0.5.12`
Caused by:
process didn't exit successfully: `C:\Users\jer\Documents\GitHub\eldenswing\ocr\target\debug\build\tesseract-sys-e068160e6754890c\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=TESSERACT_INCLUDE_PATHS
cargo:rerun-if-env-changed=TESSERACT_LINK_PATHS
cargo:rerun-if-env-changed=TESSERACT_LINK_LIBS
cargo:rustc-link-search=C:\vcpkg\packages\tesseract\build\lib
cargo:rustc-link-lib=C:\vcpkg\installed\x86-windows\bin\tesseract41
--- stderr
wrapper_capi.h:1:10: fatal error: 'tesseract/capi.h' file not found
wrapper_capi.h:1:10: fatal error: 'tesseract/capi.h' file not found, err: true
thread 'main' panicked at 'Unable to generate capi bindings: ()', C:\Users\jer\.cargo\registry\src\github.com-1ecc6299db9ec823\tesseract-sys-0.5.12\build.rs:97:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: renaming of the library `C` was specified, however this crate contains no `#[link(...)]` attributes referencing this library
error: build failed
Trouble being...

The header does seem to be there....
I ended up using std::process::Command and calling the compiled version of tesseract-ocr... it's dirty but working. Would love to know what was up with this though...
Hey, sorry you couldn't get it working :(
I've tried to replicate on my Windows install, but unfortunately I can't even get as far as you. I think something may be up with my install- I don't use Windows that often.
I am going to transfer this issue to the https://github.com/ccouzens/tesseract-sys because I think the issue is about that.
thanks anyway -- it works PERFECTLY on mac and linux (which is where I usually am). So, thank you for all the hard work on the crate, it's awesome :)