Ask Your Question
0

opencv compilation error

asked 2015-01-07 09:51:54 -0600

saamishon gravatar image

updated 2015-01-08 00:13:37 -0600

ahendrix gravatar image
In file included from /usr/include/GL/gl.h:2059:0,
                 from /usr/include/GL/glx.h:32,
                 from /home/odroid/opencv-3.0/modules/highgui/src/window_QT.cpp:59:
/usr/include/GL/glext.h:468:19: error: conflicting declaration ‘typedef std::ptrdiff_t GLsizeiptr’
 typedef ptrdiff_t GLsizeiptr;
                   ^
In file included from /usr/include/qt4/QtOpenGL/qgl.h:79:0,
                 from /usr/include/qt4/QtOpenGL/QtOpenGL:5,
                 from /home/odroid/opencv-3.0/modules/highgui/src/window_QT.h:46,
                 from /home/odroid/opencv-3.0/modules/highgui/src/window_QT.cpp:47:
/usr/include/GLES2/gl2.h:69:25: error: ‘GLsizeiptr’ has a previous declaration as ‘typedef khronos_ssize_t GLsizeiptr’
 typedef khronos_ssize_t GLsizeiptr;
                         ^
In file included from /usr/include/GL/gl.h:2059:0,
                 from /usr/include/GL/glx.h:32,
                 from /home/odroid/opencv-3.0/modules/highgui/src/window_QT.cpp:59:
/usr/include/GL/glext.h:469:19: error: conflicting declaration ‘typedef std::ptrdiff_t GLintptr’
 typedef ptrdiff_t GLintptr;
                   ^
In file included from /usr/include/qt4/QtOpenGL/qgl.h:79:0,
                 from /usr/include/qt4/QtOpenGL/QtOpenGL:5,
                 from /home/odroid/opencv-3.0/modules/highgui/src/window_QT.h:46,
                 from /home/odroid/opencv-3.0/modules/highgui/src/window_QT.cpp:47:
/usr/include/GLES2/gl2.h:70:26: error: ‘GLintptr’ has a previous declaration as ‘typedef khronos_intptr_t GLintptr’
 typedef khronos_intptr_t GLintptr;
                          ^
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2015-01-08 00:18:18 -0600

ahendrix gravatar image

You don't provide any information about what you're doing or why, so I'm going to make a few guesses.

It looks like you're trying to compile OpenCV3 on an odroid.

It's failing because the version of QT4 that's packaged with Ubuntu is compiled against OpenGL ES, and something in OpenCV is trying to use OpenGL directly; resulting in the OpenGL and OpenGL ES headers being included at the same time during compilation.

This isn't really related to ROS. You'll probably get a better answer if you ask on the OpenCV site: http://answers.opencv.org/questions/

edit flag offensive delete link more
0

answered 2015-01-08 01:29:53 -0600

saamishon gravatar image

Yes. I'm sorry. I still cant figure out how to compile the opencv with OPENGLES. I use ODROID XU3. It says it will support only OPENGLES and not the generic OPENGL. I'm a newbie in linux.

The odroid forum people told Qt4 does not support OPENGLES. But Qt5 does. http://forum.odroid.com/viewtopic.php...

After updating to Qt5, i did not get any of the above errors except one. http://code.opencv.org/issues/3411

i followed these instructions to install opencv http://www.samontab.com/web/2014/06/i...

The examples given work well in PC. But not in ARM architecture when compiling codes using OPENGL.

Thank you.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-01-07 09:51:54 -0600

Seen: 1,425 times

Last updated: Jan 08 '15