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 Qt 5.5 for Android on a Ubuntu 64-bit workstation
Forum Updated to NodeBB v4.3 + New Features

[solved] Building Qt 5.5 for Android on a Ubuntu 64-bit workstation

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 2 Posters 3.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.
  • V Offline
    V Offline
    vngthowhing
    wrote on last edited by
    #1

    Hi,
    I'm trying to build Qt 5.5 from source and get the following problem on Ubuntu workstations.
    Note: I tried the same thing with the same source tree on my MacOSX, and it builds fine. The problem seems that
    the builder is using the incorrect compiler (using g++ instead of the correct arm-linux-androidabi-g++). On the Mac, the correct compiler is being used.

    distcc g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp
    -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums
    -DANDROID -Wa,--noexecstack -fno-builtin-memmove -std=c++11 -g -g
    -marm -O0 -fno-omit-frame-pointer -fvisibility=hidden
    -fvisibility-inlines-hidden -Wall -Wno-psabi -W -D_REENTRANT -fPIC
    -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_TSLIB -DQT_NO_USING_NAMESPACE
    -DQT_BUILD_CORE_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
    -DPCRE_HAVE_CONFIG_H -DQT_CORE_LIB -I. -I../../include
    -I../../include/QtCore -I../../include/QtCore/5.5.0
    -I../../include/QtCore/5.5.0/QtCore -Iglobal -I../3rdparty/pcre
    -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4
    -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -isystem
    /home/vngthowhing/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.9/include
    -isystem /home/vngthowhing/android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include
    -isystem /home/vngthowhing/android-ndk-r10d/platforms/android-9/arch-arm/usr/include
    -I../../mkspecs/android-g++ tools/qstring_compat.cpp -o
    .obj/qstring_compat.o
    distcc[22518] (dcc_build_somewhere) Warning: failed to distribute,

    running locally instead
    g++: error: unrecognized command line option ‘-mfloat-abi=softfp’
    g++: error: unrecognized command line option ‘-mfpu=vfp’
    g++: error: unrecognized command line option ‘-marm’

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

      Hi,

      I see distcc here where does it come from ?

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

        I took a look at qt5/qtbase/config.status which I believe is generated by configure:

        #!/bin/sh
        CXX='distcc g++' CC='distcc gcc' /home/vngthowhing/qt5/qtbase/configure -developer-build -opensource -xplatform android-g++ -nomake tests -nomake examples -android-ndk /home/vngthowhing/android-ndk-r10d -android-sdk /home/vngthowhing/android-sdk-linux -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -no-warnings-are-errors -confirm-license "$@"

        .... so I think configure is incorrectly setting CXX and CC incorrectly. However, I don't know where to fix this.

        Victor

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vngthowhing
          wrote on last edited by
          #4

          Okay, with help on the IRC chat #necessitas, I figured out that my CC and CXX were pre-defined (probably by my system adminstrator) as 'distcc gcc' and 'distcc g++' respectively. I had to unset these environment variables and rerun configure and make. Things work now (uses correct arm-based compiler).

          we may need to modify the configure script for Qt to unset CC and CXX if these environment variables are already defined.

          Victor

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

            Nice ! For once it wasn't something to obscure :)

            Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

            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