I am trying to compile openssl 1.0.2h in my project
I have done these steps to use Openssl
To add libraries to my project as ready-made static libraries, I created the openssl folder in my jni directory containing lib / (which contain .a files for supported architectures), include /, which contain the necessary ones (you may find that in the version openssl you downloaded) and Android.mk, which has the following:
include $(CLEAR_VARS)
LOCAL_MODULE := libssl
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libssl.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libcrypto
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libcrypto.a
include $(PREBUILT_STATIC_LIBRARY)
Then, to use the library in another jni module, I added the following to the Android.mk file:
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := libssl libcrypto
and I get the following:
jni/openssl/lib/armeabi-v7a/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigfillset'
jni/openssl/lib/armeabi-v7a/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
jni/openssl/lib/armeabi-v7a/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
jni/openssl/lib/armeabi-v7a/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
jni/openssl/lib/armeabi-v7a/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
jni/openssl/lib/armeabi-v7a/libcrypto.a(ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'tcgetattr'
jni/openssl/lib/armeabi-v7a/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'signal'
jni/openssl/lib/armeabi-v7a/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
jni/openssl/lib/armeabi-v7a/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
collect2: error: ld returned 1 exit status
make[1]: *** [obj/local/armeabi-v7a/libpjsipjni.so] Error 1
make[1]: *** Waiting for unfinished jobs....
jni/openssl/lib/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'tcgetattr'
jni/openssl/lib/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'signal'
jni/openssl/lib/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
jni/openssl/lib/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
collect2: error: ld returned 1 exit status
make[1]: *** [obj/local/armeabi/libpjsipjni.so] Error 1
jni/openssl/lib/x86/libcrypto.a(ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'tcgetattr'
jni/openssl/lib/x86/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'signal'
jni/openssl/lib/x86/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
jni/openssl/lib/x86/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
collect2: error: ld returned 1 exit status
make[1]: *** [obj/local/x86/libpjsipjni.so] Error 1
jni/openssl/lib/mips/libcrypto.a(ui_openssl.o): In function `open_console':
ui_openssl.c:(.text.open_console+0xb4): undefined reference to `tcgetattr'
jni/openssl/lib/mips/libcrypto.a(ui_openssl.o): In function `read_string_inner':
ui_openssl.c:(.text.read_string_inner+0xf0): undefined reference to `signal'
ui_openssl.c:(.text.read_string_inner+0x2c0): undefined reference to `tcsetattr'
ui_openssl.c:(.text.read_string_inner+0x39c): undefined reference to `tcsetattr'
collect2: error: ld returned 1 exit status
Please i need help
source
share