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. QT5.1 for android compilation error.
Forum Updated to NodeBB v4.3 + New Features

QT5.1 for android compilation error.

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 2 Posters 6.4k 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.
  • P Offline
    P Offline
    plazma
    wrote on last edited by
    #1

    Hi all,

    I'm trying to build QT5 for Android according manual - http://qt-project.org/wiki/Qt5ForAndroidBuilding
    Stage 6 -
    make
    returns error (after a few mins or work) :
    cc1plus: error: unrecognized command line option ‘-mfpu=neon’
    @
    g++ -c -pipe -g -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_LIBUDEV -DQT_NO_XCB -DQT_NO_USING_NAMESPACE -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_USE_BUNDLED_LIBPNG -DQT_NO_EXCEPTIONS -DQT_CORE_LIB -mfpu=neon -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtGui -I../../include/QtGui/5.1.0 -I../../include/QtGui/5.1.0/QtGui -Iimage -I../3rdparty/libpng -I../../include/QtCore -I../../include/QtCore/5.1.0 -I../../include/QtCore/5.1.0/QtCore -I.moc/debug-shared image/qimage_neon.cpp -o .obj/debug-shared/qimage_neon.o
    cc1plus: error: unrecognized command line option ‘-mfpu=neon’
    @

    Host machine is Gentoo Linux x86

    Will appreciate any advice.

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

      Hi,

      It seems you are using a x86 compiler. -mfpu neon concerns ARM processor. If you want to build for Android on ARM you'll need a cross-compiler

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

        I use the manual - http://qt-project.org/wiki/Qt5ForAndroidBuilding

        Stage 5 - is configure
        @./configure -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-ndk <path/to/ndk> -android-sdk <path/to/sdk> -skip qttools -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples-and-demos
        @

        I provide correct paths for Android SDK & NDK.
        I suppose it is compiled with right gcc version. Isn't ?

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

          From what I can see, it uses the linux-g++ mkspec, since you're building for android it should be the android-g++ mkspec, so there is something wrong.

          Did you check that the configuration was successful ?

          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
          • P Offline
            P Offline
            plazma
            wrote on last edited by
            #5

            configuration looks ok, but g++ is running with linux-g++

            What's wrong ?

            @
            Configure summary

            Building on: linux-g++ (i386, CPU features:)
            Building for: android-g++ (arm, CPU features:)

            Build options:
            Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic concurrent cross_compile debug egl eglfs evdev eventfd freetype full-config getaddrinfo inotify ipv6ifname large-config medium-config minimal-config mremap neon no-pkg-config opengl opengles2 pcre png precompile_header private_tests qpa qpa reduce_exports reduce_relocations rpath shared small-config system-zlib v8 v8snapshot warnings_are_errors
            Build parts ............ libs
            Mode ................... debug
            Using C++11 ............ yes
            Using PCH .............. yes
            Target compiler supports:
            iWMMXt/Neon .......... no/yes

            Qt modules and options:
            Qt D-Bus ............... no
            Qt Concurrent .......... yes
            Qt GUI ................. yes
            Qt Widgets ............. yes
            JavaScriptCore JIT ..... no
            QML debugging .......... yes
            Use system proxies ..... no

            Support enabled for:
            Accessibility .......... yes
            ALSA ................... no
            CUPS ................... no
            FontConfig ............. no
            Iconv .................. no
            ICU .................... no
            Image formats:
            GIF .................. plugin
            JPEG ................. plugin (qt)
            PNG .................. yes (qt)
            Glib ................... no
            GStreamer .............. no
            GTK theme .............. no
            Large Files ............ no
            Networking:
            getaddrinfo .......... yes
            getifaddrs ........... no
            IPv6 ifname .......... yes
            OpenSSL .............. no
            NIS .................... no
            OpenGL ................. yes (OpenGL ES 2.x)
            OpenVG ................. no
            PCRE ................... yes (qt)
            pkg-config ............. no
            PulseAudio ............. no
            QPA backends:
            DirectFB ............. no
            EGLFS ................ yes
            KMS .................. no
            LinuxFB .............. no
            XCB .................. no
            Session management ..... auto
            SQL drivers:
            DB2 .................. no
            InterBase ............ no
            MySQL ................ no
            OCI .................. no
            ODBC ................. no
            PostgreSQL ........... no
            SQLite 2 ............. no
            SQLite ............... plugin (qt)
            TDS .................. no
            udev ................... no
            xkbcommon .............. no
            zlib ................... yes (system)

            Qt is now configured for building. Just run 'gmake'.
            Once everything is built, Qt is installed.
            You should not run 'gmake install'.

            Prior to reconfiguration, make sure you remove any leftovers from
            the previous build.

            @

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

              Check your android-g++ mkspec to be sure it's correct

              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
              • P Offline
                P Offline
                plazma
                wrote on last edited by
                #7

                Oh,
                I have files in qt5.../qtbase/mkspecs/android-g++/
                but to be honest I don't know how to check if it's correct.

                I tried to compile qt5.1-alfa and qt5 cloned from the git.

                Results are the same.

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

                  From a quick lookup in the qmake.conf in this folder, I would say that it fails to determine ANDROID_TOOLCHAIN_PREFIX, could you do a verbose configure to see if there are tests that fails ?

                  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