incluit / OpenVino-Driver-Behaviour

Apache License 2.0
116 stars 37 forks source link

make error with openVINO R2 (openvino_2019.2.242) #5

Closed BrianC15 closed 4 years ago

BrianC15 commented 5 years ago

I meet this issue, how can I fix this? In fact, I tried openvino R1 and R2, both have the same error.

[ 69%] Building CXX object dlib_build/dlib/CMakeFiles/dlib.dir/external/libjpeg/jdhuff.cpp.o /home/ieisw/OpenVino-Driver-Behaviour/third-party/dlib/dlib/external/libjpeg/jdhuff.cpp:23:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]

pragma GCC diagnostic ignored "-Wshift-negative-value"

                            ^

cc1plus: all warnings being treated as errors dlib_build/dlib/CMakeFiles/dlib.dir/build.make:1574: recipe for target 'dlib_build/dlib/CMakeFiles/dlib.dir/external/libjpeg/jdhuff.cpp.o' failed make[2]: [dlib_build/dlib/CMakeFiles/dlib.dir/external/libjpeg/jdhuff.cpp.o] Error 1 CMakeFiles/Makefile2:193: recipe for target 'dlib_build/dlib/CMakeFiles/dlib.dir/all' failed make[1]: [dlib_build/dlib/CMakeFiles/dlib.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

HernanG234 commented 5 years ago

That's a Dlib problem. It's also explained on this issue and shortly explained in the FAQ section. DLib has its own BLAS library which tries to compile if it can't find any of them installed (openblas, intel mkl, libblas). When this happens, it needs to compile its own libjpeg and throws the error mentioned above. There are 2 ways to solve this:

  1. Lightweight solution, install another libjpeg (on Ubuntu):

sudo apt-get install libjpeg8-dev OR sudo apt-get install libjpeg9-dev

  1. Recommended solution, install a full BLAS library as it will boost the program's performance a bit. We recommend installing Intel's MKL as it works faster and takes advantage of your Intel's hardware.

You could also install openblas:

sudo apt-get install libopenblas-dev

or libblas (untested):

sudo apt-get install libblas-dev

With that, DLib shouldn't compile the file that's causing the trouble.

Let us know if it works. Cheers!