Ask Your Question

Revision history [back]

Installing on Ubuntu 14.04: 'make' errors

Hi everyone! I'm trying to install OpenCV 2.4.9 on my Ubuntu 14.04, but I have already some problems. When I configure with ccmake and then press g to generate, all goes good. But when I launch make command in the 'build' directory, it stops with an error about tiff function in /opencv-2.4.9/3rdparty/libtiff/tif_compress.c:

[ 3%] Building C object 3rdparty/libtiff/CMakeFiles/libtiff.dir/tif_compress.c.o cd /home/andrea/opencv-2.4.9/build/3rdparty/libtiff && /usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wcast-align -Wstrict-aliasing=2 -fdiagnostics-show-option -Wno-long-long -pthread -Werror -ffast-math -msse -msse2 -mavx --coverage -fPIC -O3 -DNDEBUG -DNDEBUG -I/home/andrea/opencv-2.4.9/build/3rdparty/zlib -I/home/andrea/opencv-2.4.9/3rdparty/zlib -I/home/andrea/opencv-2.4.9/build/3rdparty/libtiff -I/home/andrea/opencv-2.4.9/3rdparty/libtiff -I/home/andrea/opencv-2.4.9/build -o CMakeFiles/libtiff.dir/tif_compress.c.o -c /home/andrea/opencv-2.4.9/3rdparty/libtiff/tif_compress.c /home/andrea/opencv-2.4.9/3rdparty/libtiff/tif_compress.c:1:0: error: cannot open CMakeFiles/libtiff.dir/tif_compress.c.gcno /* $Id: tif_compress.c,v 1.22 2010-03-10 18:56:48 bfriesen Exp $ / ^ /home/andrea/opencv-2.4.9/3rdparty/libtiff/tif_compress.c:89:1: error: no previous prototype for ‘_TIFFNoFixupTags’ [-Werror=missing-prototypes] _TIFFNoFixupTags(TIFF tif) ^ cc1: all warnings being treated as errors make[2]: * [3rdparty/libtiff/CMakeFiles/libtiff.dir/tif_compress.c.o] Errore 1 make[2]: uscita dalla directory "/home/andrea/opencv-2.4.9/build" make[1]: [3rdparty/libtiff/CMakeFiles/libtiff.dir/all] Errore 2 make[1]: uscita dalla directory "/home/andrea/opencv-2.4.9/build" make: ** [all] Errore 2

I have tried to configure without TIFF settings but it stops again with the same error about JPEG:

[ 2%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jquant2.c.o cd /home/andrea/opencv-2.4.9/build/3rdparty/libjpeg && /usr/bin/cc -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wcast-align -Wstrict-aliasing=2 -fdiagnostics-show-option -Wno-long-long -pthread -Werror -ffast-math -msse -msse2 -mavx --coverage -fPIC -O3 -DNDEBUG -DNDEBUG -I/home/andrea/opencv-2.4.9/3rdparty/libjpeg -I/home/andrea/opencv-2.4.9/build -o CMakeFiles/libjpeg.dir/jquant2.c.o -c /home/andrea/opencv-2.4.9/3rdparty/libjpeg/jquant2.c /home/andrea/opencv-2.4.9/3rdparty/libjpeg/jquant2.c: In function ‘prescan_quantize’: /home/andrea/opencv-2.4.9/3rdparty/libjpeg/jquant2.c:225:22: error: unused parameter ‘output_buf’ [-Werror=unused-parameter] JSAMPARRAY output_buf, int num_rows) ^ /home/andrea/opencv-2.4.9/3rdparty/libjpeg/jquant2.c: In function ‘finish_pass2’: /home/andrea/opencv-2.4.9/3rdparty/libjpeg/jquant2.c:1156:32: error: unused parameter ‘cinfo’ [-Werror=unused-parameter] finish_pass2 (j_decompress_ptr cinfo) ^ cc1: all warnings being treated as errors make[2]: * [3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jquant2.c.o] Errore 1 make[2]: uscita dalla directory "/home/andrea/opencv-2.4.9/build" make[1]: [3rdparty/libjpeg/CMakeFiles/libjpeg.dir/all] Errore 2 make[1]: uscita dalla directory "/home/andrea/opencv-2.4.9/build" make: ** [all] Errore 2

Where is the problem? Can anyone help me?