[solved] Building Qt 5.5 for Android on a Ubuntu 64-bit workstation
-
wrote on 26 Feb 2015, 22:37 last edited by
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’ -
Hi,
I see distcc here where does it come from ?
-
wrote on 27 Feb 2015, 05:28 last edited by
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
-
wrote on 27 Feb 2015, 07:22 last edited by
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
-
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 :)
1/5