0

I was follow the official install guide CMake Build part met the following error.

/usr/bin/ld: warning: libtiff.so.5, needed by /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9, not found (try using -rpath or -rpath-link)
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libsoxr.so.0: undefined reference to `GOMP_parallel@GOMP_4.0'

tried ldd told in this post

ldd libopencv.so
ldd: ./libopencv.so: No such file or directory

libtiff-dev and libopencv-dev is installed

sudo apt-get install libtiff-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libtiff5-dev' instead of 'libtiff-dev'
libtiff5-dev is already the newest version (4.0.6-1ubuntu0.2).
0 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.

sudo apt-get install libopencv-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libopencv-dev is already the newest version (2.4.9.1+dfsg-1.5ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.

-- OpenCV found (/usr/share/OpenCV)
-- Found Atlas (include: /usr/include library: /usr/lib/libatlas.so lapack: /usr                                                                                                                                                                                                   /lib/liblapack.so
-- NumPy ver. 1.12.1 found (include: /root/anaconda2/lib/python2.7/site-packages                                                                                                                                                                                               /numpy/core/include)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   python
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
--
-- ******************* Caffe Configuration Summary *******************
-- General:
--   Version           :   1.0.0
--   Git               :   1.0-14-g4efdf7e
--   System            :   Linux
--   C++ compiler      :   /usr/bin/c++
--   Release CXX flags :   -O3 -DNDEBUG -fPIC -Wall -Wno-sign-compare -Wno-    unini                                                                                                                                                                                               tialized
--   Debug CXX flags   :   -g -fPIC -Wall -Wno-sign-compare -Wno-uninitialized
--   Build type        :   Release
--
--   BUILD_SHARED_LIBS :   ON
--   BUILD_python      :   ON
--   BUILD_matlab      :   OFF
--   BUILD_docs        :   ON
--   CPU_ONLY          :   OFF
--   USE_OPENCV        :   ON
--   USE_LEVELDB       :   ON
--   USE_LMDB          :   ON
--   USE_NCCL          :   OFF
--   ALLOW_LMDB_NOLOCK :   OFF
--
-- Dependencies:
--   BLAS              :   Yes (Atlas)
--   Boost             :   Yes (ver. 1.58)
--   glog              :   Yes
--   gflags            :   Yes
--   protobuf          :   Yes (ver. 2.6.1)
--   lmdb              :   Yes (ver. 0.9.17)
--   LevelDB           :   Yes (ver. 1.18)
--   Snappy            :   Yes (ver. 1.1.3)
--   OpenCV            :   Yes (ver. 2.4.9.1)
--   CUDA              :   Yes (ver. 8.0)

cmake config info show opencv in /usr/share/ do I need to remove them? I tried to make from opencv source code,but remove the source code later. It's also said CPU-ONLY OFF but I want to use CPU-ONLY and I uncomment CPU_ONLY :=1 in Makefile.config Is that right?

tried make clean and make all in source path met follow error

 warning: libtiff.so.5, needed by /usr/lib/gcc/x86_64-linux-gnu/5/..                                                                                                                                                                                               /../../x86_64-linux-gnu/libopencv_highgui.so, not found (try using -rpath or -rp                                                                                                                                                                                               ath-link)
.build_release/tools/upgrade_solver_proto_text.o: In function `main':
upgrade_solver_proto_text.cpp:(.text.startup+0x214): undefined reference to `std                                                                                                                                                                                               ::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M                                                                                                                                                                                               _create(unsigned long&, unsigned long)'
.build_release/tools/upgrade_solver_proto_text.o: In function `boost::system::sy                                                                                                                                                                                               stem_error::what() const':

find an answertalk about fix libtiff problem.

locate libtiff.so
/root/anaconda2/pkgs/libtiff-4.0.6-3/lib/libtiff.so
/root/anaconda2/pkgs/libtiff-4.0.6-3/lib/libtiff.so.5
/root/anaconda2/pkgs/libtiff-4.0.6-3/lib/libtiff.so.5.2.4
/usr/lib/x86_64-linux-gnu/libtiff.so

ldd libopencv_highgui.so.2.4.9 | grep libtiff
libtiff.so.5 => not found

I have tried to install opencv from source code,so maybe the x86_ path is from the source code lib?How do I fix it?just remove them?

Shihe Zhang
  • 2,641
  • 5
  • 36
  • 57
  • did you install opencv via apt get..can you add your makefile to the question? – Eliethesaiyan Jul 11 '17 at 09:37
  • I installed `libopencv-dev` the message is in the question.you mean Makefile or Makefile.config? – Shihe Zhang Jul 11 '17 at 10:19
  • @Eliethesaiyan the `Makefile` has 699 lines,even `Makefile.config` has 120 lines.Which part do you concern? – Shihe Zhang Jul 12 '17 at 00:55
  • @Zhang this line from your Makefile LIBRARIES += glog gflags protobuf leveldb snappy \ lmdb boost_system hdf5_hl hdf5 m \ opencv_core opencv_highgui opencv_imgproc ,make sure you have all of them installed espacially opencv_highgui that seems in your error – Eliethesaiyan Jul 12 '17 at 01:21
  • Makefile has `LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5`.But I was using cmake,and cmake shows found opencv. I `mkdir build` from source code,and `cmake ..` `make all` get another Makefile in build which doesn't have LIBRARIES.Which one counts? – Shihe Zhang Jul 12 '17 at 01:40
  • install those libraries and add them library lines...use make and let me know how it went..since you arleady edited makefile.config ,the thing is if you are going to need those libraries for a successful build since they are the one failing – Eliethesaiyan Jul 12 '17 at 02:11
  • what do you mean by `add them library lines`?Change the Makefile? – Shihe Zhang Jul 12 '17 at 02:37
  • yes...those related to opencv.,after installing them and use make – Eliethesaiyan Jul 12 '17 at 02:39
  • But `Caffe Configuration Summary` already have all of them – Shihe Zhang Jul 12 '17 at 05:27

0 Answers0