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. Error when building Qt for ARM
Forum Update on Monday, May 27th 2025

Error when building Qt for ARM

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

    Hi,

    I'm trying to build qt-everywhere-commercial-src-4.7.3 (with a commercial evaluation license) on Ubuntu 11.04 for an embedded linux system (ARM11). I've been roughly following this guide: http://developer.qt.nokia.com/wiki/Building_Qt_for_Embedded_Linux

    I've successfully done the host build but am now having problems with the target build.

    What I have done so far:

    • Cross-compiled libts with arm-linux-gnueabi-gcc and modified qmake.conf for the linux-arm-gnueabi-g++ mkspec to add the paths to the include and lib directories for this libts build.

    • The following configure command:
      @./configure -xplatform qws/linux-arm-gnueabi-g++ -embedded arm
      -qt-gfx-linuxfb -qt-gfx-vnc
      -no-largefile -exceptions -no-accessibility -no-qt3support -no-sse2 -qt-zlib -no-gif -no-libtiff
      -qt-libpng -no-libmng -qt-libjpeg -no-openssl -no-nis -no-cups -depths 16
      -qt-kbd-linuxinput -nomake demos -nomake examples
      -qt-mouse-linuxinput -qt-mouse-tslib
      -confirm-license -silent@

    • I execute make and it fails part way through:

    @
    arm-linux-gnueabi-g++ -c -include .pch/release-shared-emb-arm/QtCore -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_EDITION=QT_EDITION_DESKTOP -DQT_EVAL -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DELF_INTERPRETER="/lib/ld-linux.so.2" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -I../../mkspecs/qws/linux-arm-gnueabi-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -Iglobal -I.moc/release-shared-emb-arm -I/home/anh/tslib-arm/include -o .obj/release-shared-emb-arm/qsocketnotifier.o kernel/qsocketnotifier.cpp
    {standard input}: Assembler messages:
    {standard input}:1710: Error: selected processor does not support Thumb mode `swp r6,r4,[r3]'
    @

    a little further down

    @
    make[1]: *** [.obj/release-shared-emb-arm/qobject.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/home/anh/qt-everywhere-commercial-src-4.7.3/src/corelib'
    make: *** [sub-corelib-make_default-ordered] Error 2
    @

    How can I resolve this? I feel as though this bug is relevant to my problem: http://bugreports.qt.nokia.com/browse/QTBUG-15911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel#issue-tabs, but I don't understand enough to be sure or know if I can use a workaround. Any help would be appreciated!

    Thanks

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      Welcome to this forum

      You probably need to check the source code file "kernel/qsocketnotifier.cpp" for some preprocessor if around the point error. This might give some hints, what is going wrong.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • A Offline
        A Offline
        anht
        wrote on last edited by
        #3

        Thanks koahnig.

        I had a look at this file and I didn't see anything that seemed useful to me.

        I think my problem relates to the identified issue here:
        https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/490371
        https://bugreports.qt.nokia.com//browse/QTBUG-16402
        and also
        https://bugs.launchpad.net/ubuntu/+source/gcc-4.4-armel-cross/+bug/683832

        I tried the -marm workaround suggested in that last link by adding the following lines to make qmake.conf
        @QMAKE_CFLAGS = -marm
        QMAKE_CXXFLAGS = $$QMAKE_CFLAGS@

        which now makes it fail with the following errors:
        @image/qimage_neon.cpp: In function ‘void qt_convert_rgb888_to_rgb32_neon(quint32*, const uchar*, int)’:
        image/qimage_neon.cpp:47:18: error: ‘uint8x8_t’ does not name a type
        image/qimage_neon.cpp:63:23: error: ‘fullVector’ was not declared in this scope@
        ...
        @In file included from painting/qdrawhelper_neon.cpp:31:0:
        /usr/lib/gcc/arm-linux-gnueabi/4.5.2/include/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h@

        I'll try to look a bit further into resolving this new error but it seems to be something specific to compiling for ARM.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          Hi

          at the moment there is not a lot I can do to assist you in this problem. This is outside of my experience.

          However, I have noted something in the information you have provided.

          Initially you started out with Qt4.7.3 in the first post.
          Here
          [quote author="anht" date="1311320790"]
          @In file included from painting/qdrawhelper_neon.cpp:31:0:
          /usr/lib/gcc/arm-linux-gnueabi/4.5.2/include/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h@
          [/quote]
          the error message refers to version 4.5.2.

          Could it be that you are dealing with a mix of different Qt version?
          You might want to check this and ensure that you are using only one specific version.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • A Offline
            A Offline
            anht
            wrote on last edited by
            #5

            Thanks, but the 4.5.2 refers to the version of the arm-linux-gnueabi compiler I am using, not Qt.

            1 Reply Last reply
            0
            • N Offline
              N Offline
              nddvn2008
              wrote on last edited by
              #6

              Hi everybody.

              I faced errors when trying to build qt-everywhere-opensource-src-4.7.2 on Ubuntu 11.04. please help me solve it.

              ./configure --prefix=/opt/qte --prefix=/opt/qte -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -release -opensource -shared -fast -no-largefile -qt-sql-sqlite -no-mmx -no-sse -no-sse2 -no-3dnow -qt-zlib -no-libtiff -qt-libpng -no-libmng -qt-libjpeg -no-openssl -silent -no-nis -confirm-license -depths 16,18,24 -optimized-qmake -no-xcursor -qt-freetype -little-endian -host-little-endian -no-qt3support -no-qvfb -no-phonon -no-cups -no-glib -no-xfixes -no-xrandr -no-xrender -no-xkb -no-sm -no-xinerama -no-xshape -no-xfixes -no-separate-debug-info -nomake examples -nomake tools -nomake docs -no-gfx-qvfb -no-mouse-qvfb -qt-kbd-qvfb -qt-kbd-tty -qt-mouse-tslib

              when I use "make" command, the fault appears:
              arm-none-linux-gnueabi-g++: cannot specify -o with -c or -S with multiple files
              make[1]: *** [.pch/release-shared-emb-arm/corelib.gch/c++] Error 1
              make[1]: Leaving directory `/home/jack/qt-everywhere-opensource-src-4.7.2/src/corelib'
              make: *** [sub-corelib-make_default-ordered] Error 2

              - I've configured the qws/linux-arm-gnueabi-g++/qmake.conf :

              include(../../common/g++.conf)

              include(../../common/linux.conf)

              include(../../common/qws.conf)

              QMAKE_CC = /usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc

              QMAKE_CXX = /usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++

              QMAKE_LINK = /usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++

              QMAKE_LINK_SHLIB = /usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++

              QMAKE_AR = /usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-ar cqs

              QMAKE_OBJCOPY = /usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-objcopy

              QMAKE_STRIP = /usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-strip

              QMAKE_INCDIR += /opt/tslib/include

              QMAKE_LIBDIR += /opt/tslib/lib

              Load(qt_config)

              I need your help. Thanks a lot.

              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