-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
highgui/window_QT.cpp erroneously includes glx.h on GLES plattforms #9171
Copy link
Copy link
Closed
Labels
Hackathonhttps://opencv.org/opencv-hackathon-starts-next-week/https://opencv.org/opencv-hackathon-starts-next-week/bugcategory: build/install
Milestone
Description
System information (version)
- OpenCV => 3.2
- Operating System / Platform => Linux
- Compiler => GCC7
Detailed description
After
3bf16da, which
adresses #6471,
GL/glx.h is included on all LINUX plattforms, which is wrong for a number of reasons:
- GL_PERSPECTIVE_CORRECTION_HINT is defined in GL/gl.h, not glx.h, the latter just includes the former
- GL/gl.h is a Desktop GL header, and should not be included on GLES plattforms
- GL/gl.h is already included via QtOpenGL -> QtGui/qopengl.h on desktop plattforms
Including both GLES and GL headers leads to compilation errors on 32bit GLES plattforms, as it causes
conflicting type declarations:
[ 729s] In file included from /usr/include/GL/gl.h:2060:0,
[ 729s] from /usr/include/GL/glx.h:32,
[ 729s] from /home/abuild/rpmbuild/BUILD/opencv-3.2.0/modules/highgui/src/window_QT.cpp:59:
[ 729s] /usr/include/GL/glext.h:468:19: error: conflicting declaration 'typedef ptrdiff_t GLsizeiptr'
[ 729s] typedef ptrdiff_t GLsizeiptr;
[ 729s] ^~~~~~~~~~
[ 729s] In file included from /usr/include/qt5/QtGui/qopengl.h:107:0,
[ 729s] from /usr/include/qt5/QtGui/QtGui:43,
[ 729s] from /usr/include/qt5/QtOpenGL/QtOpenGLDepends:4,
[ 729s] from /usr/include/qt5/QtOpenGL/QtOpenGL:3,
[ 729s] from /home/abuild/rpmbuild/BUILD/opencv-3.2.0/modules/highgui/src/window_QT.h:46,
[ 729s] from /home/abuild/rpmbuild/BUILD/opencv-3.2.0/modules/highgui/src/window_QT.cpp:47:
[ 729s] /usr/include/GLES3/gl3.h:73:25: note: previous declaration as 'typedef khronos_ssize_t GLsizeiptr'
[ 729s] typedef khronos_ssize_t GLsizeiptr;
GL_PERSPECTIVE_CORRECTION_HINT does not exist in GLES 2.0/3.x, and has been deprecated in OpenGL 3.0 core profiles.
Steps to reproduce
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Hackathonhttps://opencv.org/opencv-hackathon-starts-next-week/https://opencv.org/opencv-hackathon-starts-next-week/bugcategory: build/install