Can't deploy because of compile issues related to NDK?



  • Hi there

    I'm trying to deploy to the calqlatr example (in fact all the android examples seems to have the same error) to my Nexus 5, but I keep getting an error that QtCreator can't compile because of some errors from the android NDK. Namely, stl_relops.h doesn't seem to compile, and initializer_list also throws errors in the build sequence. Output is

    16:39:48: Running steps for project calqlatr...
    16:39:48: Configuration unchanged, skipping qmake step.
    16:39:48: Starting: "/usr/bin/make"
    /home/alex/Android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-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=gnu++0x -g -g -gdwarf-2 -marm -O0 -fno-omit-frame-pointer -Wall -Wno-psabi -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../calqlatr -I. -I/home/alex/qt/5.4/android_armv7/include -I/home/alex/qt/5.4/android_armv7/include/QtQuick -I/home/alex/qt/5.4/android_armv7/include/QtGui -I/home/alex/qt/5.4/android_armv7/include/QtQml -I/home/alex/qt/5.4/android_armv7/include/QtNetwork -I/home/alex/qt/5.4/android_armv7/include/QtCore -I. -isystem /home/alex/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /home/alex/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /home/alex/Android/android-ndk-r10e/platforms/android-9/arch-arm/usr/include -I/home/alex/qt/5.4/android_armv7/mkspecs/android-g++ -o main.o ../calqlatr/main.cpp
    In file included from /home/alex/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/utility:69:0,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/qcompilerdetection.h:890,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/qglobal.h:70,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/qchar.h:37,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/qstring.h:37,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/qdir.h:37,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/QDir:1,
    from ../calqlatr/../../shared/shared.h:40,
    from ../calqlatr/main.cpp:40:
    /home/alex/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_relops.h:67:15: error: expected '{' before '_GLIBCXX_VISIBILITY'
    namespace std _GLIBCXX_VISIBILITY(default)
    ^
    /home/alex/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_relops.h:67:34: error: expected constructor, destructor, or type conversion before '(' token
    namespace std _GLIBCXX_VISIBILITY(default)
    ^
    In file included from /home/alex/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/utility:74:0,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/qcompilerdetection.h:890,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/qglobal.h:70,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/qchar.h:37,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/qstring.h:37,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/qdir.h:37,
    from /home/alex/qt/5.4/android_armv7/include/QtCore/QDir:1,
    from ../calqlatr/../../shared/shared.h:40,
    from ../calqlatr/main.cpp:40:
    /home/alex/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/initializer_list:39:37: error: expected '}' before end of line
    #pragma GCC visibility push(default)
    ^
    /home/alex/Android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/initializer_list:39:37: error: expected declaration before end of line
    make: *** [main.o] Error 1
    16:39:48: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project calqlatr (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.4.2))
    When executing step "Make"
    16:39:48: Elapsed time: 00:00.

    QtCreator Version 3.4.1 open source, using Qt 5.4.2 (GCC 4.6.1)
    NDK version r10e, md5sum is good

    Any help in getting this working is greatly appreciated. Thanks!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.