Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1415

Includes for android support library missing when building with clang

    XMLWordPrintable

    Details

      Description

      config:

      profiles.android-r16b-qt5-12-0-armv7.Android.ndk.ndkDir: "/home/ablu/Android/android-ndk-r16b"
      profiles.android-r16b-qt5-12-0-armv7.Android.ndk.platform: "android-21"
      profiles.android-r16b-qt5-12-0-armv7.Android.sdk.ndkDir: "/home/ablu/Android/android-ndk-r16b"
      profiles.android-r16b-qt5-12-0-armv7.Android.sdk.sdkDir: "/home/ablu/Android"
      profiles.android-r16b-qt5-12-0-armv7.preferences.qbsSearchPaths: "/home/ablu/.config/QtProject/qbs/1.13.0/profiles/android-r16b-qt5-12-0-armv7-armv7a"
      profiles.android-r16b-qt5-12-0-armv7.qbs.architecture: "armv7a"
      profiles.android-r16b-qt5-12-0-armv7.qbs.targetPlatform: "android"
      profiles.android-r16b-qt5-12-0-armv7.qbs.toolchainType: "clang"
      
      ERROR: /home/ablu/Android/android-ndk-r16b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --sysroot=/home/ablu/Android/android-ndk-r16b/sysroot -g -Os -Wall -Wextra -no-canonical-prefixes -gcc-toolchain /home/ablu/Android/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -target armv7a-none-linux-androideabi -pipe -fexceptions -frtti -fvisibility=default -ffunction-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -fstack-protector-strong -fpic -mfpu=vfpv3-d16 -mfloat-abi=softfp -marm -std=c++11 -fPIC -DDEBUG_NETWORK -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_QML_LIB -DQT_QUICK_LIB -DANDROID -D__ANDROID_API__=21 -I/home/ablu/tales/tales-client/src -I/home/ablu/tales/tales-client/src/enet/include -I/home/ablu/Qt/5.12.0/android_armv7/include -I/home/ablu/Qt/5.12.0/android_armv7/include/QtCore -I/home/ablu/Qt/5.12.0/android_armv7/mkspecs/android-clang -I/home/ablu/tales/tales-client/default/libmana.811ed90a/qt.headers -I/home/ablu/Qt/5.12.0/android_armv7/include/QtCore/5.12.0 -I/home/ablu/Qt/5.12.0/android_armv7/include/QtCore/5.12.0/QtCore -I/home/ablu/Qt/5.12.0/android_armv7/include/QtGui -I/home/ablu/Qt/5.12.0/android_armv7/include/QtNetwork -I/home/ablu/Qt/5.12.0/android_armv7/include/QtQml -I/home/ablu/Qt/5.12.0/android_armv7/include/QtQml/5.12.0 -I/home/ablu/Qt/5.12.0/android_armv7/include/QtQml/5.12.0/QtQml -I/home/ablu/Qt/5.12.0/android_armv7/include/QtQuick -isystem /home/ablu/Android/android-ndk-r16b/sysroot/usr/include/arm-linux-androideabi -isystem /home/ablu/Android/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include -isystem /home/ablu/Android/android-ndk-r16b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include -std=c++11 -o /home/ablu/tales/tales-client/default/libmana.811ed90a/01a4c628bf98d409/chatclient.cpp.o -c /home/ablu/tales/tales-client/src/mana/chatclient.cpp
      
      ERROR: In file included from /home/ablu/tales/tales-client/src/mana/chatclient.cpp:26:
      In file included from /home/ablu/Android/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/iostream:40:
      In file included from /home/ablu/Android/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/istream:163:
      In file included from /home/ablu/Android/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/ostream:140:
      /home/ablu/Android/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/locale:807:12: error: use of undeclared identifier 'strtof_l'
          return strtof_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
                 ^
      /home/ablu/Android/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/locale:813:12: error: use of undeclared identifier 'strtod_l'; did you mean 'strtold_l'?
          return strtod_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
                 ^
      /home/ablu/Android/android-ndk-r16b/sysroot/usr/include/stdlib.h:237:13: note: 'strtold_l' declared here
      long double strtold_l(const char* __s, char** __end_ptr, locale_t __l) __INTRODUCED_IN(21);
                  ^
      2 errors generated.
      ERROR: Process failed with exit code 1.
      

      This hack fixes it (but is a hack):

      diff --git a/share/qbs/modules/cpp/android-gcc.qbs b/share/qbs/modules/cpp/android-gcc.qbs
      index e20f1e198..707eeee57 100644
      --- a/share/qbs/modules/cpp/android-gcc.qbs
      +++ b/share/qbs/modules/cpp/android-gcc.qbs
      @@ -178,6 +178,7 @@ LinuxGCC {
                   else
                       includes.push(FileInfo.joinPaths(llvmStlBaseDir, "libcxx", "include"));
                   includes.push(FileInfo.joinPaths(llvmStlBaseDir + "abi", "libcxxabi", "include"));
      +            includes.push(cxxStlBaseDir + "/../android/support/include");
               }
               return includes;
           }
      

        Attachments

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

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            ablu Erik Schilling
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes