nguyenq / tess4j

Java JNA wrapper for Tesseract OCR API
Apache License 2.0
1.58k stars 372 forks source link

Ubuntu 20.04 build error #218

Closed alex73 closed 2 years ago

alex73 commented 2 years ago

Ubuntu 20.04 contains liblept5 1.79.0-1 and libtesseract4 4.1.1

Results :

Failed tests: testTessVersion(net.sourceforge.tess4j.TessAPI1Test) testTessVersion(net.sourceforge.tess4j.TessAPITest)

Tests in error: testTessBaseAPIGetUTF8Text_Pix(net.sourceforge.tess4j.TessAPI1Test): Error looking up function 'boxaSizeConsistency': /lib/x86_64-linux-gnu/liblept.so.5: undefined symbol: boxaSizeConsistency testTessBaseAPIGetComponentImages(net.sourceforge.tess4j.TessAPI1Test): Could not initialize class net.sourceforge.lept4j.Leptonica1 testTessBaseAPIAnalyseLayout(net.sourceforge.tess4j.TessAPI1Test): Could not initialize class net.sourceforge.lept4j.Leptonica1 testTessBaseAPIDetectOrientationScript(net.sourceforge.tess4j.TessAPI1Test): Could not initialize class net.sourceforge.lept4j.Leptonica1 testGetSegmentedRegions(net.sourceforge.tess4j.Tesseract1Test): Could not initialize class net.sourceforge.lept4j.Leptonica1 testCreateDocumentsWithResults1(net.sourceforge.tess4j.Tesseract1Test): Could not initialize class net.sourceforge.lept4j.Leptonica1 testTessBaseAPIGetComponentImages(net.sourceforge.tess4j.TessAPITest): Could not initialize class net.sourceforge.lept4j.Leptonica1 testCreateDocumentsWithResults1(net.sourceforge.tess4j.TesseractTest): Could not initialize class net.sourceforge.lept4j.Leptonica1

Tests run: 79, Failures: 2, Errors: 8, Skipped: 2

nguyenq commented 2 years ago

Make sure you use lept4j version compatible with your Leptonica version.

alex73 commented 2 years ago

Yes, liblept5 1.79.0-1 requires lept4j-1.13.3. My fault - I tried to compile tess4j's master instead tess4j-4 branch.