Closed Gvstavo closed 3 years ago
Hi @Gvstavo ,
I suspect the issue is that kMaxCredibleResolution
isn't in your tesseract c headers.
On my fedora laptop, I can see that it's defined here:
grep -r kMaxCredibleResolution /usr/include/tesseract/
/usr/include/tesseract/publictypes.h:constexpr int kMaxCredibleResolution = 2400;
I'll investigate using a debian stretch container
My Debian stretch container with libtesseract-dev didn't have it either.
The constant has been defined for 3 years (since Tesseract 4.0.0).
Debian stretch is using version 3.04.01-5 which was released over 4 years ago.
As far as I know, it isn't practical in rust to conditionally compile based on if other libraries define a value.
Is it possible to compile a more up to date version of Tesseract on your computer?
perhaps we should add a note that we only support 4.0.0 onward. i don't see much value putting work into support a library version that's more than 4 years old :)
Thanks for the help, I try to compile in a machine with Debian 10 and Tesseract 4.0 and it works.
I am getting the same issue on Gentoo Linux even after having tesseract 5.0.1 and leptonica-1.82.0, also I get this output
grep -r kMaxCredibleResolution /usr/include/tesseract/
/usr/include/tesseract/publictypes.h:constexpr int kMaxCredibleResolution = 2400;
. How shall I fix this?
Could you please run this for me and paste the output here?
pkg-config --path tesseract
cat "$(pkg-config --path tesseract)"
Back in December we switched to using pkg-config
to determine the include paths on Linux https://github.com/ccouzens/tesseract-sys/pull/10/
I want to see if your tesseract pkg-config file is much different to mine.
I'm not very familiar with how C header imports work, but in this case I think we need to verify your pkg-config file contains the line includedir=/usr/include
.
I am getting these outputs
Hey @wiredhikari ,
I'm moving this issue here: https://github.com/ccouzens/tesseract-sys/issues/13
tesseract-sys
is used by leptess
. It's where we read in the constant kMaxCredibleResolution
.
I have been tinkering with the versions of tesseract and found that the later version 5.0.0 caused this error while 4.1.1 worked fine.
I have same issue on Windows 10, runs fine on Linux.
I tried to follow this thread, but no result. https://github.com/houqp/leptess/issues/3#issuecomment-578556818
As I understand Leptess cant find Leptonica headers what lies on include\leptonica
I also tried
set LEPTONICA_INCLUDE_PATH=... set LEPTONICA_LINK_PATHS=... set LEPTONICA_LINK_LIBS=leptonica-1.83.0
I'm not use to Windows environment, so I'm sorry if I missed something.
I can't compile
My Cargo.toml
tesseract --version output
Rust version: 1.47.0 (18bf6b4f0 2020-10-07) OS: Debian stretch