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. [SOLVED] Building Qt5 for Android on Ubuntu 12.04 LTS 32-bit - Error: bad instruction
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Building Qt5 for Android on Ubuntu 12.04 LTS 32-bit - Error: bad instruction

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 2 Posters 3.2k 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.
  • M Offline
    M Offline
    Mr. David
    wrote on 22 Oct 2013, 16:56 last edited by
    #1

    Hi everyone,

    I am currently trying to build Qt5 for Android on Ubuntu 12.04 LTS.

    Specs:
    Processor Intel® Pentium(R) 4 CPU 3.20GHz
    Memory 3.0 GiB
    OS Type 32-bit

    I used the following instructions:
    http://stackoverflow.com/questions/16313314/how-to-build-qt5-for-android
    http://qt-project.org/wiki/Qt5ForAndroidBuilding

    I am new to Ubuntu, therefore I will describe all steps hoping that someone might find an error.

    1. Set up Ubuntu 12.04 LTS

    2. Install OpenJDK 6
      sudo apt-get install build-essential openjdk-6-jdk

    3. Download SDK, extract SDK, download APIs
      wget http://dl.google.com/android/android-sdk_r22.2.1-linux.tgz
      tar -xf android-sdk_r22.2.1-linux.tgz
      android-sdk-linux/tools/android update sdk --no-ui

    4. Download NDK, extract NDK
      wget http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86.tar.bz2
      tar -xf android-ndk-r8e-linux-x86.tar.bz2

    5. Get git, init repository
      git clone git://gitorious.org/qt/qt5.git qt5
      cd qt5
      perl init-repository --no-webkit

    6. Download Qt Creator and execute .run in order to install
      http://qt-project.org/downloads#qt-creator

    Up to this point, things seem to go smoothly. I can set the Android SDK and NDK path in Qt Creator. Qt Creator warns me that "Qt versions for architectures arm, x86, mips", but I could not find out how to deal with that. Now I try to configure Qt5.

    1. Configure Qt5.
      ./configure
      -developer-build
      -xplatform android-g++
      -nomake tests
      -nomake examples
      -android-ndk /home/david/qt5/android-ndk-r8e
      -android-sdk /home/david/qt5/android-sdk-linux
      -skip qttools
      -skip qttranslations
      -skip qtserialport
      -android-toolchain-version 4.4.3

    This is the result:

    @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.

    Configure summary

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

            - Also available for Linux: linux-kcc linux-icc linux-cxx
    

    Build options:
    Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile debug egl eglfs evdev eventfd freetype full-config getaddrinfo inotify ipv6ifname large-config medium-config minimal-config mremap neon no-harfbuzz no-pkg-config opengl opengles2 pcre png precompile_header private_tests qpa qpa reduce_exports reduce_relocations rpath shared small-config system-zlib 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
    FreeType ............... yes
    Iconv .................. no
    ICU .................... no
    Image formats:
    GIF .................. yes (plugin, using bundled copy)
    JPEG ................. yes (plugin, using bundled copy)
    PNG .................. yes (in QtGui, using bundled copy)
    Glib ................... no
    GStreamer .............. no
    GTK theme .............. no
    Large File ............. no
    libudev ................ no
    Networking:
    getaddrinfo .......... yes
    getifaddrs ........... no
    IPv6 ifname .......... yes
    OpenSSL .............. no
    NIS .................... no
    OpenGL ................. yes (OpenGL ES 2.x)
    OpenVG ................. no
    PCRE ................... yes (bundled copy)
    pkg-config ............. no
    PulseAudio ............. no
    QPA backends:
    DirectFB ............. no
    EGLFS ................ yes
    KMS .................. no
    LinuxFB .............. no
    XCB .................. no
    Session management ..... yes
    SQL drivers:
    DB2 .................. no
    InterBase ............ no
    MySQL ................ no
    OCI .................. no
    ODBC ................. no
    PostgreSQL ........... no
    SQLite 2 ............. no
    SQLite ............... yes (plugin, using bundled copy)
    TDS .................. no
    udev ................... no
    xkbcommon .............. no
    zlib ................... yes (system library)

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

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

    What I am most concerned about are these two lines:
    Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set.
    Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set.
    But there does not seem to be a problem at this point, so I continue.

    1. Run make.
      Running "make" ends printing this error message:

    @
    /tmp/ccD2jh8y.s: Assembler messages:
    /tmp/ccD2jh8y.s:288: Error: bad instruction vmrs r3,fpscr' /tmp/ccD2jh8y.s:335: Error: bad instruction vmsr fpscr,r3'
    make[3]: *** [.obj/debug-shared/qlocale_tools.o] Error 1
    make[3]: Leaving directory /home/david/qt5/qt5/qtbase/src/corelib' make[2]: *** [sub-corelib-make_first] Error 2 make[2]: Leaving directory /home/david/qt5/qt5/qtbase/src'
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory `/home/david/qt5/qt5/qtbase'
    make: *** [module-qtbase-make_first] Error 2
    @

    And I just cannot figure out what I am doing wrong. Any help highly appreciated.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jtrex1337
      wrote on 24 Nov 2014, 20:42 last edited by
      #2

      I get this same issue too, you ever solve this?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jtrex1337
        wrote on 24 Nov 2014, 20:42 last edited by
        #3

        I get this same issue too, you ever solve this?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Mr. David
          wrote on 24 Nov 2014, 22:47 last edited by
          #4

          I was not able to resolve this issue. However I realized that I did not actually need to build Qt as the standard installer worked just fine and I did not need to change any build configuration settings (as I first had thought). I therefore have not investigated this problem any further.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Mr. David
            wrote on 24 Nov 2014, 22:47 last edited by
            #5

            I was not able to resolve this issue. However I realized that I did not actually need to build Qt as the standard installer worked just fine and I did not need to change any build configuration settings (as I first had thought). I therefore have not investigated this problem any further.

            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