I am building Linphone application for android. I am working in Windows 8 64-Bit OS
I Followed the steps given in README file:
Download the Android ndk (>=r5c) from google.
Install the autotools: autoconf, automake, aclocal, libtoolize pkgconfig
Run the ./prepare_sources.sh script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project.
$ ./prepare_sources.sh
Finally from directory linphone-android, just execute command:
$ ${my google ndk directory}/ndk-build
then i get following error in Cygwin terminal:
$ ./prepare_sources.sh
./prepare_sources.sh: line 2: $'\r': command not found
./prepare_sources.sh: line 3: C:UsersNomsDesktoplinphone-android: command not found
./prepare_sources.sh: line 4: $'\r': command not found
./prepare_sources.sh: line 29: syntax error near unexpected token $'\r''
./prepare_sources.sh: line 29:cd $topdir/submodules/libilbc-rfc3951 && ./autog'n.sh && ./configure && make || ( echo "iLBC prepare stage failed" ; exit 1 )
Try to use mingw to compile it. I've built the library successfully. But not yet apk, cause some build error in myeclipse...
Related
I want to test the app with android 10 in emulator.So for that I only have "armeabi", "armeabi-v7a","arm64-v8a" in jnilibs. But running app with android 10 device(Emulator), requires x86 abi. So for that first I have downloaded ndk for x86.And the second thing is I want to generate libpjsua2.so for x86 abi.
I am using pjsip library.
I have referred to https://trac.pjsip.org/repos/wiki/Getting-Started/Android. What I have tried is,
1) Downloaded latest pjsip version and extracted in folder.
2) Followed the steps given in pjsip website as below,
$ cd /path/to/your/pjsip/dir
$ export ANDROID_NDK_ROOT=/path_to_android_ndk_dir
$ ./configure-android
$ make dep && make clean && make
$ cd /path/to/your/pjsip/dir
$ make clean
# cleanup pjsua sample app
$ cd pjsip-apps/src/pjsua/android/jni
$ make clean
# also cleanup pjsua2 sample app (SWIG)
$ cd /path/to/your/pjsip/dir
$ cd pjsip-apps/src/swig
$ make clean
$ cd pjsip-apps/src/swig
$ make clean
TARGET_ABI=x86 ./configure-android --use-ndk-cflags
Got error when reached above code,
LDFLAGS = --sysroot= -L/libs/x86/
LIBS = -lgnustl_static -lc -lgcc -ldl
AR = /home/Android/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
RANLIB = /home/Android/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
TARGET_HOST = llvm-linux-android
TARGET_ABI = x86
checking build system type... x86_64-unknown-linux-gnu
checking host system type... Invalid configuration `llvm-linux-android': machine `llvm' not recognized
aconfigure: error: /bin/sh ./config.sub llvm-linux-android failed
In my pjsip2.7 folder I found a folder named llvm but that is a empty folder. I doesn't know What is that. I am using cent os 7. Why I am getting this error? What do I need to do to overcome this.
Try compile with this builder
replace in ./config.cong you are using 2.10
# PJSIP Version to download
PJSIP_VERSION=2.10
./prepare-build-system
and then
./build
Android NDK-r20 cross compile FFmpeg4.2 success, but my app crash with
UnsatisfiedLinkError: dlopen failed: cannot locate symbol
__aeabi_idiv
This is the ffmpeg4.2 source code with my "build_android.sh"
ffmpeg-android-build
config the NDK r20 root path in "build_android.sh"
$ cd ffmpeg-android-build
$ ./build_android.sh
$ make -j 4
$ make install
This is my android project to test the ffmpeg
ffmpeg-android-test
Seemed the solution,don't know how to do in my situation
#cannot-locate-symbols
Excepted
NDK-r20 and FFmpeg-4.2 is needed (cant change the version)
My android test project run
Now,problem seems to have been solved.
Old build_android.sh
New build_android.sh
Please help me. I try to build PJSIP library in Windows for Android by using Cygwin terminal. I follow steps exactly, but when I write $ ./configre-android I get this error - >
$ ./configure-android
./configure-android: line 3: $'\r': command not found
./configure-android: line 5: $'\r': command not found
./configure-android: line 71: syntax error near unexpected token `$'do\r''
'/configure-android: line 71: ` for i in `$NDK_OUT`; do
I used this steps to build sources are
Download sources from PJSIP site. Pay attention if you will compile
on Windows machine download .zip file, if on Unix machine (including
OS X) then download .bz2 file.
Go to pjlib/include/pj/ from the downloaded sources. Create (or
overwrite) a file called config_site.h. Copy the following code
snippet
#define PJ_CONFIG_ANDROID 1
#include <pj/config_site_sample.h>
Open Cmd or Terminal
Go to pjsip root folder (the downloaded sources)
$ cd /path/to/your/pjsip/dir
Export bash var ANDROID_NDK_ROOT as a environment variable.
Variable value should be the path of android ndk directory.
$ export ANDROID_NDK_ROOT=/path_to_android_ndk_dir
Perform build for target armeabi
$ ./configure-android
If you need to perform build for target arm64-v8a do $
TARGET_ABI=armeabi-v8a ./configure-android --use-ndk-cflags
target armeabi-v7a do $
TARGET_ABI=armeabi-v7a ./configure-android --use-ndk-cflags
target x86 do $ TARGET_ABI=x86 ./configure-android --use-ndk-cflags
Compile sources
$ make dep && make clean && make
This fixed problem for me:
tr -d '\015' < configure-android > configure-android2
After this launch configure-android2, not configure-android
i have downloaded the latest android ndk r8b on my ubuntu 12.10 beta 2 .
i have included the ndk directory in the PATH variable (when i write ndk-b in terminal and hit tab it auto-completes it) .
but when i try :
cd android-ndk/samples/san-angeles/jni
ndk-build
i get this error:
make: /home/mixpro/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: /home/mixpro/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
Compile thumb : sanangeles <= importgl.c
make: /home/mixpro/Android/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: *** [/home/mixpro/Android/android-ndk/samples/san-angeles/obj/local/armeabi/objs/sanangeles/importgl.o] Error 127
when checking the /android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin directory using ls i get:
arm-linux-androideabi-addr2line arm-linux-androideabi-g++
arm-linux-androideabi-gdbtui arm-linux-androideabi-size
arm-linux-androideabi-c++filt arm-linux-androideabi-gcc-4.6.x-google
arm-linux-androideabi-gprof arm-linux-androideabi-strings
arm-linux-androideabi-cpp arm-linux-androideabi-gcov
arm-linux-androideabi-readelf arm-linux-androideabi-elfedit
arm-linux-androideabi-gdb arm-linux-androideabi-run
meaning there is no arm-linux-androideabi-gcc in the directory
I am afraid that somehow you got arm-linux-androideabi-addr2line arm-linux-androideabi-gcc deleted. On linux, it is just a symlink to arm-linux-androideabi-gcc-4.6.x-google, so it's very easy to restore it. But maybe, to be on the safe side, it's worthwhile to reinstall NDK.
you should create symbolic link like this : ln -s /usr/bin/arm-linux-gnueabi-gcc-4.7 "/home/sofien/Bureau/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc"
I am trying to compile linphone for android but I'm but I can't manage to pass throw prepare_sources.sh.
I have installed all dependencies and download ndk. Is there a way to install ndk? I didn't found it!
I'm working in Ubuntu 10.11.
The output I get when I execute prepare_sources.sh is:
Applying patch to ffmpeg
patching file submodules/externals/ffmpeg/libavcodec/arm/int_neon.S
Hunk #1 FAILED at 35.
Hunk #2 FAILED at 55.
2 out of 2 hunks FAILED -- saving rejects to file submodules/externals/ffmpeg/libavcodec
/arm/int_neon.S.rej
cd: 12: can't cd to /home/glot/git/linphone-android/submodules/libilbc-rfc3951
iLBC prepare stage failed
find: «../../libvpx/»: No existe el archivo o directorio
cp: el destino, «../../libvpx/», no es un directorio
VP8 prepare stage failed.
cd: 16: can't cd to /home/glot/git/linphone-android/submodules/mssilk
SILK audio plugin prepare state failed.
Thank you very much!
If you still need an answer...
Open your terminal
make sure you have done this: "git clone git://git.linphone.org/linphone-android.git --recursive" //*the --recursive part is very important
then do this: apt-get install autoconf automake libtool pkg-config
go to your project root: cd/home/user/project //wherver your project is
in your project root: export PATH=/home/user/android-ndk:$PATH //wherever your android-ndk is stored in
then run ./prepare_sources.sh //in your project root still
after that do this: /home/user/android-ndk/ndk-build // in your project root too
I work in Mac but I get the same error and I found out that some changes in this file helped me:
linphone-android/submodules/externals/libvpx/build/make/gen_asm_deps.sh
Line 45, change it to :
includes=$(LC_ALL=C egrep -i "include +\"[a-z0-9_/]+\.${sfx}" $srcfile |
and do:
Go to root directory of the downloaded project through command: cd /home/your_downloaded_project_path/
Fire the command: ./prepare_sources.sh /home/android-ndk-r7b/
Go to root directory of NDK folder through command: cd /home/android-ndk-r7b/
Fire the command: export NDK_PROJECT_PATH=/home/your_downloaded_project_path/
./ndk_build clean
./ndk_build -i
Hope it helps.
NB:
I found it from here: https://groups.google.com/a/webmproject.org/forum/#!msg/webm-discuss/OdEWb-rBBhw/_GMux8jTOnoJ