Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 10.15 - Java 14: Tess4J: JNA load library libtesseract.dylib fails #350

Closed
RaiMan opened this issue May 15, 2020 · 6 comments
Closed
Assignees
Labels
bug Something isn't working fixed the problem has been fixed
Milestone

Comments

@RaiMan
Copy link
Owner

RaiMan commented May 15, 2020

com.sun.jna.NativeLibrary.loadLibrary("tesseract", ...)

gives:
java.lang.UnsatisfiedLinkError: dlopen(libtesseract.dylib, 9): image not found

works up to Java 13

@RaiMan RaiMan self-assigned this May 15, 2020
@RaiMan RaiMan added the bug Something isn't working label May 15, 2020
@RaiMan RaiMan added this to the 2.0.5 milestone May 15, 2020
@dtopuzov
Copy link

dtopuzov commented Jul 13, 2020

I hit the same error with Java11 too.

The first answer here helped me solve the problem:
https://stackoverflow.com/questions/21394537/tess4j-unsatisfied-link-error-on-mac-os-x

Not sure what cause the issue, it might be the update, it might be tess4j.
I think I hit the issue when I cleaned up ~/.gradle folder and then all Gradle packages were downloaded again.

@RaiMan
Copy link
Owner Author

RaiMan commented Aug 25, 2020

It is a Tess4J problem using the JNA java library to load the native tesseract library.

In SikuliX 2.0.5 this will be fixed by setting/adding /usr/local/lib to the system property jna.library.path.
Hence libtesseract.dylib/libtesseract.so must be in that folder on Mac/Linux.

Commit: 49f1bf3

@RaiMan RaiMan added the fixed the problem has been fixed label Aug 25, 2020
@RaiMan RaiMan closed this as completed Aug 30, 2020
@ndinev
Copy link

ndinev commented Jan 26, 2021

When we can expect 2.0.5 to be available for download since this problem for MAC is annoying

@RaiMan
Copy link
Owner Author

RaiMan commented Jan 28, 2021

Sorry for the delay. Other very private priorities currently.

You have to wait until later in February.

@plaurent
Copy link

On OS X, I'm running 2.0.5 and have libtesseract installed via brew and symlinked in /usr/local/lib, but am still getting the following error:

[error] Native library (darwin/libtesseract.dylib) not found in resource path (/Users/patryk/Desktop/Core/SikuliX/sikulixide-2.0.5.jar ( ikulixide-2.0.5.jar) )

Any suggestions?

@RaiMan
Copy link
Owner Author

RaiMan commented Nov 20, 2022

I have macOS 12.4 (on Intel) with Tesseract 4.1.1 (installed using homebrew).
2.0.5 works as expected with Java 17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed the problem has been fixed
Projects
None yet
Development

No branches or pull requests

4 participants