libopencv_java343.so is missing [closed]

asked 2019-01-18 08:43:18 -0600

unix78 gravatar image

updated 2019-01-18 09:04:48 -0600

I try to install OpenCV on RHEL7.4 with these instructions:

mkdir /data/opencv; cd /data/opencv

git clone https://github.com/opencv/opencv.git

cd opencv

git checkout tags/3.4.3

mkdir release; cd release

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..

cd /data/opencv/opencv/release

make

make install

This seems to went succesfull but I don't see libopencv_java343.so anywhere.

(neither in /usr/local/share/OpenCV nor /usr/local/lib , /usr/local/lib64)

[root@ies-dkbench-r74 release]# /usr/local/share/OpenCV/

haarcascades/ lbpcascades/ licenses/

[root@ies-dkbench-r74 release]# /usr/local/lib64/ libopencv_calib3d.so libopencv_dnn.so.3.4.3 libopencv_highgui.so.3.4 libopencv_ml.so libopencv_photo.so.3.4.3 libopencv_superres.so.3.4 libopencv_videostab.so libopencv_calib3d.so.3.4 libopencv_features2d.so libopencv_highgui.so.3.4.3 libopencv_ml.so.3.4 libopencv_shape.so libopencv_superres.so.3.4.3 libopencv_videostab.so.3.4 libopencv_calib3d.so.3.4.3 libopencv_features2d.so.3.4 libopencv_imgcodecs.so libopencv_ml.so.3.4.3 libopencv_shape.so.3.4 libopencv_videoio.so libopencv_videostab.so.3.4.3 libopencv_core.so libopencv_features2d.so.3.4.3 libopencv_imgcodecs.so.3.4 libopencv_objdetect.so libopencv_shape.so.3.4.3 libopencv_videoio.so.3.4 pkgconfig/ libopencv_core.so.3.4 libopencv_flann.so libopencv_imgcodecs.so.3.4.3 libopencv_objdetect.so.3.4 libopencv_stitching.so libopencv_videoio.so.3.4.3
libopencv_core.so.3.4.3 libopencv_flann.so.3.4 libopencv_imgproc.so libopencv_objdetect.so.3.4.3 libopencv_stitching.so.3.4 libopencv_video.so
libopencv_dnn.so libopencv_flann.so.3.4.3 libopencv_imgproc.so.3.4 libopencv_photo.so libopencv_stitching.so.3.4.3 libopencv_video.so.3.4
libopencv_dnn.so.3.4 libopencv_highgui.so libopencv_imgproc.so.3.4.3 libopencv_photo.so.3.4 libopencv_superres.so libopencv_video.so.3.4.3

When it comes to java I have this:

[root@ies-dkbench-r74 release]# which java

/usr/bin/java

[root@ies-dkbench-r74 release]# java -version

openjdk version "1.8.0_161"

OpenJDK Runtime Environment (build 1.8.0_161-b14)

OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

output of "cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .."

  • OpenCV modules:

-- To be built: calib3d core dnn features2d flann highgui imgcodecs imgproc java_bindings_generator ml objdetect photo python2 python_bindings_generator shape stitching superres ts video videoio videostab

-- Disabled: js world

-- Disabled by dependency: -

-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python3 viz

-- Applications: tests perf_tests apps

-- Documentation: NO

-- Non-free algorithms: NO

--

-- GUI:

-- GTK+: YES (ver 3.22.10)

-- GThread : YES (ver 2.50.3)

-- GtkGlExt: NO

-- VTK support: NO

--

-- Parallel framework: pthreads

--

-- Trace: YES (with Intel ITT)

--

-- Other third-party libraries:

-- Intel IPP: 2017.0.3 [2017.0.3]

-- at: /data/opencv/opencv/release/3rdparty/ippicv/ippicv_lnx

-- Intel IPP IW: sources (2017.0.3)

-- at: /data/opencv/opencv/release/3rdparty/ippicv/ippiw_lnx

-- Lapack: NO

-- Eigen: NO

-- Custom HAL: NO

-- Protobuf: build (3.5.1)

--

-- OpenCL: YES (no extra features)

-- Include path: /data/opencv/opencv/3rdparty/include/opencl/1.2

-- Link libraries: Dynamic load

--

-- Python 2:

-- Interpreter: /usr/bin/python2.7 (ver 2.7.5)

-- Libraries: /lib64/libpython2.7.so (ver ... (more)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by berak
close date 2019-01-21 05:14:14.866942

Comments

do you have the apache ant tool and python installed ? (needed to build the java wrappers)

can you show us your cmake output (edit, and append to the question) ? it'll be long, but it usually contains useful hints !

berak gravatar imageberak ( 2019-01-18 08:46:37 -0600 )edit

This seems to went succesfull

yea, not building any wrappers does not count as an error here. again, they were probably disabled from cmake already, because something was missing

berak gravatar imageberak ( 2019-01-18 08:47:36 -0600 )edit
1

I've added output from cmake to my 1st post

unix78 gravatar imageunix78 ( 2019-01-18 08:53:45 -0600 )edit

see:

ant:                         NO

you need to install ant , then re-run cmake.

also take a look at the "Unavailable:" section. as long as java shows up there, it won't build any wrappers (and it's pointless to run make...)

last: if you're MAINLY interested in java binsings, you should use:

 cmake -DBUILD_SHARED_LIBS=OFF

to build a FAT, statically linked opencv_java.so, which no more relies on other opencv so's

berak gravatar imageberak ( 2019-01-18 10:30:47 -0600 )edit
1

Thank you @berak. It helped !!!!

unix78 gravatar imageunix78 ( 2019-01-21 04:56:50 -0600 )edit