Qt 5.12 and Android arm64 build

Jan Mulder jlmulder at xs4all.nl
Thu Nov 15 01:38:36 PST 2018


On 15-11-2018 01:51, Thiago Macieira wrote:
> On Wednesday, 14 November 2018 13:28:04 PST Jan Mulder wrote:
>> One weird thing I could not solve up to now is an undefined reference from
>> the linker (QtAndroid::runOnAndroidThread); a construct to set the color
>> of the header and footer to our liking.
> 
> That sounds like a mix of two Qt versions, since runOnAndroidThread is defined
> in qjnihelpers.cpp, inside QtCore, without any #if. That is, you're compiling
> against 5.12, but linking (or running) against 5.11. Check your environment.

Did check, and do not find any reference to 5.11 in the build logs, have 
no Qt related environment variables, moved my 5.11 tree away and did a 
full rebuild, and the mobile app is telling in the log: build with 
5.12.0, runtime from 5.12.0. So, while I would like to believe that 
there is something wrong in my environment, I have hard time pinpointing it.

This said, I just found something that seems related. Interfacing using 
Bluetooth using the mobile app crashes. Logcat shows:  AndroidRuntime: 
java.lang.UnsatisfiedLinkError: No implementation found for void 
org.qtproject.qt5.android.bluetooth.QtBluetoot
hBroadcastReceiver.jniOnReceive. So also here, a link time error. 
Obviously, the big question is here: is this an error in the Subsurface 
build process, or is there something missing in Qt 5.12 (as I believe I 
use 5.12, and do not mix up versions). I can not be missing QtCore as 
the app would not run in any way.

> 
>> With Qt 5.12 also a build for arm64 architecture becomes feasible. And I
>> succeeded in a running arm64 app on my device. Also here, relatively
>> straightforward (in hindsight). This requires a newer API that the
>> currently used 16. I used API 21 (corresponding to Android 5.0).
> 
> Note that this will make use of Clang to build, instead of GCC of the older
> SDKs. Clang produces much larger binaries, even at extreme size optimisation
> (-Oz).

This might be true for qmake builds, but I'm sure I build using gcc 
while using API 21 in our cmake style build. I think that up to the 
latest versions of the API, gcc is still possible, but it will be 
removed at some point.

> 
>> So, my question for Dirk: interested in set of patches for all this?
>> Obviously, no hurry here, as 5.12 is still beta. I between I might take
>> a look into clang instead of gcc for the mobile app, as Android had
>> moved away from gcc, and support will end someday.
> 
> The first -rc is expected next week and these days it means any RC could be
> the final release one week later, if nothing major is found. If you have
> issues, please report them so we decide whether the RC is good or not.

I will definitely file a Qt bug when I'm convinced it is not an issue at 
the Subsurface side. But this will require a small demonstrator, and not 
a full blown build of Subsurface-mobile.

--jan


More information about the subsurface mailing list