Important: Please read the Qt Code of Conduct -

Is it possible to build Qt5 with QT_COORD_TYPE=double for Android ARM? (SOLVED)

  • Trying to build Qt5 from sources with qreal as double instead of float for ARM platform.

    I've got an error:

    @cd gui/ && ( test -e Makefile || /home/user/Qt5.1.1/5.1.1/android_armv7_double/qtbase/bin/qmake /home/user/Qt5.1.1/5.1.1/android_armv7_double/qtbase/src/gui/ -o Makefile ) && make -f Makefile
    make[3]: Entering directory `/home/user/Qt5.1.1/5.1.1/android_armv7_double/qtbase/src/gui'
    /home/user/Android/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/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 -std=gnu++0x -g -g -marm -O0 -fno-omit-frame-pointer -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wno-psabi -W -D_REENTRANT -fPIC -DQT_NO_PRINTDIALOG -DQT_NO_LIBUDEV -DQT_NO_XCB -DQT_NO_XKBCOMMON -DQT_COORD_TYPE=double -DQT_NO_USING_NAMESPACE -DQT_BUILD_GUI_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_USE_BUNDLED_LIBPNG -DQT_NO_EXCEPTIONS -DQT_CORE_LIB -mfpu=neon -I../../mkspecs/android-g++ -I. -I../../include -I../../include/QtGui -I../../include/QtGui/5.1.1 -I../../include/QtGui/5.1.1/QtGui -Iimage -I../3rdparty/libpng -I../../include/QtCore -I../../include/QtCore/5.1.1 -I../../include/QtCore/5.1.1/QtCore -I.moc/debug-shared -I/home/user/Android/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.8/include -I/home/user/Android/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I/home/user/Android/android-ndk-r9/platforms/android-9/arch-arm/usr/include painting/qdrawhelper_neon.cpp -o .obj/debug-shared/qdrawhelper_neon.o
    In file included from ../../include/QtGui/5.1.1/QtGui/private/qdrawhelper_p.h:1:0,
    from painting/qdrawhelper_neon.cpp:42:
    ../../include/QtGui/5.1.1/QtGui/private/../../../../../src/gui/painting/qdrawhelper_p.h: In instantiation of 'static void QRadialFetchSimd<Simd>::fetch(uint*, uint*, const Operator*, const QSpanData*, qreal, qreal, qreal, qreal, qreal) [with Simd = QSimdNeon; uint = unsigned int; qreal = double]':
    ../../include/QtGui/5.1.1/QtGui/private/../../../../../src/gui/painting/qdrawhelper_p.h:440:98: required from 'const uint* qt_fetch_radial_gradient_template(uint*, const Operator*, const QSpanData*, int, int, int) [with RadialFetchFunc = QRadialFetchSimd<QSimdNeon>; uint = unsigned int]'
    painting/qdrawhelper_neon.cpp:995:106: required from here
    ../../include/QtGui/5.1.1/QtGui/private/../../../../../src/gui/painting/qdrawhelper_p.h:503:94: error: call of overloaded 'v_dup(qreal)' is ambiguous
    const typename Simd::Float32x4 v_delta_delta_det16 = Simd::v_dup(16 * delta_delta_det);
    ../../include/QtGui/5.1.1/QtGui/private/../../../../../src/gui/painting/qdrawhelper_p.h:503:94: note: candidates are:
    painting/qdrawhelper_neon.cpp:967:29: note: static QSimdNeon::Float32x4 QSimdNeon::v_dup(float)
    static inline Float32x4 v_dup(float x) { return vdupq_n_f32(x); }
    painting/qdrawhelper_neon.cpp:969:27: note: static QSimdNeon::Int32x4 QSimdNeon::v_dup(uint)
    static inline Int32x4 v_dup(uint x) { return vdupq_n_s32(x); }
    make[3]: *** [.obj/debug-shared/qdrawhelper_neon.o] Error 1

    Any ideas? Thanks.

  • I've tried to configure and build Qt with qreal as double. But got an compilation error.
    Is someone used QT_COORD_TYPE=double before?

  • welcome to devnet

    You need to wait probably a bit more time for answers. -"See your other post on basically the same topic."-
    Android version is already used, but the contributions are still a bit slow in the forum.

    [edit, decided to merge the posts later, koahnig]

  • The problem is solved.
    I don't know is it correct way, but I've made changes in qdrawhelper_p.h and it works for me now.

    Should I report this bug?

  • Looks like it is a good idea to search for a bug report on "JIRA":
    Especially when you have found a workaround you can add to existing bug reports. If there is no report filed, file a new one.

  • The bug was reported on JIRA. Hope that fix will be included in next release.

Log in to reply