frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Caffe build error

Hello,

I am trying to install latest MvNC_Toolkit-1.07.10.tgz on my Ubuntu 16.04 laptop. I already had Python (Anaconda) and OpenCV installed. I run setup.sh and get a linking error while building Caffe.

What do you think is the problem?

[ 77%] Building CXX object tools/CMakeFiles/caffe.bin.dir/caffe.cpp.o
[ 77%] Linking CXX executable caffe
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFReadDirectory@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyClass_Type'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyString_FromString'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyFile_AsFile'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyString_Size'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFWriteEncodedStrip@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyString_FromStringAndSize'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFIsTiled@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'Py_InitModule4_64'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFOpen@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyString_InternFromString'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyInt_Type'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyInt_FromLong'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyUnicodeUCS4_AsWideChar'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyInt_AsLong'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyFile_FromString'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFReadEncodedStrip@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFSetField@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFWriteScanline@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyNumber_Divide'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFGetField@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFScanlineSize@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFNumberOfStrips@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyString_Type'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFSetWarningHandler@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyString_AsString'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFSetErrorHandler@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFReadEncodedTile@LIBTIFF_4.0'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFReadRGBATile@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyString_FromFormat'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFClose@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyUnicodeUCS4_FromEncodedObject'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFRGBAImageOK@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to 'PyNumber_InPlaceDivide'
/usr/local/lib/libopencv_imgcodecs.so.3.3.0: undefined reference to 'TIFFReadRGBAStrip@LIBTIFF_4.0'
collect2: error: ld returned 1 exit status
tools/CMakeFiles/caffe.bin.dir/build.make:131: recipe for target 'tools/caffe' failed
make[2]: *** [tools/caffe] Error 1
CMakeFiles/Makefile2:505: recipe for target 'tools/CMakeFiles/caffe.bin.dir/all' failed
make[1]: *** [tools/CMakeFiles/caffe.bin.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Installation failed. Error on line 129

Comments

  • 6 Comments sorted by Votes Date Added
  • edited September 2017 Vote Up0Vote Down

    here is the beginning of the output. Since it's too big I can't post at once.

    Downloading Caffe...
    Cloning into 'caffe'...
    Compiling Caffe...
    Switched to a new branch 'fathom_branch'
    -- The C compiler identification is GNU 5.4.0
    -- The CXX compiler identification is GNU 5.4.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Looking for pthread.h
    -- Looking for pthread.h - found
    -- Looking for pthread_create
    -- Looking for pthread_create - not found
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - found
    -- Found Threads: TRUE  
    -- Boost version: 1.58.0
    -- Found the following Boost libraries:
    --   system
    --   thread
    --   filesystem
    --   chrono
    --   date_time
    --   atomic
    -- Found GFlags: /usr/include  
    -- Found gflags  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
    -- Found Glog: /usr/include  
    -- Found glog    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
    -- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so  
    -- Found PROTOBUF Compiler: /usr/bin/protoc
    -- Found HDF5: /home/mstf/anaconda3/lib/libhdf5_hl.so;/home/mstf/anaconda3/lib/libhdf5.so;/home/mstf/anaconda3/lib/libhdf5_hl.so;/home/mstf/anaconda3/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/home/mstf/anaconda3/lib/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.8.17") 
    -- Found LMDB: /usr/include  
    -- Found lmdb    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/liblmdb.so)
    -- Found LevelDB: /usr/include  
    -- Found LevelDB (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libleveldb.so)
    -- Found Snappy: /usr/include  
    -- Found Snappy  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libsnappy.so)
    -- -- CUDA is disabled. Building without it...
    -- OpenCV found (/usr/local/share/OpenCV)
    -- Found Atlas: /usr/include  
    -- Found Atlas (include: /usr/include library: /usr/lib/libatlas.so lapack: /usr/lib/liblapack.so
    -- Found PythonInterp: /home/mstf/anaconda3/bin/python3 (found suitable version "3.6", minimum required is "3.0") 
    -- Found PythonLibs: /home/mstf/anaconda3/lib/libpython3.6m.so (found suitable version "3.6.0", minimum required is "3.0") 
    -- Found NumPy: /home/mstf/anaconda3/lib/python3.6/site-packages/numpy/core/include (found suitable version "1.11.3", minimum required is "1.7.1") 
    -- NumPy ver. 1.11.3 found (include: /home/mstf/anaconda3/lib/python3.6/site-packages/numpy/core/include)
    -- Could NOT find Boost
    -- Could NOT find Boost
    -- Could NOT find Boost
    -- Boost version: 1.58.0
    -- Found the following Boost libraries:
    --   python
    -- Found Doxygen: /usr/bin/doxygen (found version "1.8.11") 
    -- Detected Doxygen OUTPUT_DIRECTORY: ./doxygen/
    -- Found Git: /usr/bin/git (found version "2.7.4") 
    -- 
    -- ******************* Caffe Configuration Summary *******************
    -- General:
    --   Version           :   1.0.0
    --   Git               :   1.0-dirty
    --   System            :   Linux
    --   C++ compiler      :   /usr/bin/c++
    --   Release CXX flags :   -O3 -DNDEBUG -fPIC -Wall -Wno-sign-compare -Wno-uninitialized
    --   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          :   ON
    --   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. 3.3.0)
    --   CUDA              :   No
    -- 
    -- Python:
    --   Interpreter       :   /home/mstf/anaconda3/bin/python3 (ver. 3.6)
    --   Libraries         :   /home/mstf/anaconda3/lib/libpython3.6m.so (ver 3.6.0)
    --   NumPy             :   /home/mstf/anaconda3/lib/python3.6/site-packages/numpy/core/include (ver 1.11.3)
    -- 
    -- Documentaion:
    --   Doxygen           :   /usr/bin/doxygen (1.8.11)
    --   config_file       :   /opt/movidius/caffe/.Doxyfile
    -- 
    -- Install:
    --   Install path      :   /opt/movidius/caffe/build/install
    -- 
    -- Configuring done
    
  • CMake Warning (dev) in src/caffe/CMakeLists.txt:
      Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
      interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
      cmake_policy command to set the policy and suppress this warning.
    
      Target "caffe" has an INTERFACE_LINK_LIBRARIES property which differs from
      its LINK_INTERFACE_LIBRARIES properties.
    
      INTERFACE_LINK_LIBRARIES:
    
        proto;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libglog.so;/usr/lib/x86_64-linux-gnu/libgflags.so;$<$<NOT:$<CONFIG:DEBUG>>:/usr/lib/x86_64-linux-gnu/libprotobuf.so>;$<$<CONFIG:DEBUG>:/usr/lib/x86_64-linux-gnu/libprotobuf.so>;-lpthread;/home/mstf/anaconda3/lib/libhdf5_hl.so;/home/mstf/anaconda3/lib/libhdf5.so;/home/mstf/anaconda3/lib/libhdf5_hl.so;/home/mstf/anaconda3/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/home/mstf/anaconda3/lib/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;/home/mstf/anaconda3/lib/libhdf5_hl.so;/home/mstf/anaconda3/lib/libhdf5.so;/home/mstf/anaconda3/lib/libhdf5_hl.so;/home/mstf/anaconda3/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/home/mstf/anaconda3/lib/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/liblmdb.so;/usr/lib/x86_64-linux-gnu/libleveldb.so;opencv_core;opencv_highgui;opencv_imgproc;opencv_imgcodecs;/usr/lib/liblapack.so;/usr/lib/libcblas.so;/usr/lib/libatlas.so;/usr/lib/x86_64-linux-gnu/libboost_python.so
    
      LINK_INTERFACE_LIBRARIES:
    
        proto;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libglog.so;/usr/lib/x86_64-linux-gnu/libgflags.so;/usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;/home/mstf/anaconda3/lib/libhdf5_hl.so;/home/mstf/anaconda3/lib/libhdf5.so;/home/mstf/anaconda3/lib/libhdf5_hl.so;/home/mstf/anaconda3/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/home/mstf/anaconda3/lib/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;/home/mstf/anaconda3/lib/libhdf5_hl.so;/home/mstf/anaconda3/lib/libhdf5.so;/home/mstf/anaconda3/lib/libhdf5_hl.so;/home/mstf/anaconda3/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/librt.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/home/mstf/anaconda3/lib/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/liblmdb.so;/usr/lib/x86_64-linux-gnu/libleveldb.so;opencv_core;opencv_highgui;opencv_imgproc;opencv_imgcodecs;/usr/lib/liblapack.so;/usr/lib/libcblas.so;/usr/lib/libatlas.so;/usr/lib/x86_64-linux-gnu/libboost_python.so
    
  • @mstfldmr Can you provide more details about your system? Are you using 64 bit Ubuntu 16.04? Are you using a physical machine or a virtual machine?

  • edited September 2017 Vote Up0Vote Down

    @Tome_at_Intel it's a physical machine, a Lenovo Yoga 900 laptop with Core-i7-6500u CPU and 8GB RAM. I'm running 64bits Ubuntu 16.04.

  • @Tome_at_Intel I already had OpenCV and Anaconda installed. Uninstalling OpenCV didn't help.

    After removing Anaconda, it worked!

This discussion has been closed.