how to disable NO_SONAME properity when building opencv?

asked 2017-06-03 03:33:41 -0500

Felix.zju gravatar image

updated 2017-06-03 04:13:21 -0500

hi there

i am trying to cross compile OpenCV-3.2.0. The build machine is Ubuntu 16.04 with toolchain provide by TI (which contains arm-linux-gnueabihf-gcc, version 4.9.3, and some usful libraries). The CMake version is 3.5.1

after configuration by cmake-gui, make, and install, i checked the dependencies between the generated opencv modules, and there appears relative path like below.

arm-linux-gnueabihf-objdump -x libopencv_imgproc.so |grep NEED
  NEEDED               ../../lib/libopencv_core.so
  NEEDED               libstdc++.so.6
  NEEDED               libm.so.6
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6
  VERNEED              0x0000b368
  VERNEEDNUM           0x00000003

you can see the relative path "../../lib/" before depending libopencv_core.so.

I figured out that this is because the absense of -soname parameter in the link.txt command file.

and further, i found in the build directory that in the configure file <opencv-3.2.0-build-dir>/OpenCVModules.cmake, there are lots of properities:

IMPORTED_NO_SONAME_DEBUG "TRUE"
(or IMPORTED_NO_SONAME_RELEASE "TRUE")

I think the parameter should be "FALSE".

So the question is, how can i do to make those parameters "FALSE"?

Thanks a lot!!

edit retag flag offensive close merge delete