Compiling opencv2.4.9 on ubuntu14.04 WITH_QT=ON fails

asked 2014-11-25 03:08:24 -0600

mcrahr gravatar image

Hi.

My build fails when compiling opencv2.4.9 with the following cmake

cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_VTK=ON ..

if I compile WITH_QT=OFF everything is fine

I Get this

In file included from /home/vccdemo/Downloads/opencv-2.4.9/build/modules/highgui/opencv_highgui_automoc.cpp:2:0: /home/vccdemo/Downloads/opencv-2.4.9/build/modules/highgui/moc_window_QT.cpp:13:2: error: #error "This file was generated using the moc from 4.8.6. It" #error "This file was generated using the moc from 4.8.6. It" ^ /home/vccdemo/Downloads/opencv-2.4.9/build/modules/highgui/moc_window_QT.cpp:14:2: error: #error "cannot be used with the include files from this version of Qt." #error "cannot be used with the include files from this version of Qt." ^ /home/vccdemo/Downloads/opencv-2.4.9/build/modules/highgui/moc_window_QT.cpp:15:2: error: #error "(The moc has changed too much.)" #error "(The moc has changed too much.)"

.. .. ..

dow::metaObject() const’: /home/vccdemo/Downloads/opencv-2.4.9/build/modules/highgui/moc_window_QT.cpp:646:1: error: control reaches end of non-void function [-Werror=return-type] } ^ /home/vccdemo/Downloads/opencv-2.4.9/build/modules/highgui/moc_window_QT.cpp: In member function ‘virtual const QMetaObject* DefaultViewPort::metaObject() const’: /home/vccdemo/Downloads/opencv-2.4.9/build/modules/highgui/moc_window_QT.cpp:742:1: error: control reaches end of non-void function [-Werror=return-type] }

cc1plus: some warnings being treated as errors make[2]: * [modules/highgui/CMakeFiles/opencv_highgui.dir/opencv_highgui_automoc.cpp.o] Error 1 make[1]: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make: ** [all] Err

-- VTK support is disabled. Incompatible combination: OpenCV + Qt5 and VTK ver.5.8.0 + Qt4

-- Found VTK ver. 5.8.0 (usefile: /usr/lib/vtk-5.8/UseVTK.cmake)

-- General configuration for OpenCV 2.4.9 =====================================

-- Version control: unknown

-- Platform: -- Host: Linux 3.13.0-40-generic x86_64 -- CMake: 2.8.12.2 -- CMake generator: Unix Makefiles -- CMake build tool: /usr/bin/make

-- Configuration: Release

-- C/C++: -- Built as dynamic libs?: YES -- C++ Compiler: /usr/bin/c++ (ver 4.8.2) -- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG -- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG -- C Compiler: /usr/bin/cc -- C flags (Release): -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 -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG -- C flags (Debug): -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 -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG -- Linker flags (Release ... (more)

edit retag flag offensive close merge delete