juha-h / libbaresip-android

libbaresip for Android
Other
40 stars 30 forks source link

Gradle Build Fails #4

Closed sagarmagnatesage closed 5 years ago

sagarmagnatesage commented 5 years ago

@juha-h I have build libs using your instructions and it works fine. Now when I am trying to create a separate project (Based on my req) from it, I could not build it successfully. I am using ndk-19.

It builds when if I remove "armeabi-v7a"

splits {
        abi {
            reset()
            include  'arm64-v8a'
        }
    } 

Gives the following error when I add "armeabi-v7a" to splic abi.

Build command failed.
Error while executing process E:\Softs\android_studio_sdk_3.3.2\cmake\3.6.4111459\bin\cmake.exe with arguments {--build E:\Sagar\Work\BackUps\SIP_VOIP\SIPDemo\app\.externalNativeBuild\cmake\debug\armeabi-v7a --target baresip}
[1/2] Building C object CMakeFiles/baresip.dir/baresip.c.o
[2/2] Linking C shared library E:\Sagar\Work\BackUps\SIP_VOIP\SIPDemo\app\build\intermediates\cmake\debug\obj\armeabi-v7a\libbaresip.so
FAILED: cmd.exe /C "cd . && E:\Softs\android_studio_sdk_3.3.2\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe  --target=armv7-none-linux-androideabi19 --gcc-toolchain=E:/Softs/android_studio_sdk_3.3.2/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=E:/Softs/android_studio_sdk_3.3.2/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mfpu=vfpv3-d16 -fno-addrsig -march=armv7-a -mthumb -mfpu=neon -Wa,--noexecstack -Wformat -Werror=format-security -DHAVE_INTTYPES_H -O0 -fno-limit-debug-info  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libbaresip.so -o E:\Sagar\Work\BackUps\SIP_VOIP\SIPDemo\app\build\intermediates\cmake\debug\obj\armeabi-v7a\libbaresip.so CMakeFiles/baresip.dir/baresip.c.o  -landroid -lOpenSLES E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/baresip/lib/armeabi-v7a/libbaresip.a E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/rem/lib/armeabi-v7a/librem.a E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/re/lib/armeabi-v7a/libre.a E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/openssl/lib/armeabi-v7a/libssl.a E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/openssl/lib/armeabi-v7a/libcrypto.a E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/opus/lib/armeabi-v7a/libopus.a E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/zrtp/lib/armeabi-v7a/libzrtp.a E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/bn/lib/armeabi-v7a/libbn.a -lz -llog -latomic -lm && cd ."
src/video.c:338: error: undefined reference to 'atof'

src/video.c:338: error: undefined reference to 'atof'

src/main/main.c:944: error: undefined reference to 'signal'

src/main/main.c:945: error: undefined reference to 'signal'

src/main/main.c:946: error: undefined reference to 'signal'

src/main/main.c:771: error: undefined reference to '__FD_ISSET_chk'

src/main/main.c:773: error: undefined reference to '__FD_ISSET_chk'

src/main/main.c:775: error: undefined reference to '__FD_ISSET_chk'

src/main/main.c:690: error: undefined reference to '__FD_SET_chk'

src/main/main.c:692: error: undefined reference to '__FD_SET_chk'

src/main/main.c:694: error: undefined reference to '__FD_SET_chk'

src/main/main.c:923: error: undefined reference to 'signal'

E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/openssl/lib/armeabi-v7a/libcrypto.a(libcrypto-lib-armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigfillset'

E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/openssl/lib/armeabi-v7a/libcrypto.a(libcrypto-lib-armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'

E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/openssl/lib/armeabi-v7a/libcrypto.a(libcrypto-lib-armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'

E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/openssl/lib/armeabi-v7a/libcrypto.a(libcrypto-lib-armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'

E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/openssl/lib/armeabi-v7a/libcrypto.a(libcrypto-lib-armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'

E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/openssl/lib/armeabi-v7a/libcrypto.a(libcrypto-lib-ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'tcgetattr'

E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/openssl/lib/armeabi-v7a/libcrypto.a(libcrypto-lib-ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'

E:/Sagar/Work/BackUps/SIP_VOIP/SIPDemo/app/src/main/cpp/../../../../distribution/openssl/lib/armeabi-v7a/libcrypto.a(libcrypto-lib-ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'

clang.exe: error: linker command failed with exit code 1 (use -v to see invocation)

ninja: build stopped: subcommand failed.
juha-h commented 5 years ago

Sagar Thakarar writes:

Now when I am trying to create a separate project (Based on my req) from it, I could not build it successfully. I am using ndk-19.

It builds when if I remove "armeabi-v7a" splits { abi { reset() include 'arm64-v8a' } }

Gives the following error when I add "armeabi-v7a" to splic abi.

I really cannot help with other applications. Make sure that you have both arm64-v8a/ armeabi-v7a/ versions off baresip, re and rem libs in android studio distribution dir.

sagarmagnatesage commented 5 years ago

I do have all these directories in distribution dir. I have not much knowledge of NDK and I feel there is something wrong within.

juha-h commented 5 years ago

Closing due to no possibility for me to help.