Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Compile error vivante on Qt 5.11



  • I'm trying to upgrade our yocto distro to sumo, and use Qt 5.11 or 5.12, i'm getting a compile error trying to build the vivante eglfs plugin. I think I should be a be able to at least build 5.11 based on the boot2qt support.

    /home/dev/app.2/OS/build/tmp/work/cortexa9hf-neon-mx6qdl-fslc-linux-gnueabi/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp: In member function 'virtual void QEglFSVivIntegration::platformInit()':
    /home/dev/app.2/OS/build/tmp/work/cortexa9hf-neon-mx6qdl-fslc-linux-gnueabi/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp:68:41: error: invalid conversion from 'void*' to 'EGLNativeDisplayType {aka wl_display*}' [-fpermissive]
         mNativeDisplay = fbGetDisplayByIndex(framebufferIndex());
                          ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
    /home/dev/app.2/OS/build/tmp/work/cortexa9hf-neon-mx6qdl-fslc-linux-gnueabi/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp: In member function 'virtual wl_egl_window* QEglFSVivIntegration::createNativeWindow(QPlatformWindow*, const QSize&, const QSurfaceFormat&)':
    /home/dev/app.2/OS/build/tmp/work/cortexa9hf-neon-mx6qdl-fslc-linux-gnueabi/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp:91:51: error: invalid conversion from 'void*' to 'EGLNativeWindowType {aka wl_egl_window*}' [-fpermissive]
         EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height());
                                         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    rm -f libibusplatforminputcontextplugin.so
    linking ../../../../plugins/platforminputcontexts/libibusplatforminputcontextplugin.so
    Makefile:1192: recipe for target '.obj/qeglfsvivintegration.o' failed[0_1552007017408_log.do_compile.26046](Uploading 100%) 
    

    I also have some issues building the boot2qt that comes with Qt 11.

    | /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/recipe-sysroot-native/usr/lib/i586-poky-linux/gcc/i586-poky-linux/6.4.0/include/emmintrin.h:1347:1: error: inlining failed in call to always_inline '_mm_extract_epi16(long long __vector(2), int)': target specific option mismatch
    |  _mm_extract_epi16 (__m128i const __A, int const __N)
    |  ^~~~~~~~~~~~~~~~~
    | In file included from /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/corelib/global/qfloat16.cpp:214:0:
    | /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/corelib/global/qfloat16_f16c.c:69:35: note: called from here
    |          out[i] = _mm_extract_epi16(_mm_cvtps_ph(_mm_set_ss(in[i]), 0), 0);
    |                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | In file included from /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/recipe-sysroot-native/usr/lib/i586-poky-linux/gcc/i586-poky-linux/6.4.0/include/immintrin.h:29:0,
    |                  from ../../include/QtCore/5.11.3/QtCore/private/../../../../../../git/src/corelib/tools/qsimd_p.h:191,
    |                  from ../../include/QtCore/5.11.3/QtCore/private/qsimd_p.h:1,
    |                  from /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/corelib/global/qfloat16.cpp:41:
    | /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/recipe-sysroot-native/usr/lib/i586-poky-linux/gcc/i586-poky-linux/6.4.0/include/xmmintrin.h:882:1: error: inlining failed in call to always_inline '_mm_set_ss(float)': target specific option mismatch
    |  _mm_set_ss (float __F)
    |  ^~~~~~~~~~
    | In file included from /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/corelib/global/qfloat16.cpp:214:0:
    | /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/corelib/global/qfloat16_f16c.c:69:35: note: called from here
    |          out[i] = _mm_extract_epi16(_mm_cvtps_ph(_mm_set_ss(in[i]), 0), 0);
    |                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | In file included from /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/recipe-sysroot-native/usr/lib/i586-poky-linux/gcc/i586-poky-linux/6.4.0/include/xmmintrin.h:1249:0,
    |                  from /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/recipe-sysroot-native/usr/lib/i586-poky-linux/gcc/i586-poky-linux/6.4.0/include/immintrin.h:29,
    |                  from ../../include/QtCore/5.11.3/QtCore/private/../../../../../../git/src/corelib/tools/qsimd_p.h:191,
    |                  from ../../include/QtCore/5.11.3/QtCore/private/qsimd_p.h:1,
    |                  from /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/corelib/global/qfloat16.cpp:41:
    | /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/recipe-sysroot-native/usr/lib/i586-poky-linux/gcc/i586-poky-linux/6.4.0/include/emmintrin.h:1347:1: error: inlining failed in call to always_inline '_mm_extract_epi16(long long __vector(2), int)': target specific option mismatch
    |  _mm_extract_epi16 (__m128i const __A, int const __N)
    |  ^~~~~~~~~~~~~~~~~
    | In file included from /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/corelib/global/qfloat16.cpp:214:0:
    | /home/dev/boot2qt-yocto/build/tmp/work/i586-poky-linux/qtbase/5.11.3+gitAUTOINC+08de243eaa-r0/git/src/corelib/global/qfloat16_f16c.c:69:35: note: called from here
    |          out[i] = _mm_extract_epi16(_mm_cvtps_ph(_mm_set_ss(in[i]), 0), 0);
    |                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    

    update1: the boot2qt setup script seems to be why I couldn't build with that. It requires a MACHINE= to be set in the environment but the one in the local.conf didn't match after. It was failing to build on the qemu machine type but once I set that to nitrogen6x I was able to build for both Qt 5.11 and 5.12.

    The boot2qt layer is based on pyro it seems. We are on rocko. I think the biggest difference here is imx-gpu-viv is on 5.0.11 in pyro and 6.2.4 in rocko/sumo.

    update2: Ok seems there is a mistake mabye. Qt 5.11 + 5.12 layers only support sumo/thud. So I was forced to upgrade to sumo. and I had to upgrade our kernel from 4.1 to 4.9 to support the latest vivante package. The boot2qt bsp got around this because pyro doesn't check the layer compatibility. So it seems that LAYERSERIES_COMPAT="sumo thud" is wrong in the qt 5.11 + 5.12 layer.

    I'm rebuilding with 5.12 with our previous version using rocko to see if just adding rocko compatibility will work.

    update3: Got everything "working", I had to make a few small changes. We can't use the pyro boot2qt layer because the gcc is too old.

    qtbase_%bbappend
    SRC_URI_append = "\
            file://0017-permissive.patch \
            "
    
    SRC_URI_remove = " \
            file://0016-Configure-eglfs-with-egl-pkg-config.patch \
        "
    
    00017-permissive.patch
    Index: git/mkspecs/linux-oe-g++/qmake.conf
    ===================================================================
    --- git.orig/mkspecs/linux-oe-g++/qmake.conf
    +++ git/mkspecs/linux-oe-g++/qmake.conf
    @@ -15,8 +15,8 @@ QMAKE_STRIP           = $$(OE_QMAKE_STRI
     include(../common/gcc-base-unix.conf)
    
     # *FLAGS from gcc-base.conf
    -QMAKE_CFLAGS                += $$(OE_QMAKE_CFLAGS)
    -QMAKE_CXXFLAGS              += $$(OE_QMAKE_CXXFLAGS)
    +QMAKE_CFLAGS                += $$(OE_QMAKE_CFLAGS) -fpermissive
    +QMAKE_CXXFLAGS              += $$(OE_QMAKE_CXXFLAGS) -fpermissive
     QMAKE_LFLAGS                += $$(OE_QMAKE_LDFLAGS)
    
     include(../common/g++-unix.conf)
    
    qtmultimedia_%.bbappend
    FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
    
    SRC_URI += "\
            file://compile-fix.patch \
            "
    

    compile-fix.patch

    basically GST_PADDING_INIT = { NULL }, the latest and greatest GCC didn't like initializing a single NULL in {}

    Index: git/src/gsttools/qgstutils.cpp
    ===================================================================
    --- git.orig/src/gsttools/qgstutils.cpp
    +++ git/src/gsttools/qgstutils.cpp
    @@ -1322,7 +1322,7 @@ GstCaps *QGstUtils::videoFilterCaps()
     #endif
             "image/jpeg;"
             "video/x-h264",
    -        GST_PADDING_INIT
    +        NULL
         };
     
         return gst_caps_make_writable(gst_static_caps_get(&staticCaps));
    
    nativesdk-qtbase_%.bbappend
    FILES_${PN}-dev += " \
                ${datadir}/cmake/OEToolchainConfig.cmake.d/OEQt5Toolchain.cmake \
                "
    

Log in to reply