[Solved] Qt 5.4.0 for i.MX6 - Configuration Failure



  • Hi all,

    I'm trying to build Qt 5.4.0 for the i.MX6 and am having some issues right out of the gate with configuration. I have a rootfs built from the FSL Yocto BSP (Dizzy) that I am using. It is an unmodified rootfs built from the fsl-image-multimedia image and contains libraries and headers for GLES2, EGL, GAL, etc.

    I am using the 2013.10 Linaro HF toolchain: @gcc-linaro-arm-linux-gnueabihf-4.8-2013.10@

    Here is my qmake.conf file (mostly the same as the default one but included flags for OpenGL stuff):

    @include(../common/linux_device_pre.conf)

    EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_imx6.cpp

    QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include
    QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib

    QMAKE_INCDIR_OPENGL = $$[QT_SYSROOT]/usr/include/GL
    QMAKE_LIBDIR_OPENGL = $$[QT_SYSROOT]/usr/lib
    QMAKE_INCDIR_OPENGL_ES2 = $$[QT_SYSROOT]/usr/include/GLES2
    QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/usr/lib
    QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/usr/include/GL
    QMAKE_LIBDIR_EGL = $$[QT_SYSROOT]/usr/lib

    QMAKE_LIBS_EGL += -lEGL
    QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
    QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL

    QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib

    IMX6_CFLAGS = -march=armv7-a -mfpu=neon -mfloat-abi=hard -DLINUX=1 -DEGL_API_FB=1
    QMAKE_CFLAGS += $$IMX6_CFLAGS
    QMAKE_CXXFLAGS += $$IMX6_CFLAGS

    include(../common/linux_arm_device_post.conf)

    load(qt_config)@

    And my configure line:

    @configure -v -opensource -confirm-license
    -device imx6
    -device-option CROSS_COMPILE=/opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-
    -no-pch
    -no-xcb
    -opengl es2
    -make libs
    -sysroot /projects/client/imx6/rootfs -no-gcc-sysroot
    -prefix /opt/qt-5.4.0-imx6@

    The configuration is failing with the following errors:

    @OpenGL ES 2.0 auto-detection... ()
    /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mfpu=neon -mfloat-abi=hard -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=softfp -O2 -Wall -W -fPIE -I/opt/qt-everywhere-opensource-src-5.4.0/qtbase/mkspecs/devices/linux-imx6-g++ -I/opt/qt-everywhere-opensource-src-5.4.0/qtbase/config.tests/unix/opengles2 -I/projects/client/imx6/rootfs/usr/include/libdrm -I/projects/client/imx6/rootfs/usr/include/GLES2 -I/projects/client/imx6/rootfs/usr/include -I. -o opengles2.o /opt/qt-everywhere-opensource-src-5.4.0/qtbase/config.tests/unix/opengles2/opengles2.cpp
    /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/projects/client/imx6/rootfs/usr/lib -Wl,-O1 -o opengles2 opengles2.o -L/projects/client/imx6/rootfs/usr/lib -lGLESv2 -lEGL -lGAL
    /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find /lib/libc.so.6
    /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find /usr/lib/libc_nonshared.a
    /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find /lib/ld-linux-armhf.so.3
    collect2: error: ld returned 1 exit status
    make: *** [opengles2] Error 1
    OpenGL ES 2.0 disabled.
    The OpenGL ES 2.0 functionality test failed!
    You might need to modify the include and library search paths by editing
    QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
    /opt/qt-everywhere-opensource-src-5.4.0/qtbase/mkspecs/devices/linux-imx6-g++.@

    Note that all of those libraries exist in paths that are included on the g++ line:

    @user@ubuntu:/projects/client/imx6/rootfs$ find . -name "libc.so.6"
    ./lib/libc.so.6
    user@ubuntu:/projects/client/imx6/rootfs$ find . -name "libc_nonshared.a"
    ./usr/lib/libc_nonshared.a
    user@ubuntu:/projects/client/imx6/rootfs$ find . -name "ld-linux-armhf.so.3"
    ./lib/ld-linux-armhf.so.3@

    Any ideas?



  • Why are you using -no-gcc-sysroot ?



  • This note is in the beginning of the devices/linux-imx6-g++/qmake.conf file shipped with the 5.4.0 source package:

    @# This mkspec is based and tested on the ltib-source-release 3.0.15

    Building ltib including glib, gpu-drivers and what ever you want to use (e.g. dbus or fontconfig)

    This mkspec is tested with a framebuffer (eglfs) configuration (not testes with X11)

    A typical configure line looks like:

    /home/tsenyk/qt5/qt5/configure -opensource -confirm-license -make libs -device imx6 \

    -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- \

    -sysroot <path-to-your-ltib-install>/rootfs -no-gcc-sysroot \

    -prefix /usr/local/Qt-5.0.0/Qt5-imx6-1

    NOTE: currently ltib doesn't produce a proper staging/sysroot-filessystem.

    If gcc's --sysroot is used, the toolchain doesn't find basic binaries (e.g. crt1.o),

    therefore you have to pass -no-gcc-sysroot to configure if you pass -sysroot to configure!@

    I tried without the -no-gcc-sysroot flag and I get the following errors:

    @/opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mfpu=neon -mfloat-abi=hard -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=softfp --sysroot=/projects/vgo/imx6/rootfs -O2 -Wall -W -fPIE -I/opt/qt-everywhere-opensource-src-5.4.0/qtbase/mkspecs/devices/linux-imx6-g++ -I/opt/qt-everywhere-opensource-src-5.4.0/qtbase/config.tests/unix/opengles2 -I/projects/vgo/imx6/rootfs/usr/include/libdrm -I/projects/vgo/imx6/rootfs/usr/include/GLES2 -I/projects/vgo/imx6/rootfs/usr/include -I. -o opengles2.o /opt/qt-everywhere-opensource-src-5.4.0/qtbase/config.tests/unix/opengles2/opengles2.cpp
    In file included from /projects/vgo/imx6/rootfs/usr/include/features.h:402:0,
    from /projects/vgo/imx6/rootfs/usr/include/stdint.h:25,
    from /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/lib/gcc/arm-linux-gnueabihf/4.8.2/include/stdint.h:9,
    from /projects/vgo/imx6/rootfs/usr/include/KHR/khrplatform.h:141,
    from /projects/vgo/imx6/rootfs/usr/include/GLES2/gl2platform.h:20,
    from /projects/vgo/imx6/rootfs/usr/include/GLES2/gl2.h:6,
    from /opt/qt-everywhere-opensource-src-5.4.0/qtbase/config.tests/unix/opengles2/opengles2.cpp:37:
    /projects/vgo/imx6/rootfs/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory

    include <gnu/stubs-soft.h>@



  • Add DISTRO_OPTS += hard-float to that qmake.conf. You are now tareting softfp but the toolchain is for hard float.



  • I saw that in a thread [http://qt-project.org/forums/viewthread/22959] and already made that change. It correctly sets the -mfloat-abi flag to hard in the build line... but no change in the errors I'm seeing.

    @Determining architecture... ()
    /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard -g -Wall -W -fPIE -I../../../../qt-everywhere-opensource-src-5.4.0/qtbase/mkspecs/devices/linux-imx6-g++ -I../../../../qt-everywhere-opensource-src-5.4.0/qtbase/config.tests/arch -I/projects/client/imx6/rootfs/usr/include -I. -o arch.o ../../../../qt-everywhere-opensource-src-5.4.0/qtbase/config.tests/arch/arch.cpp
    /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/projects/client/imx6/rootfs/usr/lib -o arch arch.o -L/projects/client/imx6/rootfs/usr/lib
    /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find /lib/libc.so.6
    /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find /usr/lib/libc_nonshared.a
    /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find /lib/ld-linux-armhf.so.3
    collect2: error: ld returned 1 exit status
    make: *** [arch] Error 1
    Unable to determine architecture!@

    I have also tried to add the paths to those libraries in the toolchain to the QMAKE_LIBDIR flags:

    @QMAKE_LIBDIR += /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/lib
    QMAKE_LIBDIR += /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/arm-linux-gnueabihf/lib
    QMAKE_LIBDIR += /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/arm-linux-gnueabihf/libc/lib
    QMAKE_LIBDIR += /opt/ti/linaro/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10/arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf@

    But the errors persists.



  • Is this with -no-gcc-sysroot? The error shown there is clearly about gcc being confused since it tries to include softfp stuff.

    /projects/vgo/imx6/rootfs/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory



  • No, my latest reply was a configure execution that contained -no-gcc-sysroot.

    But I just ran a configure that omitted that flag AND had the corrected DISTRO_OPTS flag set in the qmake.conf and the configuration completed. I'm now in on to the make.

    Thanks for the help troubleshooting, agocs. Marking this thread as solved.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.