From: Wenlin Kang <wenlin.k...@windriver.com>

The error info is as the follow:
| In file included from 
/.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopengl.h:123:0,
|                  from 
/.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopenglshaderprogram.h:41,
|                  from 
/.../sysroots/fsl-imx6/usr/include/qt5/QtQuick/qsgmaterial.h:38,
|                  from 
/.../sysroots/fsl-imx6/usr/include/qt5/QtQuick/QSGMaterial:1,
|                  from 
/.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.h:40,
|                  from 
/.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp:37:
| /.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopenglext.h:474:19: error: 
conflicting declaration 'typedef ptrdiff_t GLsizeiptr'
|  typedef ptrdiff_t GLsizeiptr;
|                    ^
| In file included from 
/.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp:34:0:
| /.../sysroots/fsl-imx6/usr/include/GLES2/gl2.h:67:25: note: previous 
declaration as 'typedef khronos_ssize_t GLsizeiptr'
|  typedef khronos_ssize_t GLsizeiptr;
|                          ^
| In file included from 
/.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopengl.h:123:0,
|                  from 
/.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopenglshaderprogram.h:41,
|                  from 
/.../sysroots/fsl-imx6/usr/include/qt5/QtQuick/qsgmaterial.h:38,
|                  from 
/.../sysroots/fsl-imx6/usr/include/qt5/QtQuick/QSGMaterial:1,
|                  from 
/.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.h:40,
|                  from 
/.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp:37:
| /.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopenglext.h:475:19: error: 
conflicting declaration 'typedef ptrdiff_t GLintptr'
|  typedef ptrdiff_t GLintptr;
|                    ^
| In file included from 
/.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp:34:0:
| /.../sysroots/fsl-imx6/usr/include/GLES2/gl2.h:68:26: note: previous 
declaration as 'typedef khronos_intptr_t GLintptr'
|  typedef khronos_intptr_t GLintptr;
|                           ^

Here, use lgl2.h instead of gl2.h and gl2ext.h,
fix the "conflicting declaration" error.

Signed-off-by: Wenlin Kang <wenlin.k...@windriver.com>
---
 ...tmultimedia-fix-a-conflicting-declaration.patch | 103 +++++++++++++++++++++
 recipes-qt/qt5/qtmultimedia_git.bb                 |   1 +
 2 files changed, 104 insertions(+)
 create mode 100644 
recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch

diff --git 
a/recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch
 
b/recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch
new file mode 100644
index 0000000..8547f72
--- /dev/null
+++ 
b/recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch
@@ -0,0 +1,103 @@
+From 849355a1c59d76fa39dc93b537458a084190fa45 Mon Sep 17 00:00:00 2001
+From: Wenlin Kang <wenlin.k...@windriver.com>
+Date: Thu, 8 Sep 2016 12:18:13 +0800
+Subject: [PATCH] qtmultimedia: fix a conflicting declaration
+
+Use lgl2.h instead of gl2.h and gl2ext.h,
+fix a "conflicting declaration" error.
+
+Signed-off-by: Wenlin Kang <wenlin.k...@windriver.com>
+---
+ src/plugins/videonode/imx6/lgl2.h                  | 46 ++++++++++++++++++++++
+ .../videonode/imx6/qsgvivantevideomaterial.cpp     |  5 ++-
+ src/plugins/videonode/imx6/qsgvivantevideonode.cpp |  5 ++-
+ 3 files changed, 52 insertions(+), 4 deletions(-)
+ create mode 100644 src/plugins/videonode/imx6/lgl2.h
+
+diff --git a/src/plugins/videonode/imx6/lgl2.h 
b/src/plugins/videonode/imx6/lgl2.h
+new file mode 100644
+index 0000000..2423697
+--- /dev/null
++++ b/src/plugins/videonode/imx6/lgl2.h
+@@ -0,0 +1,46 @@
++#ifndef __L_GL2_H__
++#define __L_GL2_H__
++
++// this file comes from <GLES2/gl2.h> and <GLES2/gl2ext.h>,
++// it's a light gl2.h.
++
++/*-------------------------------------------------------------------------
++ * Definition of KHRONOS_APIENTRY
++ *-------------------------------------------------------------------------
++ * This follows the return type of the function  and precedes the function
++ * name in the function prototype.
++ */
++#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
++     /* Win32 but not WinCE */
++#   define KHRONOS_APIENTRY __stdcall
++#else
++#   define KHRONOS_APIENTRY
++#endif
++
++#ifndef GL_APIENTRY
++#   define GL_APIENTRY KHRONOS_APIENTRY
++#endif
++
++#ifndef GL_APIENTRYP
++#   define GL_APIENTRYP GL_APIENTRY*
++#endif
++
++typedef void GLvoid;
++typedef unsigned int GLenum;
++typedef unsigned int GLuint;
++typedef int GLsizei;
++
++#define GL_VIV_YV12                                             0x8FC0
++#define GL_VIV_NV12                                             0x8FC1
++#define GL_VIV_YUY2                                             0x8FC2
++#define GL_VIV_UYVY                                             0x8FC3
++#define GL_VIV_NV21                                             0x8FC4
++#define GL_VIV_I420                                             0x8FC5
++
++typedef void (GL_APIENTRYP PFNGLTEXDIRECTVIVMAPPROC) (GLenum Target, GLsizei 
Width, GLsizei Height, GLenum Format, GLvoid ** Logical, const GLuint * 
Physical);
++typedef void (GL_APIENTRYP PFNGLTEXDIRECTMAPVIVPROC) (GLenum Target, GLsizei 
Width, GLsizei Height, GLenum Format, GLvoid ** Logical, const GLuint * 
Physical);
++typedef void (GL_APIENTRYP PFNGLTEXDIRECTVIVPROC) (GLenum Target, GLsizei 
Width, GLsizei Height, GLenum Format, GLvoid ** Pixels);
++typedef void (GL_APIENTRYP PFNGLTEXDIRECTINVALIDATEVIVPROC) (GLenum Target);
++typedef void (GL_APIENTRYP PFNGLTEXDIRECTTILEDMAPVIVPROC) (GLenum Target, 
GLsizei Width, GLsizei Height, GLenum Format, GLvoid ** Logical, const GLuint * 
Physical);
++
++#endif
+diff --git a/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp 
b/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
+index 2e2092b..54568db 100644
+--- a/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
++++ b/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
+@@ -31,8 +31,9 @@
+ **
+ ****************************************************************************/
+ 
+-#include <GLES2/gl2.h>
+-#include <GLES2/gl2ext.h>
++// use lgl2.h instead of <GLES2/gl2.h> and <GLES2/gl2ext.h>,
++// fixes a conflicting declaration issue.
++#include "lgl2.h"
+ 
+ #include "qsgvivantevideomaterial.h"
+ #include "qsgvivantevideomaterialshader.h"
+diff --git a/src/plugins/videonode/imx6/qsgvivantevideonode.cpp 
b/src/plugins/videonode/imx6/qsgvivantevideonode.cpp
+index 229a69b..184fd12 100644
+--- a/src/plugins/videonode/imx6/qsgvivantevideonode.cpp
++++ b/src/plugins/videonode/imx6/qsgvivantevideonode.cpp
+@@ -31,8 +31,9 @@
+ **
+ ****************************************************************************/
+ 
+-#include <GLES2/gl2.h>
+-#include <GLES2/gl2ext.h>
++// use lgl2.h instead of <GLES2/gl2.h> and <GLES2/gl2ext.h>,
++// fixes a conflicting declaration issue.
++#include "lgl2.h"
+ 
+ #include "qsgvivantevideonode.h"
+ #include "qsgvivantevideomaterialshader.h"
+-- 
+1.9.1
+
diff --git a/recipes-qt/qt5/qtmultimedia_git.bb 
b/recipes-qt/qt5/qtmultimedia_git.bb
index 3bbfb6e..245f106 100644
--- a/recipes-qt/qt5/qtmultimedia_git.bb
+++ b/recipes-qt/qt5/qtmultimedia_git.bb
@@ -36,6 +36,7 @@ EXTRA_QMAKEVARS_PRE += 
"${@bb.utils.contains_any('PACKAGECONFIG', 'gstreamer gst
 
 SRC_URI += "\
     file://0001-Initial-porting-effort-to-GStreamer-1.0.patch \
+    file://0001-qtmultimedia-fix-a-conflicting-declaration.patch \
 "
 
 SRCREV = "1be4f74843b41f8bc1d1d64e83485f4eb864e8b4"
-- 
2.1.4

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to