[yocto] [meta-raspberrypi][PATCH v2 1/2] qt5: fixed raspberrypi support

john madieu j.madieu at expemb.com
Mon Jan 11 17:55:14 PST 2016


On Mon, Jan 11, 2016 at 9:34 PM, Andrei Gherzan <andrei at gherzan.ro> wrote:
> On Mon, Jan 11, 2016 at 04:46:10PM +0100, John Madieu wrote:
>> 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
>>
>> Signed-off-by: John Madieu <j.madieu at expemb.com>
>> ---
>>  qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 29 +++++++++++++++++++++++++++++
>>  1 file changed, 29 insertions(+)
>>  create mode 100644 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
>>
>> diff --git a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
>> new file mode 100644
>> index 0000000..8b77bfa
>> --- /dev/null
>> +++ b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
>> @@ -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
>> +}
>

> qtbase fails at compile time:
Sorry for that

> | 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?

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.


> --
> Andrei Gherzan
-- 
John MADIEU | j.madieu at expemb.com |



More information about the yocto mailing list