Segmentation fault with Java-9 and OpenCV 3.3.1

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Segmentation fault with Java-9 and OpenCV 3.3.1

abu abdulla
Hi,

I have installed OpenCV on raspberry with this configuration:

$ cmake -DWITH_QT=OFF \
 -DWITH_GTK=OFF \
 -D CMAKE_BUILD_TYPE=RELEASE \
 -D WITH_OPENCL=OFF \
 -D BUILD_PERF_TESTS=OFF \
 -D BUILD_SHARED_LIBS=OFF \
 -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.3.1/modules \
 -D JAVA_INCLUDE_PATH=$JAVA_HOME/include \
 -D JAVA_AWT_LIBRARY=$JAVA_HOME/lib/libawt.so \
 -D JAVA_JVM_LIBRARY=$JAVA_HOME/lib/server/libjvm.so \
 -D JAVA_AWT_INCLUDE_PATH=$JAVA_HOME/include \
 -D CMAKE_INSTALL_PREFIX=/usr/local ..

I'm using openjdk-9-jdk-headless on raspberry pi 3 (armv8). I got:

Segmentation fault (core dumped)

the Path is set to the correct location (libopencv_java331.so) :
-Djava.library.path=/usr/local/share/OpenCV/java/

the problem occurs at the begining when initiating the library:
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);


any advise on how the troubleshoot this is appreciated.