Compilation of Qt 5.8.1 fails
-
I followed these instructions to compile: http://wiki.qt.io/Qt5ForAndroidBuilding
Host system: Gentoo Linux x86_64
Android NDK with GCC 4.9
Android SDK Tools 25.2.5
Android SDK Platform Tools 25.0.4
Android SDK Build Tools 25.0.2./configure -xplatform android-g++ -nomake tests -nomake examples -android-ndk /opt/android-ndk -android-sdk /opt/android-sdk-update-manager -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -no-warnings-are-errors -opensource -confirm-license
Compilation via
gmake -j1
fails with/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove --sysroot=/opt/android-ndk/platforms/android-16/arch-arm/ -Wno-c++0x-compat -O2 -Os -mthumb -std=c++14 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wno-c++0x-compat -Wvla -D_REENTRANT -fPIC -DQT_NO_URL_CAST_FROM_STRING -DQT_NO_INTEGER_EVENT_COORDINATES -DWTF_EXPORT_PRIVATE= -DJS_EXPORT_PRIVATE= -DENABLE_ASSEMBLER_WX_EXCLUSIVE=1 -DWTFReportAssertionFailure=qmlWTFReportAssertionFailure -DWTFReportBacktrace=qmlWTFReportBacktrace -DWTFInvokeCrashHook=qmlWTFInvokeCrashHook -DENABLE_LLINT=0 -DENABLE_DFG_JIT=0 -DENABLE_DFG_JIT_UTILITY_METHODS=1 -DENABLE_JIT_CONSTANT_BLINDING=0 -DBUILDING_QT__ -DWTF_USE_UDIS86=0 -DNDEBUG -DQT_BUILD_QML_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_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Imemory -I. -Icompiler -I. -I../3rdparty/masm/jit -I../3rdparty/masm/assembler -I../3rdparty/masm/runtime -I../3rdparty/masm/wtf -I../3rdparty/masm/stubs -I../3rdparty/masm/stubs/wtf -I../3rdparty/masm -I../3rdparty/masm/disassembler -I../3rdparty/masm/disassembler/udis86 -Ijit -I. -I.generated -Ijsruntime -I. -Idebugger -Ianimations -I../../include -I../../include/QtQml -I../../include/QtQml/5.8.1 -I../../include/QtQml/5.8.1/QtQml -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore/5.8.1 -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore/5.8.1/QtCore -I/home/tboy/Android-QT/qt5/qtbase/include -I/home/tboy/Android-QT/qt5/qtbase/include/QtNetwork -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore -I.moc -isystem /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /opt/android-ndk/platforms/android-16/arch-arm/usr/include -I/home/tboy/Android-QT/qt5/qtbase/mkspecs/android-g++ -o .obj/qqmlstringconverters.o qml/qqmlstringconverters.cpp /opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove --sysroot=/opt/android-ndk/platforms/android-16/arch-arm/ -Wno-c++0x-compat -O2 -Os -mthumb -std=c++14 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wno-c++0x-compat -Wvla -D_REENTRANT -fPIC -DQT_NO_URL_CAST_FROM_STRING -DQT_NO_INTEGER_EVENT_COORDINATES -DWTF_EXPORT_PRIVATE= -DJS_EXPORT_PRIVATE= -DENABLE_ASSEMBLER_WX_EXCLUSIVE=1 -DWTFReportAssertionFailure=qmlWTFReportAssertionFailure -DWTFReportBacktrace=qmlWTFReportBacktrace -DWTFInvokeCrashHook=qmlWTFInvokeCrashHook -DENABLE_LLINT=0 -DENABLE_DFG_JIT=0 -DENABLE_DFG_JIT_UTILITY_METHODS=1 -DENABLE_JIT_CONSTANT_BLINDING=0 -DBUILDING_QT__ -DWTF_USE_UDIS86=0 -DNDEBUG -DQT_BUILD_QML_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_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Imemory -I. -Icompiler -I. -I../3rdparty/masm/jit -I../3rdparty/masm/assembler -I../3rdparty/masm/runtime -I../3rdparty/masm/wtf -I../3rdparty/masm/stubs -I../3rdparty/masm/stubs/wtf -I../3rdparty/masm -I../3rdparty/masm/disassembler -I../3rdparty/masm/disassembler/udis86 -Ijit -I. -I.generated -Ijsruntime -I. -Idebugger -Ianimations -I../../include -I../../include/QtQml -I../../include/QtQml/5.8.1 -I../../include/QtQml/5.8.1/QtQml -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore/5.8.1 -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore/5.8.1/QtCore -I/home/tboy/Android-QT/qt5/qtbase/include -I/home/tboy/Android-QT/qt5/qtbase/include/QtNetwork -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore -I.moc -isystem /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /opt/android-ndk/platforms/android-16/arch-arm/usr/include -I/home/tboy/Android-QT/qt5/qtbase/mkspecs/android-g++ -o .obj/qqmlparserstatus.o qml/qqmlparserstatus.cpp /home/tboy/Android-QT/qt5/qtbase/bin/moc -DQT_NO_URL_CAST_FROM_STRING -DQT_NO_INTEGER_EVENT_COORDINATES -DWTF_EXPORT_PRIVATE= -DJS_EXPORT_PRIVATE= -DENABLE_ASSEMBLER_WX_EXCLUSIVE=1 -DWTFReportAssertionFailure=qmlWTFReportAssertionFailure -DWTFReportBacktrace=qmlWTFReportBacktrace -DWTFInvokeCrashHook=qmlWTFInvokeCrashHook -DENABLE_LLINT=0 -DENABLE_DFG_JIT=0 -DENABLE_DFG_JIT_UTILITY_METHODS=1 -DENABLE_JIT_CONSTANT_BLINDING=0 -DBUILDING_QT__ -DWTF_USE_UDIS86=0 -DNDEBUG -DQT_BUILD_QML_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_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB --include .moc/moc_predefs.h -I/home/tboy/Android-QT/qt5/qtbase/mkspecs/android-g++ -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml/memory -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml/compiler -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml -I/home/tboy/Android-QT/qt5/qtdeclarative/src/3rdparty/masm/jit -I/home/tboy/Android-QT/qt5/qtdeclarative/src/3rdparty/masm/assembler -I/home/tboy/Android-QT/qt5/qtdeclarative/src/3rdparty/masm/runtime -I/home/tboy/Android-QT/qt5/qtdeclarative/src/3rdparty/masm/wtf -I/home/tboy/Android-QT/qt5/qtdeclarative/src/3rdparty/masm/stubs -I/home/tboy/Android-QT/qt5/qtdeclarative/src/3rdparty/masm/stubs/wtf -I/home/tboy/Android-QT/qt5/qtdeclarative/src/3rdparty/masm -I/home/tboy/Android-QT/qt5/qtdeclarative/src/3rdparty/masm/disassembler -I/home/tboy/Android-QT/qt5/qtdeclarative/src/3rdparty/masm/disassembler/udis86 -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml/jit -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml/.generated -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml/jsruntime -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml/debugger -I/home/tboy/Android-QT/qt5/qtdeclarative/src/qml/animations -I/home/tboy/Android-QT/qt5/qtdeclarative/include -I/home/tboy/Android-QT/qt5/qtdeclarative/include/QtQml -I/home/tboy/Android-QT/qt5/qtdeclarative/include/QtQml/5.8.1 -I/home/tboy/Android-QT/qt5/qtdeclarative/include/QtQml/5.8.1/QtQml -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore/5.8.1 -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore/5.8.1/QtCore -I/home/tboy/Android-QT/qt5/qtbase/include -I/home/tboy/Android-QT/qt5/qtbase/include/QtNetwork -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore -I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/include -I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -I/opt/android-ndk/platforms/android-16/arch-arm//usr/include -I/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/include -I/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/include-fixed -I/opt/android-ndk/platforms/android-16/arch-arm/usr/include qml/qqmltypeloader.cpp -o .moc/qqmltypeloader.moc /opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove --sysroot=/opt/android-ndk/platforms/android-16/arch-arm/ -Wno-c++0x-compat -O2 -Os -mthumb -std=c++14 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wno-c++0x-compat -Wvla -D_REENTRANT -fPIC -DQT_NO_URL_CAST_FROM_STRING -DQT_NO_INTEGER_EVENT_COORDINATES -DWTF_EXPORT_PRIVATE= -DJS_EXPORT_PRIVATE= -DENABLE_ASSEMBLER_WX_EXCLUSIVE=1 -DWTFReportAssertionFailure=qmlWTFReportAssertionFailure -DWTFReportBacktrace=qmlWTFReportBacktrace -DWTFInvokeCrashHook=qmlWTFInvokeCrashHook -DENABLE_LLINT=0 -DENABLE_DFG_JIT=0 -DENABLE_DFG_JIT_UTILITY_METHODS=1 -DENABLE_JIT_CONSTANT_BLINDING=0 -DBUILDING_QT__ -DWTF_USE_UDIS86=0 -DNDEBUG -DQT_BUILD_QML_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_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Imemory -I. -Icompiler -I. -I../3rdparty/masm/jit -I../3rdparty/masm/assembler -I../3rdparty/masm/runtime -I../3rdparty/masm/wtf -I../3rdparty/masm/stubs -I../3rdparty/masm/stubs/wtf -I../3rdparty/masm -I../3rdparty/masm/disassembler -I../3rdparty/masm/disassembler/udis86 -Ijit -I. -I.generated -Ijsruntime -I. -Idebugger -Ianimations -I../../include -I../../include/QtQml -I../../include/QtQml/5.8.1 -I../../include/QtQml/5.8.1/QtQml -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore/5.8.1 -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore/5.8.1/QtCore -I/home/tboy/Android-QT/qt5/qtbase/include -I/home/tboy/Android-QT/qt5/qtbase/include/QtNetwork -I/home/tboy/Android-QT/qt5/qtbase/include/QtCore -I.moc -isystem /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /opt/android-ndk/platforms/android-16/arch-arm/usr/include -I/home/tboy/Android-QT/qt5/qtbase/mkspecs/android-g++ -o .obj/qqmltypeloader.o qml/qqmltypeloader.cpp qml/qqmltypeloader.cpp: In function 'bool addTypeReferenceChecksumsToHash(const QList<QQmlTypeData::TypeReference>&, QCryptographicHash*, QQmlEngine*)': qml/qqmltypeloader.cpp:2166:17: error: invalid use of incomplete type 'class QCryptographicHash' hash->addData(unit->data->md5Checksum, sizeof(unit->data->md5Checksum)); ^ In file included from ../../include/QtQml/5.8.1/QtQml/private/qqmlpropertycache_p.h:1:0, from ../../include/QtQml/5.8.1/QtQml/private/../../../../../src/qml/compiler/qv4compileddata_p.h:68, from ../../include/QtQml/5.8.1/QtQml/private/qv4compileddata_p.h:1, from ../../include/QtQml/5.8.1/QtQml/private/../../../../../src/qml/compiler/qqmlirbuilder_p.h:56, from ../../include/QtQml/5.8.1/QtQml/private/qqmlirbuilder_p.h:1, from qml/qqmltypeloader_p.h:70, from qml/qqmltypeloader.cpp:40: ../../include/QtQml/5.8.1/QtQml/private/../../../../../src/qml/qml/qqmlpropertycache_p.h:70:7: error: forward declaration of 'class QCryptographicHash' class QCryptographicHash; ^ qml/qqmltypeloader.cpp:2170:17: error: invalid use of incomplete type 'class QCryptographicHash' hash->addData(propertyCache->checksum(&ok)); ^ In file included from ../../include/QtQml/5.8.1/QtQml/private/qqmlpropertycache_p.h:1:0, from ../../include/QtQml/5.8.1/QtQml/private/../../../../../src/qml/compiler/qv4compileddata_p.h:68, from ../../include/QtQml/5.8.1/QtQml/private/qv4compileddata_p.h:1, from ../../include/QtQml/5.8.1/QtQml/private/../../../../../src/qml/compiler/qqmlirbuilder_p.h:56, from ../../include/QtQml/5.8.1/QtQml/private/qqmlirbuilder_p.h:1, from qml/qqmltypeloader_p.h:70, from qml/qqmltypeloader.cpp:40: ../../include/QtQml/5.8.1/QtQml/private/../../../../../src/qml/qml/qqmlpropertycache_p.h:70:7: error: forward declaration of 'class QCryptographicHash' class QCryptographicHash; ^ gmake[3]: *** [Makefile:44885: .obj/qqmltypeloader.o] Error 1 gmake[3]: Leaving directory '/home/tboy/Android-QT/qt5/qtdeclarative/src/qml' gmake[2]: *** [Makefile:51: sub-qml-make_first-ordered] Error 2 gmake[2]: Leaving directory '/home/tboy/Android-QT/qt5/qtdeclarative/src' gmake[1]: *** [Makefile:46: sub-src-make_first] Error 2 gmake[1]: Leaving directory '/home/tboy/Android-QT/qt5/qtdeclarative' gmake: *** [Makefile:280: module-qtdeclarative-make_first] Error 2
Same problem occurs with
make -j1
and with-platform linux-clang
provided as an option to./configure
.
Similar problem occured with 5.8.0, iirc. I can re-verify on request. Compilation of Qt 5.7.1 works fine.Note: After finishing
./configure
I get a warning: "WARNING: Cross compiling without sysroot. Disabling pkg-config" -
Going to make a guess here since you are using Gentoo..
Do you have the proper cryptographic stuff enabled in your kernel? I don't know if QCryptographicHash relies on anything from there, but that's what makes it a guess. ;)
I say this because I have definitely built Qt for andriod on gentoo before without seeing this issue. Only thing that pops into my header when I looked at the problem.
Edit: Just reread your post and saw the cross compiling without sysroot error. This could be cause it as well if it doesn't have the proper (i.e. compiled for ARM) libs that it needs to build the cryptographic stuff. This is more likely than my above suggestion, and something you should look into before messing with the kernel. Especially now that I realize your target kernel won't be the same anyway since it's on an android device.
-
said in Compilation of Qt 5.8.1 fails:
qqmltypeloader.cpp
I found a workaround. You have to add '#include' line to fix this problem.
In file .../qtdeclarative/src/qml/qml/qqmltypeloader.cpp, at line number 67:#include <QtCore/qcryptographichash.h>