Details
-
Bug
-
Resolution: Done
-
P0: Blocker
-
5.11
-
None
-
dbc983a513a6dff9973490d013b144812ec707aa (qtbase/5.11, 27.3.2018, 5.11B3)
Description
Component qt/qtimageformats fails to build against the latest qtbase on Android. Following build fails:
https://testresults.qt.io/coin/integration/qt/qt5/tasks/1522036584
/opt/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -c -D__ANDROID_API__=16 --sysroot=/opt/android/android-ndk-r10e/platforms/android-16/arch-arm/ -isystem /opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -Os -mthumb -std=c11 -fvisibility=hidden -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../../3rdparty/libwebp -I../../../3rdparty/libwebp/src -I../../../3rdparty/libwebp/src/dec -I../../../3rdparty/libwebp/src/enc -I../../../3rdparty/libwebp/src/dsp -I../../../3rdparty/libwebp/src/mux -I../../../3rdparty/libwebp/src/utils -I../../../3rdparty/libwebp/src/webp -I/opt/android/android-ndk-r10e/sources/android/cpufeatures -I/home/qt/work/install/include -I/home/qt/work/install/include/QtGui -I/home/qt/work/install/include/QtCore -I.moc -I/home/qt/openssl-1.0.2/include -I/home/qt/work/install/mkspecs/android-g++ -o .obj/cpu-features.o /opt/android/android-ndk-r10e/sources/android/cpufeatures/cpu-features.c /opt/android/android-ndk-r10e/sources/android/cpufeatures/cpu-features.c: In function 'get_elf_hwcap_from_proc_self_auxv': /opt/android/android-ndk-r10e/sources/android/cpufeatures/cpu-features.c:534:5: warning: implicit declaration of function 'typeof' [-Wimplicit-function-declaration] int fd = TEMP_FAILURE_RETRY(open(filepath, O_RDONLY)); ^ In file included from /opt/android/android-ndk-r10e/platforms/android-16/arch-arm/usr/include/fcntl.h:34:0, from /opt/android/android-ndk-r10e/sources/android/cpufeatures/cpu-features.c:75: /opt/android/android-ndk-r10e/sources/android/cpufeatures/cpu-features.c:534:14: error: expected ';' before '_rc' int fd = TEMP_FAILURE_RETRY(open(filepath, O_RDONLY)); ^ /opt/android/android-ndk-r10e/sources/android/cpufeatures/cpu-features.c:534:14: error: '_rc' undeclared (first use in this function) int fd = TEMP_FAILURE_RETRY(open(filepath, O_RDONLY)); ^ /opt/android/android-ndk-r10e/sources/android/cpufeatures/cpu-features.c:534:14: note: each undeclared identifier is reported only once for each function it appears in /opt/android/android-ndk-r10e/sources/android/cpufeatures/cpu-features.c:544:19: error: expected ';' before '_rc' int ret = TEMP_FAILURE_RETRY(read(fd, (char*)&entry, sizeof entry));
Last successful build has been:
https://testresults.qt.io/coin/integration/qt/qt5/tasks/1521807092
There the same step says:
/opt/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -c -D__ANDROID_API__=16 --sysroot=/opt/android/android-ndk-r10e/platforms/android-16/arch-arm/ -isystem /opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -Os -mthumb -fvisibility=hidden -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../../3rdparty/libwebp -I../../../3rdparty/libwebp/src -I../../../3rdparty/libwebp/src/dec -I../../../3rdparty/libwebp/src/enc -I../../../3rdparty/libwebp/src/dsp -I../../../3rdparty/libwebp/src/mux -I../../../3rdparty/libwebp/src/utils -I../../../3rdparty/libwebp/src/webp -I/opt/android/android-ndk-r10e/sources/android/cpufeatures -I/home/qt/work/install/include -I/home/qt/work/install/include/QtGui -I/home/qt/work/install/include/QtCore -I.moc -I/home/qt/openssl-1.0.2/include -I/home/qt/work/install/mkspecs/android-g++ -o .obj/cpu-features.o /opt/android/android-ndk-r10e/sources/android/cpufeatures/cpu-features.c
The difference between success and failure is the flag "-std=c11". According to this Android NDK fails to build with that flag:
https://stackoverflow.com/questions/32917185/how-do-i-get-past-ndk-build-failure-in-cpu-features-c
This change has introduced that flag to qtbase:
https://codereview.qt-project.org/#/c/220239/
Attachments
Issue Links
- relates to
-
QTBUG-67326 REG ->5.11/XCB: Applications crash on startup when using -qt-xkbcommon (release only)
- Closed
For Gerrit Dashboard: QTBUG-67327 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
224536,2 | Revert "Detect C standard and try using the most recent" | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |