Задать вопрос
asyaevloeva
@asyaevloeva

Как установить openssl для android x86?

Не получается подключить библиотеки libcrypto и libssl
Скачивала отсюда
И потом подключала так:
LIBS += \
    -L$$PWD/openssl/x86/lib/ -lcrypto \
    -L$$PWD/openssl/x86/lib/ -lssl

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/openssl/x86/lib/ -lcrypto
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/openssl/x86/lib/ -lcryptod
else:unix: LIBS += -L$$PWD/openssl/x86/lib/ -lcrypto

INCLUDEPATH += $$PWD/openssl/x86
DEPENDPATH += $$PWD/openssl/x86

contains(ANDROID_TARGET_ARCH,x86) {
    ANDROID_EXTRA_LIBS = \
        $$PWD/openssl/x86/lib/libcrypto.so \
        $$PWD/openssl/x86/lib/libssl.so
}

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/openssl/x86/lib/ -lssl
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/openssl/x86/lib/ -lssld
else:unix: LIBS += -L$$PWD/openssl/x86/lib/ -lssl

INCLUDEPATH += $$PWD/openssl/x86
DEPENDPATH += $$PWD/openssl/x86


Но в итоге меня выкидывает из приложения
логи

Запуск внешнего процесса.I art : Not late-enabling -Xcheck:jni (already on)
W art : Unexpected CPU variant for X86 using defaults: x86
W System : ClassLoader referenced unknown path:
W linker : /data/app/org.qtproject.example.myproject-2/lib/x86/libQt5Network.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.myproject-2/lib/x86/libQt5Qml.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.myproject-2/lib/x86/libQt5Gui.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.myproject-2/lib/x86/libQt5Quick.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.myproject-2/lib/x86/libQt5QuickTemplates2.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.myproject-2/lib/x86/libQt5QuickParticles.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.myproject-2/lib/x86/libQt5QuickControls2.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.myproject-2/lib/x86/libQt5XmlPatterns.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unsupported flags DT_FLAGS_1=0x81
I Qt : qt start
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/plugins/bearer/libqandroidbearer.so: unsupported flags DT_FLAGS_1=0x81
I art : Do partial code cache collection, code=16KB, data=30KB
I art : After code cache collection, code=16KB, data=30KB
I art : Increasing code cache capacity to 128KB
I art : Background sticky concurrent mark sweep GC freed 13255(1285KB) AllocSpace objects, 26(700KB) LOS objects, 32% free, 3MB/5MB, paused 654us total 139.688ms
W linker : /data/app/org.qtproject.example.myproject-2/lib/x86/libmyproject.so: unused DT entry: type 0xf arg 0xa0d
D : (null):0 ((null)): QML debugging is enabled. Only use this in a safe environment.
W RenderThread: type=1400 audit(0.0:15): avc: denied { search } for name="graphics" dev="tmpfs" ino=250 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:graphics_device:s0 tclass=dir permissive=0
I OpenGLRenderer: Initialized EGL, version 1.4
D OpenGLRenderer: Swap behavior 1
D gralloc_ranchu: Emulator without host-side GPU emulation detected.
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/qml/QtQuick.2/libqtquick2plugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/qml/QtQuick/Layouts/libqquicklayoutsplugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/qml/QtQuick/Controls.2/Material/libqtquickcontrols2materialstyleplugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/qml/QtQuick/Controls.2/Universal/libqtquickcontrols2universalstyleplugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/qml/Qt/labs/settings/libqmlsettingsplugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/qml/QtQuick/Window.2/libwindowplugin.so: unsupported flags DT_FLAGS_1=0x81
W MyProject: (null):0 ((null)): libpng warning: iCCP: known incorrect sRGB profile
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/qml/QtQuick/XmlListModel/libqmlxmllistmodelplugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.myproject/qt-reserved-files/qml/QtQuick/Extras/libqtquickextrasplugin.so: unsupported flags DT_FLAGS_1=0x81
W QtThread: type=1400 audit(0.0:16): avc: denied { ioctl } for path="socket:[13104]" dev="sockfs" ino=13104 ioctlcmd=8927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=0
W QtThread: type=1400 audit(0.0:17): avc: denied { ioctl } for path="socket:[13104]" dev="sockfs" ino=13104 ioctlcmd=8927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=0
W QtThread: type=1400 audit(0.0:18): avc: denied { ioctl } for path="socket:[13105]" dev="sockfs" ino=13105 ioctlcmd=8927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=0
W QtThread: type=1400 audit(0.0:19): avc: denied { ioctl } for path="socket:[13105]" dev="sockfs" ino=13105 ioctlcmd=8927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=0
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve CRYPTO_num_locks
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_id_callback
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_locking_callback
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve ERR_free_strings
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_cleanup
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_init
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve sk_new_null
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve sk_push
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve sk_free
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve sk_num
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve sk_pop_free
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve sk_value
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve SSL_library_init
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve SSL_load_error_strings
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve SSL_get_ex_new_index
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve SSLv23_client_method
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve SSLv3_server_method
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve SSLv23_server_method
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get_chain
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve SSLeay
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve SSLeay_version
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot call unresolved function SSLeay
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot call unresolved function CRYPTO_num_locks
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method
W MyProject: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot call unresolved function sk_num
D NetworkSecurityConfig: No Network Security Config specified, using platform default
F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 2463 (QtThread)

«org.qtproject.example.myproject» аварийно завершился.


Потом пыталась скачивать с офф сайта, но не понимаю как их скомпилить. Тут очень сложно описано, не понимаю как это сделать.

Подскажите как подключить или скиньте, пожалуйста, ссылку на понятный туториал как это сделать.
  • Вопрос задан
  • 987 просмотров
Подписаться 1 Оценить Комментировать
Решения вопроса 1
EXL
@EXL
Энтузиаст
Недавно компилировал OpenSSL и решал другу такую же проблему.

Вот скомпилированный: dropmefiles.com/wFmXa

https://habrastorage.org/web/f9b/7e4/d0f/f9b7e4d0f...

Если ничего не получится, постучи в Telegram: @exlmoto
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
Zifix
@Zifix Куратор тега Qt
Barbatum
Я делал вот по этому руководству www.cyberforum.ru/blogs/748276/blog4086.html
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы
22 дек. 2024, в 20:40
10000 руб./за проект
22 дек. 2024, в 20:34
3000 руб./за проект
22 дек. 2024, в 20:12
10000 руб./за проект