Priority: P2: Important
Affects Version/s: 5.11, 5.12
Fix Version/s: None
Component/s: Extras: Android
We are about to release a new RetroShare version and I am preparing the build of RetroShare "daemon" as an Android service for this version too (we have it working for last version we released), but the new RetroShare version depends on some more libraries that need modern C++ support and do not compile with NDK older then 17c (both 17c and 18 compile the libraries fine but 16b and older miss some C++ bits), this means that we need to use clang as compiler as GCC is missing or broken on those NDK, so I have successfully compiler Qt 5.12 from git repository with this instructions
Strangely i need to add this -android-toolchain-version 4.9 (that is GCC EABI version) while I would expect that is not needed because i am building with clang otherwise configure fail saying I should specify -android-toolchain-version on the command line, anyway looking at the compile log clang is effectively used, so i didn't bothered too much about that...
Then on QtCreator I have added that Qt version and create the kit with appropriate compiler etc (I have also selected android platform 21 everywhere including in the project page, on the build apk tab and in the android manifest) but then attempting to build the application get a huge amount of errors into the android NDK headers as you can see in the failed-build.log attachment or here https://paste.kde.org/p9ewykuxr#line-965 too
A part from all the fatal error reported on NDK headers that breaks compilation i see this unexpected things in the log:
-D_ANDROID_API_=16 is specified while I have specified 21 anywhere i could...
Is this -gcc-toolchain needed with clang? and what sense it make especially on NDK 18 which release notes says GCC has been removed?
shouldn't it be -std=c++14 ?
And does gnu++14 )... so it doesn't seems the source of the problem...
I have looked a lot on the internet for similar error but didn't find much on how to solve this...
In the IRC channels someone suggested to use cmake instead of qmake but it is not viable for me now as we have a big codebase that uses qmake and then someone else pointed out that cmake could be affected by similar issue with android and clang I post the link here as it may be useful for someone that has deeper knowledge https://github.com/android-ndk/ndk/issues/452#issuecomment-314805599
Thanks for caring!