bytedeco / javacpp

The missing bridge between Java and native C++
Other
4.49k stars 583 forks source link

Tesseract does not work after upgrade, library missing(OpenMP?) on classpath #573

Closed qwertyuiopzxcvbnmlkjhgfdsa1 closed 2 years ago

qwertyuiopzxcvbnmlkjhgfdsa1 commented 2 years ago

I think tesseract people changed dependencies. limomp is OpenMP?

Before upgrade to newer version of javaccp tesseract used to work https://mvnrepository.com/artifact/org.bytedeco/tesseract-platform/4.1.1-1.5.5

With newest it does not work https://mvnrepository.com/artifact/org.bytedeco/tesseract-platform/5.0.1-1.5.7

When instantiating new TessBaseAPI()

java.lang.UnsatisfiedLinkError: Could not find jnitesseract in class, module, and library paths.

dlopen failed: library "libomp.so" not found: needed by /data/app/~~uCqSJovQB6S_T_tYL7UFiw==/cz.cleverdata.healthyfood.client-4aaHxppXvaC9SybunTE73g==/lib/arm64/libtesseract.so in namespace classloader-namespace

saudet commented 2 years ago

That should be fixed in the snapshots: http://bytedeco.org/builds/

qwertyuiopzxcvbnmlkjhgfdsa1 commented 2 years ago

After upgrading to 1.5.8-SNAPSHOT this message appears: dlopen failed: library "liblept.so" not found: needed by /data/app/~~QrOQp6tHn7LjrLM_07CpvQ==/cz.cleverdata.healthyfood.client-n8YLN7DJzy-oW8yEpUf-Ig==/lib/arm64/libjnitesseract.so in namespace classloader-namespace

Any thoughts? Thank you

saudet commented 2 years ago

It was renamed to libleptonica.so. You'll need to use Leptonica from the snapshots as well: http://bytedeco.org/builds/

qwertyuiopzxcvbnmlkjhgfdsa1 commented 2 years ago

Problem was in usage of javacpp group: 'org.bytedeco', name: 'tesseract-platform', version: "5.0.1-1.5.8-SNAPSHOT"(tesseract 5.0.1) instead of javacpp group: 'org.bytedeco', name: 'tesseract-platform', version: "5.1.0-1.5.8-SNAPSHOT"

Thanks, closing ticket.