Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6405 Discussions

caffe build error during ncsdk installation

idata
Employee
1,038 Views

I'm getting the following:

 

[ 75%] Linking CXX executable upgrade_solver_proto_text

 

/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to PyString_Size' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference toPyString_FromStringAndSize'

 

/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 toPyInt_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 toPyFile_FromString'

 

/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to PyNumber_Divide' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference toPyUnicodeUCS4_FromEncodedObject'

 

/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to PyNumber_InPlaceDivide' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference toPyString_InternFromString'

 

/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 toPyInt_AsLong'

 

/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to PyString_AsString' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference toPyString_FromFormat'

 

/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 toPyFile_AsFile'

 

/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference to Py_InitModule4_64' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libboost_python.so: undefined reference toPyString_Type'

 

collect2: error: ld returned 1 exit status

 

tools/CMakeFiles/upgrade_solver_proto_text.dir/build.make:137: recipe for target 'tools/upgrade_solver_proto_text' failed

 

make[3]: *** [tools/upgrade_solver_proto_text] Error 1

 

make[3]: Leaving directory '/opt/movidius/ssd-caffe/build'

 

CMakeFiles/Makefile2:517: recipe for target 'tools/CMakeFiles/upgrade_solver_proto_text.dir/all' failed

 

make[2]: *** [tools/CMakeFiles/upgrade_solver_proto_text.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 498

 

I'm working on a 64-bit Ubuntu physical machine.

 

This is very frustrating because my NCS is arriving tomorrow and I'm dying to try it out after watching today's webinar on image recognition.

 

I'd be very grateful for any suggestions about how to deal with this. Thank you.

 

Tony
0 Kudos
8 Replies
idata
Employee
659 Views

p.s. Ubuntu 16.04

0 Kudos
idata
Employee
659 Views

@TonyHoldroyd Glad you enjoyed the webinar. Regarding the installation issue, if you are using Virtualenv or Anaconda, the current NCSDK v 1.12 isn't compatible with either of those (I sometimes see this issue in those cases). If possible, I recommend installing the SDK on a fresh machine.

0 Kudos
idata
Employee
659 Views

Hello Tome, thank you for your message.

 

Well, I'm not sure how but I managed to clear that error, above, with make install, which now works without complaint, but I'm now getting an error with make examples:

 

from mvnc import mvncapi

 

ModuleNotFoundError: No module named 'mvnc'

 

Makefile:80: recipe for target 'compile' failed

 

make[4]: *** [compile] Error 1

 

make[4]: Leaving directory '/home/tony/workspace/ncsdk/examples/caffe/GoogLeNet'

 

cp: cannot stat '../../caffe/GoogLeNet/graph': No such file or directory

 

Makefile:9: recipe for target 'googlenet' failed

 

make[3]: *** [googlenet] Error 1

 

make[3]: Leaving directory '/home/tony/workspace/ncsdk/examples/apps/multistick_cpp'

 

Makefile:12: recipe for target 'multistick_cpp/.' failed

 

make[2]: *** [multistick_cpp/.] Error 2

 

make[2]: Leaving directory '/home/tony/workspace/ncsdk/examples/apps'

 

Makefile:12: recipe for target 'apps/.' failed

 

make[1]: *** [apps/.] Error 2

 

make[1]: Leaving directory '/home/tony/workspace/ncsdk/examples'

 

Makefile:57: recipe for target 'examples' failed

 

make: *** [examples] Error 2

 

tony@DL-Box:~/workspace/ncsdk$

 

Again, any suggestions very gratefully received.

 

THanks

 

Tony
0 Kudos
idata
Employee
659 Views

I managed to fix this by locating mvnc and appending its path to my PYTHONPATH. To my great astonishment, the examples all then compiled without issue.

0 Kudos
idata
Employee
659 Views

@TonyHoldroyd Appreciate you coming back and posting your solution. Glad it worked out for you. The default PYTHONPATH is supposed to be: export PYTHONPATH="${PYTHONPATH}:/opt/movidius/caffe/python". What exactly did you have to change yours to?

0 Kudos
idata
Employee
659 Views

Unfortunately, when I tried to 'make examples' again later, I got the same error as reported above:

 

ModuleNotFoundError: No module named 'mvnc' (The full error list is as above)

 

The module is there. What I had perhaps naively tried to do was put its path in as an extra line in .bashrc :

 

export PYTHONPATH="${PYTHONPATH}:/opt/movidius/NCSDK/ncsdk-86_64/api/python/mvnc"

 

which seemed to work the first time I tried it, but not consistently.

 

I would appreciate any suggestions you have.
0 Kudos
idata
Employee
659 Views

@TonyHoldroyd I suggest uninstalling the NCSDK using the uninstall.sh script and reinstalling the NCSDK (on a fresh machine if possible) using the following steps below.

 

     

  1. Open a new linux terminal. Change directory to your NCSDK directory.
  2.  

  3. Uninstall your old NCSDK by typing in ./uninstall.sh
  4.  

  5. Next change directories one level up by typing in cd .. and remove your NCSDK folder by typing in rm –rf ncsdk
  6.  

  7. Clone a fresh version of the SDK by typing in git clone https://github.com/movidius/ncsdk.git
  8.  

  9. Install the NCSDK by typing in cd ncsdk and then make install
  10.  

0 Kudos
idata
Employee
659 Views

In the end, I decided to give up trying to install the ncsdk on my main machine and I installed it with no problems at all on an older but slower machine I have not used for a while with a fresh install of Ubuntu 16.04, just to be on the safe side.

0 Kudos
Reply