Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
502 Views

NCSDK2 Installation Error

Hi there,

 

I met some problem when I installed NCSDK2 on my machine where the environment is Ubuntu Linux 16.04 (64-bit). I follow the instructions here (https://movidius.github.io/ncsdk/install.html). My operations are as follow:

 

     

  1. Clone the repository from GitHub:

     

    $ git clone -b ncsdk2 http://github.com/Movidius/ncsdk
  2.  

  3. Perform the Makefile to install:

     

    $ cd ncsdk && make install
  4.  

  5. Then, the error message is as follow:

     

    -- Build files have been written to: /opt/movidius/ssd-caffe/build make[1]: Entering directory '/opt/movidius/ssd-caffe/build' make[2]: Entering directory '/opt/movidius/ssd-caffe/build' make[3]: Entering directory '/opt/movidius/ssd-caffe/build' make[3]: Leaving directory '/opt/movidius/ssd-caffe/build' [ 1%] Built target proto make[3]: Entering directory '/opt/movidius/ssd-caffe/build' make[3]: Leaving directory '/opt/movidius/ssd-caffe/build' make[3]: Entering directory '/opt/movidius/ssd-caffe/build' [ 3%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/memory_data_layer.cpp.o [ 4%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/data_layer.cpp.o [ 4%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/neuron_layer.cpp.o [ 4%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/spp_layer.cpp.o [ 4%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/window_data_layer.cpp.o [ 6%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/detection_output_layer.cpp.o [ 6%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/sigmoid_layer.cpp.o [ 6%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/hdf5_output_layer.cpp.o In file included from /usr/local/include/opencv4/opencv2/core.hpp:52:0, from /usr/local/include/opencv4/opencv2/core/core.hpp:48, from /opt/movidius/ssd-caffe/src/caffe/layers/memory_data_layer.cpp:2: /usr/local/include/opencv4/opencv2/core/cvdef.h:656:4: error: #error "OpenCV 4.x+ requires enabled C++11 support" # error "OpenCV 4.x+ requires enabled C++11 support" ...... make[3]: *** [src/caffe/CMakeFiles/caffe.dir/layers/detection_output_layer.cpp.o] Error 1 make[3]: Leaving directory '/opt/movidius/ssd-caffe/build' CMakeFiles/Makefile2:272: recipe for target 'src/caffe/CMakeFiles/caffe.dir/all' failed make[2]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2 make[2]: Leaving directory '/opt/movidius/ssd-caffe/build' Makefile:127: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/opt/movidius/ssd-caffe/build' Installation failed. Error on line 648 Makefile:47: recipe for target 'install' failed make: *** [install] Error 1
  6.  

 

Is anyone know how to fix it? I have already found some materials but I am not sure how to fix it. Thanks.

Tags (2)
0 Kudos
2 Replies
idata
Community Manager
158 Views

Hi @yungshenglu

 

 

Thanks for reaching out. The error seems to be related to the opencv version installed, could you confirm you have installed opencv version > 4.x prior attempting to install the ncsdk? I've installed opencv v4.x as instructed here https://www.pyimagesearch.com/2018/08/15/how-to-install-opencv-4-on-ubuntu/ and when executing the ncsdk make install command I get the following error:

 

ERROR - Compatibility Issue Detected with OpenCV

 

The OpenCV library /usr/local/lib/libopencv_highgui.so.4.0.0 links against libprotobuf-lite This causes an error with ssd-caffe as it links against libprotobuf (non-lite version) and these libraries cannot be used together and can cause a crash when deallocating memory Note building OpenCV with QT vs. the default GTK avoids this issue To avoid this, uninstall OpenCV libraries built from sources. The script, uninstall-opencv.sh, attempts to do this and is called by make install If you have run make install or uninstall-opencv.sh and see this, try uninstalling OpenCV installed in /usr/local/ manually Will exit make: *** [install] Error 1

 

If you do indeed have an opencv version > 4.x, I may suggest to start clean by uninstalling/removing opencv and re-running the ncsdk make install command. To uninstall opencv you could either use the ./uninstall-opencv.sh script provided in the ncsdk or manually uninstall by going to the opencv build directory and executing sudo make uninstall.

 

 

Another option could be to reconfigure the Makefile and enable C++11 support, as stated here: https://github.com/BVLC/caffe/issues/6358#issuecomment-383080133. _"As a quick fix, you need to add -std=c++11 to the compiler flags of Caffe or use OpenCV older than 4.x+."_ I have not tried this option as I was unable to reproduce your error.

 

 

If you decide to try either suggestion above please share your results, hope you find this helpful.

 

 

Regards,

 

Luis
idata
Community Manager
158 Views

Thank @Luis_at_Intel !

 

I have checked the version of OpenCV on my machine is > 4.x and I have also uninstalled and removed OpenCV and rerun NCSDK by make install command many times. It was still not working. Finally, I just reinstall my Ubuntu Linux and rerun NCSDK installation command and it is working. Although I didn't try your suggestions, I really thank your suggestion!

 

Best,

 

David Lu