Android Compiling source code for android error - solved
#1
Question 
Hey everyone!

I wanted to make a few small changes to the xbmc PIVOS source code and compile it myself...

Source is here: https://github.com/Pivosgroup/xbmc/

I am following the Readme (https://github.com/Pivosgroup/xbmc/blob/...ME.android) to the best of my ability...

I am using Ubuntu 13.10

Here is what I did:

sudo apt-get install build-essential default-jdk git curl autoconf unzip zip zlib1g-dev gawk gperf cmake

# Install SDK packages (downloaded the latest sdk on the android dev site)

Code:
cd $HOME/xbmc-build/android-sdk-linux/tools
./android update sdk -u -t platform,platform-tool

# Install toolchain

Code:
mkdir $HOME/xbmc-build/android-toolchain
cd $HOME/xbmc-build/android-ndk-r7-crystax-5.beta3/build/tools
./make-standalone-toolchain.sh --ndk-dir=../../ --install-dir=$HOME/xbmc-build/android-toolchain/android-9 --platform=android-9

# Set debug Key

Code:
keytool -genkey -keystore ~/.android/debug.keystore -v -alias androiddebugkey -dname "CN=Android Debug,O=Android,C=US" -keypass android -storepass android -keyalg RSA -keysize 2048 -validity 10000

# Clone repo

Code:
cd $HOME/xbmc-build
git clone ssh://[email protected]/myrepo/xbmc.git xbmc-git
cd xbmc-git
git remote add -f upstream https://github.com/Pivosgroup/xbmc.git
git submodule update --init addons/skin.touched

# Build Dependancies

Code:
mkdir $HOME/xbmc-build/xbmc-tarballs
cd $HOME/xbmc-build/xbmc-git/tools/android/depends
./bootstrap
export XBMC_ANDROID_NDK=$HOME/xbmc-build/android-ndk-r7-crystax-5.beta3
export XBMC_ANDROID_SDK=$HOME/xbmc-build/android-sdk-linux
export XBMC_ANDROID_TARBALLS=$HOME/xbmc-build/xbmc-tarballs
./configure --with-toolchain=$HOME/xbmc-build/android-toolchain/android-9
make -j20

(At this point I do not get the dependencies built message at the end Sad )

Code:
cd $HOME/xbmc-build/xbmc-git/tools/android/depends/xbmc

make -j8

which end with this error:

Quote:Makefile.am: installing `./INSTALL'
autoreconf: Leaving directory `lib/libdvd/libdvdnav'
make[1]: Leaving directory `/home/oj/xbmc-build/xbmc-git'
make[1]: Entering directory `/home/oj/xbmc-build/xbmc-git'
make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
Warning: No doxygen installed. The Api will not have any docstrings.
mkdir -p xbmc/interfaces/python/generated/doxygenxml
Swig not found, it will be used if found after configure.
This is not necessarily an error.
make[1]: *** [swig-not-found] Error 1
make[1]: Leaving directory `/home/oj/xbmc-build/xbmc-git'
make: *** [../../../..//libxbmc.so] Error 2

Thanks for any help debugging this issue. I would really like to setup a build environment for XBMC android...
Reply
#2
Redo the "# Build Dependencies" step with just "make", without the "-j20".
No hope to build xbmc itself if the dependencies are not properly built.
Reply
#3
Will do thanks!

Thanks for the pointer, turns out it could not download fontconfig, so I got it from here http://ftp.vim.org/mediaplayer/xbmc/buil...rwin-libs/

Some more missing dependencies from the official repo where the build script tries to find them:

fontconfig-2.8.0.tar.gz
Python-2.6.5.tar.bz2
libssh2-1.2.7.tar.gz
curl-7.21.3.tar.bz2

Sometimes if it fails I have to start my build all over again from ./configure so there might be some more missing still. Will update and report back Smile
Reply
#4
Well there was quite a few more dependencies missing, but it finally built in the end!

I am now compiling the apk and hope it works out Smile

Since this is my first time compiling a project for android, let's say I add changes to my xbmc souce code, from what step do I have to start again to build a new apk from the new code?

Cheers Smile
Reply
#5
You will have to run "make" and "make apk" in XBMC's root directory.

If the dependency build fails to download a package often a
Code:
make -C <path/to/the/failed/dependency> clean
will be enough to properly retry. At least that's what I did when some download of a package failed half-way or whatever. Sometimes you also have to manually remove the bad package from your tarball directory so that it is re-downloaded.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#6
Thanks for you guys help.

After managing to get my dependencies to build I tried to make it from $HOME/xbmc-build/xbmc-git/tools/android/depends/xbmc and did a "make"

This endend in the same error: make: *** [../../../..//libxbmc.so] Error 2, which got me pretty depressed on this...

Then I tried what Montellese suggested, did a "make" from the root directory.

And I got an XBMC succesfully built message!!!

But alas, when doing "make apk" I get this error:

make[1]: /home/oj/xbmc-build/android-sdk-linux/platform-tools/aapt: Command not found
make[1]: *** [extras] Error 127
make[1]: Leaving directory `/home/oj/xbmc-build/xbmc-niu/tools/android/packaging'
make: *** [apk] Error 2

Sad
Reply
#7
IIRC aapt was moved to somewhere else in the recent android SDKs. I'm sure google will help you out as I can't remember any details.

EDIT: See http://stackoverflow.com/questions/16927...path-as-co
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#8
Thanks for the heads up! I was just about to report with this link that helped me solve the issue:

http://forum.xbmc.org/showthread.php?tid=170969

Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Compiling source code for android error - solved0