[Interest] Qt + Android + OpenSSL

rollastre at gmail.com rollastre at gmail.com
Wed Apr 17 09:06:52 CEST 2019


Actually Conan (conan.io) is quite nice for these things once you manage 
to setup a cross-build environment correctly. Normally this is quite 
straight forward. In Android, it also is except for those moments in 
which there are changes in the NDK (removing gcc, upgrading this, 
deprecating that, changing the layout, etc) for which both Conan and 
CMake have to align to and, especially Conan, lags a bit. Changing from 
NDK r18 to NDK r19 was quite painful for me. Many things are changing 
from NDK r18. But at some point a Docker image with support for this was 
released that supports this.

With Conan, you just ask the 3rd parties you need and it will 
install/build them and even set up the .pro file (via an include of a 
conanbuildinfo.pri) for the os/compiler/configuration/runtime you want 
each time, provided there is a recipe (a Python script to download, 
build and package) for them. Many standard libs (as OpenSSL) have 
recipes already prepared for you in the builtin public repositories. And 
you can always make yours when they don't exist yet (or find them in 
GitHub). Then you can even include them in your library via the 
Artifactory version suited for this so that you build them once, publish 
them, and then conan first tries to fetch them.

For instance these are the ones I did build myself in case you prefer 
taking them already built

OpenSSL 1.1.1a for Android/armv7/clang8/Release (ndk r19)
https://tools.iconiqlabs.com/artifactory/conan-local/conan/OpenSSL/1.1.1a/stable/package/0d5d27f219d797566f5bac2a5a6e0f97ba03056d/conan_package.tgz

OpenSSL 1.1.1a for Android/armv8/clang8/Release (ndk r19)
https://tools.iconiqlabs.com/artifactory/conan-local/conan/OpenSSL/1.1.1a/stable/package/2f9e64b2f81be1a1452a2d9ab30d41d21bae9bd8/conan_package.tgz

I verified the one built for armv7 works. I used to build libssh2 
against it and I am using it at a daily basis. The one for armv8 should 
just work as well, but I haven't tried it because none of my devices has 
that such processor.

Regards.

On 15/04/2019 20:41, Nuno Santos wrote:
> Thiago,
>
> Thanks for your insights.
>
> I usually tend to postpone this updates because of the time I need to invest in rebuilding the libs.
>
> I always end up stumbling in some weird building problem…
>
> Does anyone knows what’s the quickest way of building OpenSSL for Android?
>
> Best,
>
> Nuno
>
>> On 15 Apr 2019, at 19:30, Thiago Macieira <thiago.macieira at intel.com> wrote:
>>
>> On Monday, 15 April 2019 11:12:44 PDT Nuno Santos wrote:
>>> I’m providing OpenSSL 1.0.1s as an ANDROID_EXTRA_LIBS param.
>>>
>>> Does anybody know if the problem here is the fact that OpenSSL is too old?
>> Yes, the problem is OpenSSL's age. Yours is apparently too old to support DTLS
>> 1.2 (and apparently DTLS at all).
>>
>> In any case, for OpenSSL, *ANY* version except the very latest[*] is too old.
>> Upgrade now. And next month. And the one after that. Ad aeternam.
>>
>> [*] latest of 1.0.x or of 1.1.x, since 1.0.x is still supported until Dec 31
>> of this year.
>>
>> -- 
>> Thiago Macieira - thiago.macieira (AT) intel.com
>>   Software Architect - Intel System Software Products
>>
>>
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> https://lists.qt-project.org/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest


More information about the Interest mailing list