Skip to contentSkip to conversation

qt5: fixed raspberrypi support

PATCH In review John Madieu 2 participants 18 messages Jan 7, 2016 – Jan 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qt5: fixed raspberrypi support

Because EGL properties were not defined properly, we always had the following error
make: *** [egl] Error 1
| EGL disabled.
| The EGL functionality test failed; EGL is required by some QPA plugins to manage cont | You might need to modify the include and library search paths by editing QMAKE_INCDIR

This bbappend definitively fix the bug

---
 recipes-qt/qt5/qtbase_%.bbappend | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 recipes-qt/qt5/qtbase_%.bbappend
recipes-qt/qt5/qtbase_%.bbappend new file +34 -0
new file mode 100644
index 0000000..ac158a9
@@ -0,0 +1,34 @@
+
+do_configure_prepend_rpi() {
+	
+	sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
+    if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
+        cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
+QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL} 
+QMAKE_LIBS_EGL = -lEGL -lGLESv2 
+EOF
+
+        if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_DEVICE_INTEGRATION = eglfs_brcm
+EOF
+        else
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
+EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp
+EOF
+        fi
+    fi
+    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+
+
+load(qt_config)
+
+EOF
+}
+
+
+
+
+
Signature · 1 line
1.9.1
#1 lore raw

Hi John,

Quoted 10 lines · John Madieu

Because EGL properties were not defined properly, we always had the following error
make: *** [egl] Error 1
| EGL disabled.
| The EGL functionality test failed; EGL is required by some QPA plugins to manage cont | You might need to modify the include and library search paths by editing QMAKE_INCDIR

This bbappend definitively fix the bug

---

We had a similar patch before but this would mean adding a new dependency on a new layer, right? I'm fine with this patch as long as it will include a similar mechanism to what meta-fsl-arm does: add specific bb/bbappends based on the included layers so we don't force every user from now on to add the qt5 layer. Does it make sense? Can you add patches for this as I can merge them together?

Thanks,
--
Andrei Gherzan

#2 lore raw

PATCH 2/2 layer.conf: avoid to force users to add the qt5 layer because of qtbase bbappend

cleanned qtbase.bbappend

---
 conf/layer.conf                            |  4 ++++
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 29 +++++++++++++++++++++++++
 recipes-qt/qt5/qtbase_%.bbappend           | 34 ------------------------------
 3 files changed, 33 insertions(+), 34 deletions(-)
 create mode 100644 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
 delete mode 100644 recipes-qt/qt5/qtbase_%.bbappend
conf/layer.conf +4 -0
index bea5a65..6346459 100644
@@ -12,3 +12,7 @@ BBFILE_PRIORITY_raspberrypi = "9"
 # Additional license directories.
 LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
 
+# Let us add layer-specific (such as qt5-layer) bbappends
+# which are only applied when that layer is included in our configuration
+BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \
+               for layer in BBFILE_COLLECTIONS.split())}"
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file +29 -0
new file mode 100644
index 0000000..8b77bfa
@@ -0,0 +1,29 @@
+
+do_configure_prepend_rpi() {
+
+	sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
+    if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
+        cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
+QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL}
+QMAKE_LIBS_EGL = -lEGL -lGLESv2
+EOF
+
+        if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_DEVICE_INTEGRATION = eglfs_brcm
+EOF
+        else
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
+EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp
+EOF
+        fi
+    fi
+    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+
+
+load(qt_config)
+
+EOF
+}
recipes-qt/qt5/qtbase_%.bbappend deleted +0 -34
deleted file mode 100644
index ac158a9..0000000
@@ -1,34 +0,0 @@
-
-do_configure_prepend_rpi() {
-	
-	sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
-    if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
-        cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
-QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
-QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL} 
-QMAKE_LIBS_EGL = -lEGL -lGLESv2 
-EOF
-
-        if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
-            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
-EGLFS_DEVICE_INTEGRATION = eglfs_brcm
-EOF
-        else
-            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
-EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
-EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp
-EOF
-        fi
-    fi
-    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
-
-
-load(qt_config)
-
-EOF
-}
-
-
-
-
-
Signature · 1 line
1.9.1
#3 lore raw

Re: [meta-raspberrypi][PATCH 2/2] layer.conf: avoid to force users to add the qt5 layer because of qtbase bbappend

Hi,

Quoted 11 lines · John Madieu

cleanned qtbase.bbappend

---
 conf/layer.conf                            |  4 ++++
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 29 +++++++++++++++++++++++++
 recipes-qt/qt5/qtbase_%.bbappend           | 34

------------------------------

Can you clean this up and have two commits: one that adds the qt5 bbappend and one which does the layer trick?

Thanks,
Andrei

#4 lore raw

PATCH 2/4 qt5base: moved the bbappend to a suitable path

---
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 34 ++++++++++++++++++++++++++++++
 recipes-qt/qt5/qtbase_%.bbappend           | 34 ------------------------------
 2 files changed, 34 insertions(+), 34 deletions(-)
 create mode 100644 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
 delete mode 100644 recipes-qt/qt5/qtbase_%.bbappend
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file +34 -0
new file mode 100644
index 0000000..ac158a9
@@ -0,0 +1,34 @@
+
+do_configure_prepend_rpi() {
+	
+	sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
+    if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
+        cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
+QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL} 
+QMAKE_LIBS_EGL = -lEGL -lGLESv2 
+EOF
+
+        if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_DEVICE_INTEGRATION = eglfs_brcm
+EOF
+        else
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
+EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp
+EOF
+        fi
+    fi
+    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+
+
+load(qt_config)
+
+EOF
+}
+
+
+
+
+
recipes-qt/qt5/qtbase_%.bbappend deleted +0 -34
deleted file mode 100644
index ac158a9..0000000
@@ -1,34 +0,0 @@
-
-do_configure_prepend_rpi() {
-	
-	sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
-    if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
-        cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
-QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
-QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL} 
-QMAKE_LIBS_EGL = -lEGL -lGLESv2 
-EOF
-
-        if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
-            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
-EGLFS_DEVICE_INTEGRATION = eglfs_brcm
-EOF
-        else
-            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
-EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
-EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp
-EOF
-        fi
-    fi
-    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
-
-
-load(qt_config)
-
-EOF
-}
-
-
-
-
-
Signature · 1 line
1.9.1
#5 lore raw

PATCH 3/4 layer.conf: avoid to force users to add the qt5 layer because of qtbase bbappend

---
 conf/layer.conf | 4 ++++
 1 file changed, 4 insertions(+)
conf/layer.conf +4 -0
index bea5a65..60f1bcb 100644
@@ -12,3 +12,7 @@ BBFILE_PRIORITY_raspberrypi = "9"
 # Additional license directories.
 LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
 
+# Let us add layer-specific (such as qt5-layer) bbappends which
+# are only applied when that layer is included in our configuration
+BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \
+               for layer in BBFILE_COLLECTIONS.split())}"
Signature · 1 line
1.9.1
#6 lore raw

PATCH 4/4 qtbase bbappend: cleanned recipe

In reply to John Madieu
---
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +3 -8
index ac158a9..8b77bfa 100644
@@ -1,12 +1,12 @@
 
 do_configure_prepend_rpi() {
-	
+
 	sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
     if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
         cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
 QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
-QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL} 
-QMAKE_LIBS_EGL = -lEGL -lGLESv2 
+QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL}
+QMAKE_LIBS_EGL = -lEGL -lGLESv2
 EOF
 
         if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
@@ -27,8 +27,3 @@ load(qt_config)
 
 EOF
 }
-
-
-
-
-
Signature · 1 line
1.9.1
#7 lore raw

Re: [meta-raspberrypi][PATCH 4/4] qtbase bbappend: cleanned recipe

Hi John,

qt5-layer/recipes-qt/qt5/qtbase_%.bbappend line 2

Quoted 13 lines · John Madieu
---
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +0 -0
index ac158a9..8b77bfa 100644
@@ -1,12 +1,12 @@
 
 

I can't follow these patches. Can you squash them to include cleanups and so on and have clean patches sent? As well, can you send them tagged as v2 so I can easily see them?

Quoted 34 lines
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +1 -1
 do_configure_prepend_rpi() {
-
+
        sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
     if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
         cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
 QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads

\$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux

qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +2 -2
-QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL}
-QMAKE_LIBS_EGL = -lEGL -lGLESv2
+QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL}
+QMAKE_LIBS_EGL = -lEGL -lGLESv2
 EOF
 
         if [ -d

${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then

qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +0 -6
@@ -27,8 +27,3 @@ load(qt_config)
 
 EOF
 }
-
-
-
-
-
--

1.9.1

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#8 lore raw

Re: [meta-raspberrypi][PATCH 4/4] qtbase bbappend: cleanned recipe

Quoted 2 lines · Andrei Gherzan

Hi John,

Hello Andrei

Quoted 8 lines · John Madieu
Quoted 6 lines
---
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
Quoted 8 lines

qt5-layer/recipes-qt/qt5/qtbase_%.bbappend line 1

Quoted 6 lines
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +0 -0
index ac158a9..8b77bfa 100644
@@ -1,12 +1,12 @@
 

I can't follow these patches. Can you squash them to include cleanups and so on and have clean patches sent? As well, can you send them tagged as v2 so I can easily see them?

Of course.
I will send you back all patches directly from the beginning, by tagging them all v2

Quoted 35 lines
Quoted 33 lines
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +3 -9
 do_configure_prepend_rpi() {
-
+
        sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
     if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
         cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
 QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
-QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL}
-QMAKE_LIBS_EGL = -lEGL -lGLESv2
+QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL}
+QMAKE_LIBS_EGL = -lEGL -lGLESv2
 EOF
 
         if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
@@ -27,8 +27,3 @@ load(qt_config)
 
 EOF
 }
-
-
-
-
-
--

1.9.1

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Signature · 1 line
John MADIEU |  [email protected]
#9 lore raw

PATCH v2 1/2 qt5: fixed raspberrypi support

Because EGL properties were not defined properly, we always had the following error
make: *** [egl] Error 1
| EGL disabled.
| The EGL functionality test failed; EGL is required by some QPA plugins to manage cont | You might need to modify the include and library search paths by editing QMAKE_INCDIR

This bbappend definitively fix the bug

---
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file +29 -0
new file mode 100644
index 0000000..8b77bfa
@@ -0,0 +1,29 @@
+
+do_configure_prepend_rpi() {
+
+	sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
+    if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
+        cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
+QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL}
+QMAKE_LIBS_EGL = -lEGL -lGLESv2
+EOF
+
+        if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_DEVICE_INTEGRATION = eglfs_brcm
+EOF
+        else
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
+EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp
+EOF
+        fi
+    fi
+    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+
+
+load(qt_config)
+
+EOF
+}
Signature · 1 line
1.9.1
#10 lore raw

PATCH v2 2/2 layer.conf: avoid to force users to add the qt5 layer because of qtbase bbappend

---
 conf/layer.conf | 4 ++++
 1 file changed, 4 insertions(+)
conf/layer.conf +4 -0
index bea5a65..60f1bcb 100644
@@ -12,3 +12,7 @@ BBFILE_PRIORITY_raspberrypi = "9"
 # Additional license directories.
 LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
 
+# Let us add layer-specific (such as qt5-layer) bbappends which
+# are only applied when that layer is included in our configuration
+BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \
+               for layer in BBFILE_COLLECTIONS.split())}"
Signature · 1 line
1.9.1
#11 lore raw

Re: [meta-raspberrypi][PATCH 4/4] qtbase bbappend: cleanned recipe

In reply to john madieu
Quoted 22 lines · john madieu
Quoted 2 lines · Andrei Gherzan

Hi John,

Hello Andrei

Quoted 2 lines

On Mon, Jan 11, 2016 at 3:55 AM, John Madieu <[email protected]>

Quoted 7 lines · wrote:

Review

Quoted 7 lines
---
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
(quoted diff) +0 -0

b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend

Quoted 7 lines

qt5-layer/recipes-qt/qt5/qtbase_%.bbappend line 1

Quoted 5 lines

index ac158a9..8b77bfa 100644

qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +0 -0
@@ -1,12 +1,12 @@
 

I can't follow these patches. Can you squash them to include cleanups

Quoted 7 lines

and so on and have clean patches sent? As well, can you send them tagged as v2 so I can easily see them?
Of course.
I will send you back all patches directly from the beginning, by tagging them all v2

Brilliant. Thank you.

Andrei

#12 lore raw

PATCH v2 1/2 qt5: fixed raspberrypi support

Because EGL properties were not defined properly, we always had the following error
make: *** [egl] Error 1
| EGL disabled.
| The EGL functionality test failed; EGL is required by some QPA plugins to manage cont | You might need to modify the include and library search paths by editing QMAKE_INCDIR

This bbappend definitively fix the bug

---
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file +29 -0
new file mode 100644
index 0000000..8b77bfa
@@ -0,0 +1,29 @@
+
+do_configure_prepend_rpi() {
+
+	sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
+    if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
+        cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
+QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL}
+QMAKE_LIBS_EGL = -lEGL -lGLESv2
+EOF
+
+        if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_DEVICE_INTEGRATION = eglfs_brcm
+EOF
+        else
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
+EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp
+EOF
+        fi
+    fi
+    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+
+
+load(qt_config)
+
+EOF
+}
Signature · 1 line
1.9.1
#13 lore raw

PATCH v2 2/2 layer.conf: avoid to force users to add the qt5 layer because of qtbase bbappend

---
 conf/layer.conf | 4 ++++
 1 file changed, 4 insertions(+)
conf/layer.conf +4 -0
index bea5a65..60f1bcb 100644
@@ -12,3 +12,7 @@ BBFILE_PRIORITY_raspberrypi = "9"
 # Additional license directories.
 LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
 
+# Let us add layer-specific (such as qt5-layer) bbappends which
+# are only applied when that layer is included in our configuration
+BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \
+               for layer in BBFILE_COLLECTIONS.split())}"
Signature · 1 line
1.9.1
#14 lore raw
In reply to John Madieu
Quoted 39 lines · John Madieu

Because EGL properties were not defined properly, we always had the following error
make: *** [egl] Error 1
| EGL disabled.
| The EGL functionality test failed; EGL is required by some QPA plugins to manage cont | You might need to modify the include and library search paths by editing QMAKE_INCDIR

This bbappend definitively fix the bug

---
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file +19 -0
new file mode 100644
index 0000000..8b77bfa
@@ -0,0 +1,29 @@
+
+do_configure_prepend_rpi() {
+
+	sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
+    if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
+        cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
+QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL}
+QMAKE_LIBS_EGL = -lEGL -lGLESv2
+EOF
+
+        if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_DEVICE_INTEGRATION = eglfs_brcm
+EOF
+        else
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
+EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp

qt5-layer/recipes-qt/qt5/qtbase_%.bbappend line 29

Quoted 10 lines
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file +10 -0
+EOF
+        fi
+    fi
+    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+
+
+load(qt_config)
+
+EOF
+}

qtbase fails at compile time:

| compiling .moc/moc_qeglplatformcursor_p.cpp
| /home/andrei/work/yocto/build-rpi-master/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/git/src/widgets/styles/qgtkstyle.cpp:
In member function 'virtual QRect
QGtkStyle::subControlRect(QStyle::ComplexControl, const QStyleOptionComplex*,
QStyle::SubControl, const QWidget*) const':
| /home/andrei/work/yocto/build-rpi-master/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/git/src/widgets/styles/qgtkstyle.cpp:3636:24:
error: 'isInstanceOf' is not a member of 'QStyleHelper'
| } else if (QStyleHelper::isInstanceOf(groupBox->styleObject,
QAccessible::Grouping)) {
| ^
| /home/andrei/work/yocto/build-rpi-master/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/git/src/widgets/styles/qgtkstyle.cpp:3636:74:
error: 'QAccessible' has not been declared
| } else if (QStyleHelper::isInstanceOf(groupBox->styleObject,
QAccessible::Grouping)) {

|                                                                           ^
| Makefile:53048: recipe for target '.obj/qgtkstyle.o' failed
| make[2]: *** [.obj/qgtkstyle.o] Error 1
| make[2]: *** Waiting for unfinished jobs....

How is this supposed to be tested?

--
Andrei Gherzan

#15 lore raw
Quoted 45 lines · Andrei Gherzan
Quoted 44 lines · John Madieu

Because EGL properties were not defined properly, we always had the following error
make: *** [egl] Error 1
| EGL disabled.
| The EGL functionality test failed; EGL is required by some QPA plugins to manage cont | You might need to modify the include and library search paths by editing QMAKE_INCDIR

This bbappend definitively fix the bug

---
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file +24 -0
new file mode 100644
index 0000000..8b77bfa
@@ -0,0 +1,29 @@
+
+do_configure_prepend_rpi() {
+
+     sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
+    if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
+        cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
+QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL}
+QMAKE_LIBS_EGL = -lEGL -lGLESv2
+EOF
+
+        if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_DEVICE_INTEGRATION = eglfs_brcm
+EOF
+        else
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
+EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp
+EOF
+        fi
+    fi
+    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+
Quoted 8 lines

qt5-layer/recipes-qt/qt5/qtbase_%.bbappend line 29

Quoted 5 lines
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file +5 -0
+
+load(qt_config)
+
+EOF
+}

qtbase fails at compile time:

Sorry for that

Quoted 17 lines

| compiling .moc/moc_qeglplatformcursor_p.cpp
| /home/andrei/work/yocto/build-rpi-master/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/git/src/widgets/styles/qgtkstyle.cpp:
In member function 'virtual QRect
QGtkStyle::subControlRect(QStyle::ComplexControl, const QStyleOptionComplex*,
QStyle::SubControl, const QWidget*) const':
| /home/andrei/work/yocto/build-rpi-master/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/git/src/widgets/styles/qgtkstyle.cpp:3636:24:
error: 'isInstanceOf' is not a member of 'QStyleHelper'
| } else if (QStyleHelper::isInstanceOf(groupBox->styleObject,
QAccessible::Grouping)) {
| ^
| /home/andrei/work/yocto/build-rpi-master/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/git/src/widgets/styles/qgtkstyle.cpp:3636:74:
error: 'QAccessible' has not been declared
| } else if (QStyleHelper::isInstanceOf(groupBox->styleObject,
QAccessible::Grouping)) {

Quoted 7 lines
|                                                                           ^
| Makefile:53048: recipe for target '.obj/qgtkstyle.o' failed
| make[2]: *** [.obj/qgtkstyle.o] Error 1
| make[2]: *** Waiting for unfinished jobs....

How is this supposed to be tested?

I finaly reproduced the same error.

I did not have it because during my compilation, I removed "x11" from DISTRO_FEATURES. If you look at qtbase_git.bb, you can see that some of PACKAGECONFIG_X11 features (gtkstyle) depend on "-accessibility" flag.

so I added that flags according to the presence or not of x11 in DISTRO_FEATURES I thus made several test with or without x11, in DISTRO_FEATURES . All succeeded.

The last patch will be plug and play. I'll tag it v3 and everything should works fine now.
But before, I still have some test to do (with mixed distro_features). I will pay more attention this time.

Quoted 2 lines

--
Andrei Gherzan

Signature · 1 line
John MADIEU | [email protected] |
#16 lore raw

PATCH v3 1/2 qt5: fixed raspberrypi support

Because EGL properties were not defined properly, we always had the following error
make: *** [egl] Error 1
| EGL disabled.
| The EGL functionality test failed; EGL is required by some QPA plugins to manage cont | You might need to modify the include and library search paths by editing QMAKE_INCDIR

x11 in DISTRO_FEATURES also produced the following error
error: 'QAccessible' has not been declared
| } else if (QStyleHelper::isInstanceOf(groupBox->styleObject,
QAccessible::Grouping)) {
| ^
|Makefile:53048: recipe for target '.obj/qgtkstyle.o' failed

This bbappend definitively fix these bug

---
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 33 ++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend new file +33 -0
new file mode 100644
index 0000000..f61cd1d
@@ -0,0 +1,33 @@
+
+# Raspberrypi only need gles2
+PACKAGECONFIG_GL = "gles2"
+
+QT_CONFIG_FLAGS_append = "${@base_contains('DISTRO_FEATURES', 'x11', ' -accessibility ', '', d)}"
+do_configure_prepend_rpi() {
+
+	sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
+    if ! grep -q '^EGLFS_' ${S}/mkspecs/linux-oe-g++/qmake.conf; then
+        cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+QMAKE_INCDIR_EGL = \$\$[QT_SYSROOT]${includedir}/interface/vcos/pthreads \$\$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
+QMAKE_INCDIR_OPENGL_ES2 = \$\${QMAKE_INCDIR_EGL}
+QMAKE_LIBS_EGL = -lEGL -lGLESv2
+EOF
+
+        if [ -d ${S}/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm ]; then
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_DEVICE_INTEGRATION = eglfs_brcm
+EOF
+        else
+            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host
+EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp
+EOF
+        fi
+    fi
+    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
+
+
+load(qt_config)
+
+EOF
+}
Signature · 1 line
1.9.1
#17 lore raw

PATCH v3 2/2 layer.conf: avoid to force users to add the qt5 layer because of qtbase bbappend

---
 conf/layer.conf | 4 ++++
 1 file changed, 4 insertions(+)
conf/layer.conf +4 -0
index bea5a65..60f1bcb 100644
@@ -12,3 +12,7 @@ BBFILE_PRIORITY_raspberrypi = "9"
 # Additional license directories.
 LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
 
+# Let us add layer-specific (such as qt5-layer) bbappends which
+# are only applied when that layer is included in our configuration
+BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \
+               for layer in BBFILE_COLLECTIONS.split())}"
Signature · 1 line
1.9.1