Build OpenCV 2.4.5 in Sparc and Java Errors

asked 2014-06-13 07:24:46 -0500

josemgm gravatar image

updated 2014-06-13 07:29:55 -0500

berak gravatar image

Hello,

I've building OpenCV 2.4.5 in Sparc SunOS 5.10. Build is correct with following cmake.

cmake -DLIB_SUFFIX=64 -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_JASPER=OFF -DBUILD_JPEG=ON -DBUILD_OPENEXR=OFF -DBUILD_PNG=ON -DBUILD_TBB=ON -DBUILD_TIFF=ON -DBUILD_ZLIB=ON -DBUILD_FAT_JAVA_LIB=ON -BUILD_NEW_PYTHON_SUPPORT=OFF -DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_1394=OFF -DWITH_FFMPEG=ON -DWITH_GSTREAMER=ON -DWITH_V4L=ON -DWITH_TBB=ON -DWITH_IPP=OFF -DWITH_CUDA=OFF -DWITH_OPENCL=OFF WITH_OPENGL=OFF -DBUILD_SHARED_LIBS=ON -D WITH_QT=OFF -DBUILD_WITH_DEBUG_INFO=OFF ..

pkg-config --modversion opencv command shows 2.4.5

But, when trying to call javacv libraries from java application running under jboss 5.1.0 GA, get the following error.

Caused by java.lang.UnsatisfiedLinKerror: no jniopencv_core in java.library.path

Caused by java.lang.UnsatisfiedLinKerror: /usr/local/lib/libopencv_core.so.2.4.5: ld.so.1: java: fatal: relocation error: file /usr/local/lib/libopencv_core.so.2.4.5: symbol _ZNSs4_Rep20_S_empty_rep_storageE: referenced symbol not found.

How can i solved it?

EDIT: After execute crle command, get the following error.

NoClassDefFoundError: Could not initialize class com.googlecode.javacv.cpp.opencv_highgui

I've got javacv.jar javacpp.jar and javacv-linux-x86_64.jar in my application.ear/lib and works under Windows/Linux

Thanks in advance

Best regards

edit retag flag offensive close merge delete

Comments

Note: With OpenCV 2.4.9, i've got the same error.

Edit: it's a compatibility problem with javacv libs and SunOS?

josemgm gravatar imagejosemgm ( 2014-06-16 10:52:55 -0500 )edit