Closed nhadiq closed 5 years ago
Hi @nhadiq97,
Sorry for the delayed response, I didn't get the email (or missed it) and the project was on pause for a while. Could you fix this issue? I haven't seen it before, could you give me some info of the compilation steps that you run so I can try to reproduce it?
Sorry again and thanks for reporting the issue! We'll be working on it.
Cheers, Hernán
Just checked, that's a problem in dlib. What version of gcc are you using? Are you passing any specific compilation flags apart from the already defined?
Hi @HernanG234 ,
I'm getting this error while i execute the make command:
Building CXX object dlib_build/dlib/CMakeFiles/dlib.dir/external/libjpeg/jdhuff.cpp.o /home/administrator/Downloads/OpenVino-Driver-Behaviour/third-party/dlib/dlib/external/libjpeg/jdhuff.cpp:23:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
Please check and respond.
Hi @MJ410,
Did you install the python dev package? If not, please try to do it. Also, I recommend you install python 3.6.
You could try:
sudo apt install python3.6 python3.6-dev
sudo apt remove python3-dev
(to ensure that the other version of Python version wouldn't interfere)
You remember to delete the files generated previously inside build folder and compile again.
Please, let us know if you can run the program!
Regards, Flavio.
Hi @flaviojpriotti and @HernanG234 ,
Thank you for the reply.
I followed the steps suggested by you, formatted the system and reinstalled everything, but I'm still getting the below error:
Building CXX object dlib_build/dlib/CMakeFiles/dlib.dir/external/libjpeg/jdhuff.cpp.o /home/ubuntu1/OpenVino-Driver-Behaviour/third-party/dlib/dlib/external/libjpeg/jdhuff.cpp:23:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
^
I think when I execute the make command, all the warnings related to the dlib folder are being treated as errors and the build fails. (as shown in the above image)
Please let me know if there is a way to solve this.
Regards
Hi again @MJ410,
Currently, what version of gcc do you have? You can update to gcc-7
apt-get install gcc-7
And, you can use update-alternatives to make it default:
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60
Please, let me know if you can run the program. Regards, Flavio.
Hi @flaviojpriotti , I got exactly the same error message as @MJ410 got when executing make. I've tried to installed python3.6, python3.6-dev, gcc-7 and set them as default, however, still not able to fix the issue. Please help to solve this. Thanks
Hi @flaviojpriotti , I got exactly the same error message as @MJ410 got when executing make. I've tried to installed python3.6, python3.6-dev, gcc-7 and set them as default, however, still not able to fix the issue. Please help to solve this. Thanks
I solve this by commenting out the '#pragma GCC diagnostic ignored "Wshift-negative-value"' lines in "third-party/dlib/dlib/external/libjpeg/jdhuff.cpp" and "third-party/dlib/dlib/external/libjpeg/jdphuff.cpp" and then make again.
Hi @timlee0119,
DLib compiles "its own" libjpeg, and for some reason it throws this error. We are not able to reproduce locally for the moment. Could you run this line and tell me its output?
readlink -e /usr/lib/x86_64-linux-gnu/libjpeg.so
Thanks!
Okey, here's the thing. 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:
libjpeg
(on Ubuntu):sudo apt-get install libjpeg8-dev
OR sudo apt-get install libjpeg9-dev
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.
Cheers!
error: iteration 1 invokes undefined behavior [-Werror=aggressive-loop-optimizations] y = abs(q(i)) + abs(e(i));