Ask Your Question
0

Native binary 'libopencv_java410.so' depends on 'libopenblas.so.0', which cannot be located

asked 2019-04-29 13:19:05 -0600

Jill gravatar image

updated 2019-04-29 13:24:58 -0600

I can successfully build java opencv shared library libopencv_java410.so on linux redhat 7 using the following command:

wget https://github.com/opencv/opencv/arch...
tar -xf 4.1.0.tar.gz
mv opencv-4.1.0 src

install=pwd/release/install
mkdir -p $install
mkdir -p $install/lib

cd src
mkdir build
cd build

../../cmake-3.11.4/cmake/bin/cmake -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_BUILD_TYPE=RELEASE \ -DBUILD_EXAMPLES=OFF \ -DBUILD_TESTS=OFF \ -DBUILD_PERF_TESTS=off \ -DWITH_IPP=OFF \ -DBUILD_PNG=ON \ -DBUILD_JPEG=ON \ -DBUILD_TIFF=ON \ -DBUILD_WEBP=ON ..

make -jnproc

However, when another project tries to use libopencv_java410.so, the following error would be given:
Native binary 'libopencv_java410.so' depends on 'libopenblas.so.0', which cannot be located

I checked the output of cmake, the lines about openblas are:
-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off

I am not using the deep learning features of opencv, so I don't think I need to install openblas. How can I get rid of this error? Thank you very much!

edit retag flag offensive close merge delete

Comments

However, when another project tries to use libopencv_java410.so,

huh, wait, on another machine / os / environment ? your libopencv_java410.so might be non-portable.

you built it on a box where openblas is available (so it's using it), but run it on a box, where it is not so ?

berak gravatar imageberak ( 2019-04-30 03:50:37 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-04-30 12:33:52 -0600

Jill gravatar image

Yes, this is exactly the situation, I have to build it in one environment and distribute the libopencv_java.so to other machines to use it. And the machine I used to build the .so has openblas installed, but the machines which are going to use it doesn't have openblas. I would like to know is it possible to change some flag to prevent cmake from finding openblas, so the .so file built from it would not require libopenblas.so.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-04-29 13:19:05 -0600

Seen: 279 times

Last updated: Apr 29 '19