Problem with openSSL and Qt 6.5.0 beta 2
-
Until this morning, my application was working normally on Android. But since the update from Qt 6.5.0 beta1 to beta2, internet access is not possible anymore...
I get the error message :
E linker : library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/~~Wx3e7tnLLjpOOU6Qk_lGUw==/net.winstars3.test-ZPEUq_vkP5poICf2sCM8ew==/lib/arm64/libQt6Core_arm64-v8a.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/~~Wx3e7tnLLjpOOU6Qk_lGUw==/net.winstars3.test-ZPEUq_vkP5poICf2sCM8ew==/lib/arm64:/data/app/~~Wx3e7tnLLjpOOU6Qk_lGUw==/net.test-ZPEUq_vkP5poICf2sCM8ew==/base.apk!/lib/arm64-v8a", permitted_paths="/data:/mnt/expand:/data/data/net.winstars3.test"] W qt.tlsbackend.ossl: : Failed to load libssl/libcrypto.
After reading this article on the blog (https://www.qt.io/blog/moving-to-openssl-3-in-binary-builds-starting-from-qt-6.5-beta-2) , I compiled in shared the openssl 3.0.7 library for Android, with success, but I still get the same error message.
But how to know with which version of openssl Qt 6.5.0 beta2 has been compiled ?
What can I do?
Thank you for your help!
-
I guess libcrypto.so is not added to your apk. You can manually check if your apk has it or not.
https://stackoverflow.com/questions/3599210/how-to-view-the-contents-of-an-android-apk-fileI have something like in my pro file for Qt5.
LIBS += $$ANDROID_SDK_ROOT/android_openssl/latest/arm64/libcrypto_1_1.so
ANDROID_EXTRA_LIBS += $$ANDROID_SDK_ROOT/android_openssl/latest/arm64/libcrypto_1_1.so -
Hi JoeCFD,
I have just checked following your method and there are libraries libcrypto.so and libssl.so included in the apk file (and they are in the right format: arm64_v8a).
But, is this new Qt 6.5.0 beta2 version now incompatible with openssl 1.1 because I just tried with openssl1.1 and it doesn't work any more? -
This post is deleted!
-
-
Thanks JoeCDF for the hints, but I had already followed these explanations for the previous version of my program, and everything worked correctly.
I just have the impression that there was a change with Qt 6.5.0 beta2... but what...?The error message is not very explicit. How can I find out more about what's wrong?
-
@Francky033 then do not use Qt 6.5.0 and try the version which works. Not the latest version is the best. I have not switched to Qt6.
-
@Francky033 I have the same issue, have you found a workaround or post a ticket on bug tracker ?
-
@Francky033 you should oben a bugreport - so Qt knows about problem in 6.5 Beta
-
I open the bug report : https://bugreports.qt.io/browse/QTBUG-110915
@Francky033 Please feel free to add comments about your try with openssl 3 -
ok @Lilde !
-
It works in the end! In fact, you have to rename libcryto.so to libcrypto_3.so and libssl.so to libssl_3.so
Thanks to all !
-
@Francky033 said in Problem with openSSL and Qt 6.5.0 beta 2:
Thanks JoeCDF for the hints, but I had already followed these explanations for the previous version of my program, and everything worked correctly.
I just have the impression that there was a change with Qt 6.5.0 beta2... but what...?
The error message is not very explicit. How can I find out more about what's wrong?Thank you for the suggestions, JoeCDF, but I had already followed these instructions for the previous version of my programme, and everything worked fine.
I just got the impression that something changed with Qt 6.5.0 beta2... but what...?The error message isn't very clear. What can I do to learn more about what's wrong?