TERMINATING: problem with native library: libopencv_java430.so reddit / freebsd ---------------------------------------------------------------------- loziomario · 2022-06-27 17:39 Hello. I'm playing a little bit with sikulix. I'm trying to learn how it works because I want to automatize the daily tasks of my FreeBSD 13.1-RELEASE. So,as soon as I have implemented my first "click on the image" function,I've got the error message that you see below and I don't know how to fix it : ​ [error] RunTime:loadLib: libopencv_java430.so (failed) probably dependent libs missing: Can't load library: /root/.Sikulix/SikulixLibs/libopencv_java430.so [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.so [error] script [ click_image ] stopped with error in line 1 [error] java.lang.ExceptionInInitializerError ( java.lang.ExceptionInInitializerError ) [error] --- Traceback --- error source first line: module ( function ) statement 1: main ( ) click("1656348124939.png") [error] --- Traceback ---end -------------- ​ https://preview.redd.it/gxhxukwm97891.jpg?width=1920&format=pjpg&auto= webp&s=a874c25daa7c8950f93ad4604a3b4a571d505647 and yes,I have installed opencv and even more relevant packages on FreeBSD : ​ mario@marietto:/home/marietto # find / -name libopencv_java430.so mario@marietto:/home/marietto # pkg search opencv frei0r-plugins-opencv-1.8.0 Frei0r OpenCV plugins gstreamer1-plugins-opencv-1.16.2_3 GStreamer opencv real time computer vision plugin opencv-4.5.5_7 Open Source Computer Vision library opencvs-20151230 BSD-licensed CVS implementation mario@marietto:/home/marietto # pkg install opencv Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Updating database digests format: 100% New version of pkg detected; it needs to be installed first. The following 1 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: pkg: 1.18.1 -> 1.18.2 Number of packages to be upgraded: 1 The process will require 1 MiB more space. 8 MiB to be downloaded. Proceed with this action? [y/N]: y [1/1] Fetching pkg-1.18.2.pkg: 100% 8 MiB 8.8MB/s 00:01 Checking integrity... done (0 conflicting) [1/1] Upgrading pkg from 1.18.1 to 1.18.2... [1/1] Extracting pkg-1.18.2: 100% Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The most recent versions of packages are already installed mario@marietto:/home/marietto # pkg install opencv Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The most recent versions of packages are already installed mario@marietto:/home/marietto # find / -name libopencv_java430.so mario@marietto:/home/marietto # pkg install gstreamer1-plugins- opencv Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. The following 1 package(s) will be affected (of 0 checked): New packages to be INSTALLED: gstreamer1-plugins-opencv: 1.16.2_3 Number of packages to be installed: 1 88 KiB to be downloaded. Proceed with this action? [y/N]: y [1/1] Fetching gstreamer1-plugins-opencv-1.16.2_3.pkg: 100% 88 KiB 90.0kB/s 00:01 Checking integrity... done (0 conflicting) [1/1] Installing gstreamer1-plugins-opencv-1.16.2_3... [1/1] Extracting gstreamer1-plugins-opencv-1.16.2_3: 100% mario@marietto:/home/marietto # pkg install frei0r-plugins-opencv Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The most recent versions of packages are already installed. ---------------------------------------------------------------------- grahamperrin · 2022-06-27 18:35 `pkg provides libopencv_java430.so` What's reported? (Install [ports-mgmt/pkg-provides](https://www.freshports.org/ports- mgmt/pkg-provides/) and perform the configuration, if you have not already done so.) ---------------------------------------------------------------------- loziomario · 2022-06-27 18:51 mario@marietto:/home/marietto # pkg provides -u Fetching provides database: 100% 15 MiB 15.5MB/s 00:01 Extracting database....success mario@marietto:/home/marietto # pkg provides libopencv_java430.so no output. ---------------------------------------------------------------------- grahamperrin · 2022-06-27 19:04 The package has `JAVA=off`, so build it for yourself with `JAVA=on`. ---------------------------------------------------------------------- loziomario · 2022-06-27 19:35 I've been unlucky : https://pastebin.ubuntu.com/p/NXDkh9fBqq/ ---------------------------------------------------------------------- loziomario · 2022-06-28 19:41 From the compilation has been produced the file called "libopencv_java455.so". It can be found here : mario@marietto:/home/marietto # find / -name libopencv_java455.so /usr/ports/graphics/opencv/work/.build/lib/libopencv_java455.so /usr/ports/graphics/opencv/work/stage/usr/local/share/java/opencv4/lib opencv_java455.so but it's not useful. Infact I did : ln -s libopencv_java455.so /root/.Sikulix/SikulixLibs or : mv libopencv_java455.so libopencv_java430.so ln -s libopencv_java430.so /root/.Sikulix/SikulixLibs but the error is still the same. ---------------------------------------------------------------------- [deleted] · 2022-07-06 08:55 [deleted] ---------------------------------------------------------------------- loziomario · 2022-07-07 22:24 I made some progress. I've tried to run Sikuli from the linuxulator. It is able to start and it doesn't complain about the "libopencv_java430.so missing library,but for the libdl.so.2 library that it can't find. I found this library inside the /usr/lib32 folder of Linux and I copied it into the folder /home/marietto/.Sikulix/SikulixLibs,but the error didn't disappear. Can you give it a try ? What do you suggest I do ? This library should be accepted because it comes from Linux now,not from FreeBSD. I have recorded a video to show you. Do you want to give it a look ? https://drive.google.com/file/d/1_JLiKOFp8l_H4NkOU7GzCC3MRVx20Skb/view ?usp=sharing thanks. ---------------------------------------------------------------------- loziomario · 2022-07-08 17:21 It seems that I've been able to make Sikulix works as I wanted. Someone wants to give a look ? I would like to know if you see some space for improvement. Thanks. https://drive.google.com/file/d/1mmyA7ru3OlOSGYQBnl0YeMY- H9UOQnYV/view?usp=sharing