Android linphone prepare_sources.sh - android

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

Related

PJSIP Library Build Error for Android

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

Jenkins - Warnings Plugin & IntelliJ IDEA Parser

I am having issues opening the files that contains IntelliJ IDEA Inspection warnings using Jenkins and Warnings Plugin.
The path to my files looks weird - file://$PROJECT_DIR$/app/src/main..../Foo.java in the .xml generated files by ./inspect.sh
When I click on the file I get the following error:
`java.io.IOException: Failed to copy file:/$PROJECT_DIR$/app/src/main/java`/
These are some screenshots of my files:
I am using the ./inspect.sh from Android Studio, not from actual IntelliJ. Could that be the problem?
Thanks in advance.
In the end I have added an extra build step where I clean the .xml files that are output by ./inspect.sh.
I have also added a line of code that removes all the inspects related to the build (generated) directory. Hope this helps anyone who was stuck with this issue.
Below you have the tweaked inspect.sh file and the two separate build steps:
inspect.sh
#!/bin/sh
#
# ------------------------------------------------------
# Android Studio offline inspection script.
# ------------------------------------------------------
#
export DEFAULT_PROJECT_PATH="$(pwd)"
cd ..
exec "MacOS/studio" inspect "$#"
Build Step 1
cd ${WORKSPACE}/inspectionsresults
rm *.xml
cd "${ANDROID_STUDIO_HOME_BIN}"
./inspect.sh ${WORKSPACE} ${WORKSPACE}/inspections_profile.xml ${WORKSPACE}/inspectionsresults -v2 -d ${WORKSPACE}/app
Build Step 2
cd ${WORKSPACE}/inspectionsresults
sed -i .bak "s,file://\\\$PROJECT_DIR\\\$,${WORKSPACE},g" *.xml
sed -i .bak "s,file:///,,g" *.xml
/usr/local/bin/xml ed -L -d "/problems/problem[contains(file,'generated')]" *.xml
rm *.bak
I have used xmlstarlet to remove the "generated" problems.
brew install xmlstarlet

Building webrtc library

I am trying to build webrtc android demo application. I was following README applied by the project. First thing was mentioned about gclient but when i tried to run it "no external or internal command". Then i got this link according to the this link i cloned the depot_tool repository but when at the step when i try to run gclient i got this
So after hours of trying i am not able to run it. if any one has experience with this WebRTC library please provide some help. Any guidance? Any Hlep will be appreciated
I heard few things were changed from svn to GIT. We tried building webRTC to windows7 using visual studio. See if you can use any parts on this.
Get depot_tools software and extract to a location (set this path in environment variable).
cd to depot_tools directory and hit 'gclient' (this should take sometime)
Install python 2.7 and put it path.
create a folder of your choice for webRTC and open command prompt there.
Now hit, gclient config http://webrtc.googlecode.com/svn/trunk
then, gclient sync.
Then set GYP_GENERATORS=msvs environment variable (use ninja if you want that).
Also set msvs_version=2012 (depending on your visual studio version)
now run, gclient runhooks --force
This should generate solutions files for your folder. fireup the libjingle/webrtc.sln files and start building it. I'm not sure if it builds as is. But we had hicupps with that.
See this link on WebRTC native development if you haven't already. From my personal experience building this tricky job initially.
Also note that links might be deprecated as they moved to git, don't know if they are still maintaining it.
How to compile WEBRTC On ubuntu
download script and run:
https://cs.chromium.org/chromium/src/build/install-build-deps.sh
./build/install-build-deps.sh --no-chromeos-fonts
Now download depot tools
$ git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
Put it in Path
$ export PATH=`pwd`/depot_tools:"$PATH"
Define your settings:
export GYP_DEFINES="target_arch=x64 host_arch=x64 build_with_chromium=0 use_openssl=0 use_gtk=0 use_x11=0 include_examples=0 include_tests=1 fastbuild=1 remove_webcore_debug_symbols=1 include_pulse_audio=0 include_internal_video_render=0 clang=1 "
make file to download the source
mkdir webrtc-checkout
cd webrtc-checkout
I chose branch 50 you can change it
gclient config https://chromium.googlesource.com/external/webrtc.git#branch-heads/50 --name=src
gclient sync --force --with_branch_heads
gclient sync --force --with_branch_heads --nohooks
cd src
git checkout branch-heads/50
gclient runhooks
ninja -C ./out/Release
Collect your LIB & Include file to use it in your project
mkdir ../lib/
find ./ -name "*.o" -and -not -name do_not_use -and -not -name protoc -and -not -name genperf -exec ar crs ../lib/libwebrtc.a {} +
mkdir ../include
find ./ -name *.h -exec cp --parents '{}' ../include ';'

Creating Project Cocos2d-x-3.1.1

I have downloaded Cocos2d-x-3.1.1 but it does not include #create-android-project.bat and #create-android-project.sh then i download these 2 files from the internet and i tried to create project i receive the error. anyone have any idea please kindly help.
.............
Resolved location library project to C:\ADT\cocos2d-x\cocos2dx\platform\android\java
Error: Project folder 'C:\ADT\cocos2d-x\cocos2dx\platform\android\java' is not valid directory
Error: No Android manifest at: C:\ADT\cocos2d-x\cocos2dx\platform\android\java
Error!!!
Don't run in cygwin. You should run corresponding bat.
Press any key to continue.
$ cocos new ProjName -p com.compnyName.ProjName -l cpp
You should use cocos2d-console for creating project.
$ cocos2d-x-3.1.1/tools/cocos2d-console/bin/cocos new -d . -p com.example.testproject -l cpp TestProject

Linphone Compile on Windows 8

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...

Categories

Resources