Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QT5 Cross Compiled from linux-x86 to linux-arm
Forum Updated to NodeBB v4.3 + New Features

QT5 Cross Compiled from linux-x86 to linux-arm

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 3 Posters 8.7k 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.
  • G Offline
    G Offline
    GatoMaster
    wrote on last edited by
    #1

    Hi.

    I'm new with QT and ARM.

    I had success with cross compile qt4 (4.8.5) from linux to linux-arm-gnueabihf-g++ but not with qt5 (5.1.1) (it has some changes).

    I am using:

    Linux x86: Ubuntu 12.04
    QT5 Source: qt-everywhere-opensource-src-5.1.1
    Toolchain: gcc-linaro-arm-linux-gnueabihf-4.7.
    Linux ARM: Ubuntu

    I copied mkspecs/linux-arm-gnueabi-g++ folder to mkspecs/linux-arm-gnueabihf-g++ folder and I have modified qtmake.conf as:

    @#

    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)

    modifications to g++.conf

    QMAKE_CC = arm-linux-gnueabihf-gcc
    QMAKE_CXX = arm-linux-gnueabihf-g++
    QMAKE_LINK = arm-linux-gnueabihf-g++
    QMAKE_LINK_SHLIB = arm-linux-gnueabihf-g++

    modifications to linux.conf

    QMAKE_AR = arm-linux-gnueabihf-ar cqs
    QMAKE_OBJCOPY = arm-linux-gnueabihf-objcopy
    QMAKE_NM = arm-linux-gnueabihf-nm -P
    QMAKE_STRIP = arm-linux-gnueabihf-strip
    load(qt_config)@

    I have some problems with qt5 configure.

    I want develop a QT app with a GUI on Linux x86 (Ubuntu 12.04) and compile for ARM Linux (Ubuntu).

    With QT4 I did a QT4 cross compilation and then I copied this libs to ARM platform with my compiled app and run ok. I have to use -qws to launch it.

    On QT5 there are some changes (QWS has dissapear for example)

    I have some errors with the configure. And I have not clear what may be the proper configuration.

    ./configure -prefix /opt/qt5.1.1-arm -release -make libs -make examples -make tools -xplatform linux-arm-gnueabihf-g++ -no-opengl -confirm-license -opensource -xcb -no-pch -no-kms -v -no-icu

    The errors:

    arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
    arm-linux-gnueabihf-g++: error trying to exec 'cc1plus': execvp: No existe el archivo o el directorio
    Symbol visibility control disabled.
    arm-linux-gnueabihf-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
    arm-linux-gnueabihf-g++: error trying to exec 'cc1plus': execvp: No existe el archivo o el directorio
    Symbolic function binding disabled.

    This is the Qt Open Source Edition.

    You are licensed to use this software under the terms of
    the Lesser GNU General Public License (LGPL) versions 2.1.

    You have already accepted the terms of the license.

    Creating qmake...
    make: No se hace nada para «first».
    Running configuration tests...
    Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set.
    Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set.
    Determining architecture... ()
    arm-linux-gnueabihf-g++ -c -pipe -g -Wall -W -fPIE -I../../mkspecs/linux-arm-gnueabihf-g++ -I. -o arch.o arch.cpp
    arm-linux-gnueabihf-g++: error trying to exec 'cc1plus': execvp: No existe el archivo o el directorio
    Assembler messages:
    Fatal error: invalid -march= option: `armv7-a'
    make: *** [arch.o] Error 1
    Unable to determine architecture!

    Could not determine the target architecture!
    Turn on verbose messaging (-v) to see the final report.
    Determining architecture... ()
    g++ -c -pipe -g -Wall -W -fPIE -I../../mkspecs/linux-g++ -I. -o arch.o arch.cpp
    g++ -o arch arch.o
    { test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]+([0-9]).([0-9]).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'arch' && test -f arch.gdb-index && objcopy --add-section '.gdb_index=arch.gdb-index' --set-section-flags '.gdb_index=readonly' 'arch' 'arch' && rm -f arch.gdb-index || true
    Found architecture in binary
    CFG_HOST_ARCH="i386"
    CFG_HOST_CPUFEATURES=""
    System architecture: 'unknown'
    Host architecture: 'i386'
    C++11 auto-detection... ()
    arm-linux-gnueabihf-g++ -c -pipe -O2 -std=c++0x -Wall -W -fPIE -I../../../mkspecs/linux-arm-gnueabihf-g++ -I. -o c++11.o c++11.cpp
    arm-linux-gnueabihf-g++: error trying to exec 'cc1plus': execvp: No existe el archivo o el directorio
    Assembler messages:
    Fatal error: invalid -march= option: `armv7-a'
    make: *** [c++11.o] Error 1
    C++11 disabled.
    floatmath auto-detection... ()

    ....
    ....
    ....

    xcb disabled.
    The test for linking against libxcb failed!
    You might need to install dependency packages for libxcb.
    See src/plugins/platforms/xcb/README.

    I have instaled the dependency libs on src/plugins/platforms/xcb/README.

    sudo apt-get install libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-sync0 libxcb-sync0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-glx0-dev

    I'm lost, I appreciate any help.

    Thanks.

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

      Hi,

      From a quick overview, you need to get the dependencies for ARM not for x86 and from you error it seems that your cross-compiler is not found (but I may be wrong, I'm not fluent in Italian)

      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
      • crsnC Offline
        crsnC Offline
        crsn
        wrote on last edited by
        #3

        is your xcompiler in your path?
        if not add it, or better, say to the mkspec you are using the complete path to the xcompiler path

        1 Reply Last reply
        0
        • crsnC Offline
          crsnC Offline
          crsn
          wrote on last edited by
          #4

          which means setting

          QMAKE_CC = /complete/path/to/xcompiler-gcc

          and so on :)

          hope it helps

          1 Reply Last reply
          0
          • G Offline
            G Offline
            GatoMaster
            wrote on last edited by
            #5

            Hi,

            My toolchain is on usr/bin

            I tried also with QMAKE_CC = /usr/bin/xcompiler-gcc but I get the same error.

            With Qt4 I had no problem but QT5 seems that is not the same way. Anybody can explain step by step how to make cross compiling I need?

            Thanks for your help.

            1 Reply Last reply
            0
            • crsnC Offline
              crsnC Offline
              crsn
              wrote on last edited by
              #6

              sorry I misread your configuration

              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