Issues with installing OpenCV 2.4.9 on Ubuntu 12.04 - gtkerror

asked 2014-05-15 14:43:04 -0500

Sid gravatar image

updated 2014-05-15 14:56:24 -0500

I am trying to install the latest version of OpenCV (2.4.9) on Ubuntu and am getting an error as under

[ 10%] Built target pch_Generate_opencv_highgui
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_images.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/loadsave.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/utils.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_gtk.cpp.o
In file included from /usr/local/include/glib-2.0/glib/gasyncqueue.h:30:0,
             from /usr/local/include/glib-2.0/glib.h:32,
             from /usr/local/include/gtk-2.0/gdk/gdktypes.h:32,
             from /usr/local/include/gtk-2.0/gdk/gdkcolor.h:4,
             from /usr/local/include/gtk-2.0/gdk/gdk.h:30,
             from /usr/local/include/gtk-2.0/gtk/gtk.h:31,
             from /opt/opencv/OpenCV-2.4.9/modules/highgui/src/window_gtk.cpp:48:
/usr/local/include/glib-2.0/glib/gthread.h:233:27: error: variable or field 'g_static_mutex_init' declared void
/usr/local/include/glib-2.0/glib/gthread.h:233:27: error: 'GStaticMutex' was not declared in this scope
/usr/local/include/glib-2.0/glib/gthread.h:233:41: error: 'mutex' was not declared in this scope
/usr/local/include/glib-2.0/glib/gthread.h:234:27: error: variable or field 'g_static_mutex_free' declared void
/usr/local/include/glib-2.0/glib/gthread.h:234:27: error: 'GStaticMutex' was not declared in this scope
/usr/local/include/glib-2.0/glib/gthread.h:234:41: error: 'mutex' was not declared in this scope
/usr/local/include/glib-2.0/glib/gthread.h:253:3: error: 'GStaticMutex' does not name a type
/usr/local/include/glib-2.0/glib/gthread.h:255:3: error: 'GSystemThread' does not name a type
/usr/local/include/glib-2.0/glib/gthread.h:272:3: error: 'GStaticMutex' does not name a type

I have GTK 2.0 installed and also updated my CMakeCache.txt to point to glibconfig.h and gdkconfig.h

edit retag flag offensive close merge delete