Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cannot configure Qt 5.3.1 and 5.3.2 for arm cross-compile
Forum Updated to NodeBB v4.3 + New Features

Cannot configure Qt 5.3.1 and 5.3.2 for arm cross-compile

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 2 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eternal_ego
    wrote on last edited by
    #1

    Greetings! I've used Qt 5.2.1 on my embedded linux system and now I want to upgrade it to 5.3.2 (or 5.3.1). Unfortunately, I have encountered some error on configuration stage. Please, take a look into details:

    ( CROSS_COMPILE is defined correctly in environment variables )

    So, I have a modified qmake.conf in /qtbase/mkspecs/linux-arm-gnueabi-g++
    @

    qmake configuration for building with arm-linux-gnueabi-g++

    MAKEFILE_GENERATOR = UNIX
    CONFIG += incremental gdb_dwarf_index
    QMAKE_INCREMENTAL_STYLE = sublib

    include(../common/linux.conf)
    include(../common/gcc-base-unix.conf)
    include(../common/g++-unix.conf)

    QT_QPA_DEFAULT_PLATFORM = eglfs

    modifications to g++.conf

    QMAKE_CC = $${CROSS_COMPILE}gcc
    QMAKE_CXX = $${CROSS_COMPILE}g++
    QMAKE_LINK = $${QMAKE_CXX}
    QMAKE_LINK_SHLIB = $${QMAKE_CXX}

    QMAKE_CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-strict-aliasing
    QMAKE_CXXFLAGS += $$QMAKE_CFLAGS

    QMAKE_LIBDIR += /home/uki/tslib-master/src/.libs/
    /usr/local/lib/

    QMAKE_INCDIR += /home/uki/tslib-master/src/

    QMAKE_LIBS += -licui18n -licuuc -licudata

    QMAKE_INCDIR_OPENGL_ES2 = /media/Work1/dvsdk/graphics-sdk_4.03.00.02/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include
    QMAKE_INCDIR_OPENGL = $$QMAKE_INCDIR_OPENGL_ES2
    QMAKE_INCDIR_X11 = /usr/include/

    QMAKE_LIBDIR_OPENGL_ES2 = /media/Work1/dvsdk/graphics-sdk_4.03.00.02/gfx_rel_es2.x
    QMAKE_LIBDIR_OPENGL = $$QMAKE_LIBDIR_OPENGL_ES2
    QMAKE_LIBDIR_X11 = /usr/local/lib/

    QMAKE_INCDIR_EGL = $$QMAKE_INCDIR_OPENGL
    QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL

    QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um
    QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $$QMAKE_LIBS_EGL
    #QMAKE_LIBS_X11 = -lxcb -lXau

    QMAKE_LIBS_LIBUDEV = -ludev

    modifications to linux.conf

    QMAKE_AR = $${CROSS_COMPILE}ar cqs
    QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
    QMAKE_NM = $${CROSS_COMPILE}nm -P
    QMAKE_STRIP = $${CROSS_COMPILE}strip

    load(qt_config)
    @

    And my configuration script (running on Ubuntu 10.04 LTS 32bit):

    @
    ./configure -prefix /opt/qt-5.3.1/ -xplatform linux-arm-gnueabi-g++ -release -opensource -confirm-license
    -make libs -nomake examples -nomake tests -no-c++11 -shared -accessibility -no-pch -no-largefile
    -qpa eglfs -eglfs -linuxfb -no-audio-backend -sysroot /media/home/root/ubi
    -qt-zlib -qt-libjpeg -qt-libpng -qt-freetype -qt-pcre -opengl es2 -verbose
    -nis -no-cups -no-dbus -no-avx -no-glib -tslib -icu
    -I /home/uki/icu-cross/source/common/ -I /home/uki/icu-cross/source/i18n/ -I /home/uki/icu-cross/source/io/
    -L /home/uki/icu-cross/source/lib
    @

    gcc toolchain for cross-compiling is Sourcery G++ Lite 2010.09-50 (gcc 4.5.1)

    For 5.2.1, it is OK. For 5.3.x, I'm getting error on configuration:
    @
    Determining architecture... ()
    g++ -c -pipe -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-strict-aliasing --sysroot=/media/home/root/ubi -g -Wall -W -fPIE -I../../mkspecs/linux-arm-gnueabi-g++ -I. -I../../../../icu-cross/source/common -I../../../../icu-cross/source/i18n -I../../../../icu-cross/source/io -I../../../../tslib-master/src -o arch.o arch.cpp
    cc1plus: error: unrecognized command line option "-mfpu=neon"
    cc1plus: error: unrecognized command line option "-mfloat-abi=softfp"
    arch.cpp:1: error: bad value (armv7-a) for -march= switch
    arch.cpp:1: error: bad value (cortex-a8) for -mtune= switch
    make: *** [arch.o] Error 1
    Unable to determine architecture!
    @

    I don't understand, why plain g++ was called here instead of arm-none-linux-gnueabi-g++ ... what have I missed in qmake.conf/run script?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you show your call to configure with all the options your gave ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • E Offline
        E Offline
        eternal_ego
        wrote on last edited by
        #3

        Did you mean output? If yes, then sure:

        http://pastebin.com/0XQ9sJ0J

        In addition, "first run" output on clean qt distro

        http://pastebin.com/L1umH47v

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          IIRC you need to something like

          @-device-option CROSS_COMPILE=/opt/gcc-4.7-linaro-gnueabihf/bin/arm-linux-gnueabihf-@

          Update the path for your toolchain

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • E Offline
            E Offline
            eternal_ego
            wrote on last edited by
            #5

            I already have proper CROSS_COMPILE in environments, it works fine for Qt versions 5.2 and below.

            Nevertheless, I've added experimental '-device-option' that you mentioned. Unfortunately, It changes nothing in my case.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Since 5.4 is out, can you check with it ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • E Offline
                E Offline
                eternal_ego
                wrote on last edited by
                #7

                Yes, I've checked it, and there is no difference with 5.3 and 5.4

                In Qt mailing list, there is a suggestion that I would check on monday:

                bq. -mcpu=cortex-a8
                instead of
                -march=armv7-a -mtune=cortex-a8

                1 Reply Last reply
                0
                • E Offline
                  E Offline
                  eternal_ego
                  wrote on last edited by
                  #8

                  UPDATE: unfortunately, change mentioned above don't help.
                  Also, I've tried another toolchain (2011.09-70 instead of 2010.09-50) , whith no effect too.

                  Moreover, I guess these compile options is not the real reason. I have removed them at all, and got a totally confusing log. Looks like compiler cannot found almost anything... Why it works fine with 5.2.1 and fails so in later versions, I don't understand...

                  http://pastebin.com/M6pQJyve

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Looks like you are missing some dependencies for nis

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved