Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67327

qtimageformats fails to build for Android

    XMLWordPrintable

Details

    • 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

      See https://testresults.qt.io/coin/api/results/qt/qtimageformats/696de2c441060e8c6ed53278ff8b76f9f66e63f6/LinuxRHEL_7_4x86_64AndroidAndroid_ANYarmv7GCCqtci-linux-RHEL-7.4-x86_64-2efc6bRelease_DisableTests_OpenGLES2_NoUseGoldLinker/281bde9c68c76ee2ab59bb81630aaf2767763f7a/build_1522038330/log.txt.gz

      /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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              allan.jensen Allan Sandfeld Jensen
              sanurmen Sami Nurmenniemi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes