RaiMan/SikuliX1

TERMINATING: problem with native library: libopencv_java430.dylib

bg-dream48 opened this issue · 2 comments

Hello @RaiMan ,

I am encountering the issue "TERMINATING: problem with native library: libopencv_java430.dylib" when attempting to run SikuliX code within IntelliJ IDEA.
Attaching exact console error below:
Can't load library: /Users/sky/Library/Application Support/Sikulix/SikulixLibs/libopencv_java430.dylib [error] Save your work, correct the problem and restart the IDE! [error] see: https://github.com/RaiMan/SikuliX1/wiki/macOS-Linux:-Support-Libraries-for-OpenCV-4 TERMINATING: problem with native library: libopencv_java430.dylib Exception in thread "main" java.lang.ExceptionInInitializerError at org.sikuli.script.Pattern.<init>(Pattern.java:128) at Main.main(Main.java:12) Caused by: org.sikuli.script.SikuliXception: fatal: problem with native library: libopencv_java430.dylib at org.sikuli.script.support.RunTime.terminate(RunTime.java:1140) at org.sikuli.script.support.RunTime.libsLoad(RunTime.java:1285) at org.sikuli.script.support.RunTime.loadLibrary(RunTime.java:1434) at org.sikuli.script.Finder$Finder2.<clinit>(Finder.java:538)

While the SikuliX IDE works flawlessly for writing and executing tests, I'm facing difficulties when trying to run tests within IntelliJ IDEA. I've diligently followed all the necessary steps outlined in the link you provided (https://github.com/RaiMan/SikuliX1/wiki/macOS-Linux:-Support-Libraries-for-OpenCV-4) to address the issue.

I have already installed OpenCV in my system.

==> opencv: stable 4.8.0 (bottled) Open source computer vision library https://opencv.org/ /opt/homebrew/Cellar/opencv/4.8.0_1 (956 files, 134.5MB) *

Here is my dev environment info:
Mac OS Venture Version 13.4.1
Using Java 11
Added Maven plugin 2.0.5

Can someone help me, please ?

I'm not sure if this has anything to do with the issue you're having, but the readme here says the OpenCV support included is currently on OpenCV version 4.5. You might try using version 4.5 instead of 4.8 and see if that works for you.

Update: My Mac is M2 Pro. I was using 2.0.5 through maven dependecy. I removed this and installed this jar file which is 2.0.6 version through my Intelli J. I saw the issue gone.Hope anyone facing this issue can resolve the problem.

2.0.6 (branch release_2.0.x) preparing for release - snapshots available

Latest Upload: April 17th, 2023

Direct IDE downloads > for Windows < > for macOS Intel < > for macOS Silicon Mx < > for Linux <