Kodi Community Forum

Full Version: Error while compiling xbmc for android on Ubuntu 12.04, 32bit machine
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am a newbie here. I need to compile xbmc for android devices. For the last 3 days i was trying almost everything for that. I followed https://github.com/xbmc/xbmc/blob/master...ME.android exactly with different configurations. But each time the compilation failed at different steps.
i have a few questions,
1. http://wiki.xbmc.org/index.php?title=Dev...or_Android
In this page they are saying Crystax NDK 'r7' is required to compile xbmc. But in the above mentioned Readme file
"[NOTICE] Compiling XBMC for Android requires at least Android NDK
Revision r8e. Android NDK Revision 7 and earlier do not work
properly for our cause."
So they are preferring NDK 'r8'. Which NDK is the right one? r7 or r8?
I tried with both theese ndk and i failed.
2. Crystax NDK r7 does not support GCC 4.7. But in that Readme, they says "Currently only gcc 4.7 toolchains are supported, anything
else will likely fail to build."
Which gcc should i choose?
i tried NDK r8 with GCC 4.7, but it fails by saing that gcc cannot create executabes.
when i used Crystax NDK r7 with GCC 4.6, there is no such errors. But the last 'make' failes with different errors at different time.
First the problem was something about libdvd.so not found or so. Trying different configurations solved this.
But now there is "permission denied" errors.
Quote: make[2]: Entering directory `/home/vijeesh/xbmc-android/lib/libdvd/libdvdnav'
/bin/sh: 1: cannot create obj/dvdnav-config: Permission denied
make[2]: *** [obj/dvdnav-config] Error 2
make[2]: Leaving directory `/home/vijeesh/xbmc-android/lib/libdvd/libdvdnav'
make[1]: *** [libdvdnav] Error 2
make[1]: Leaving directory `/home/vijeesh/xbmc-android/lib/libdvd'
make: *** [dvdpcodecs] Error 2

What am i doing wrong?
Ithink that its not safe to run such a large script using 'sudo' permission.

Please help me to solve these. Thank you for your consideration.
I tried the last 'make' with sudo permission. But it still produces an error stating that few functions are undefined.

SAPFile.cpp:53: error: undefined reference to 'std::basic_istream<char, std::char_traits<char> >:Confusedeekg(std::fpos<mbstate_t>)'
/home/vijeesh/xbmc-android/xbmc/utils/StdString.h:913: error: undefined reference to 'std::codecvt<wchar_t, char, mbstate_t> const& std::use_facet<std::codecvt<wchar_t, char, mbstate_t> >(std::locale const&)'
/home/vijeesh/xbmc-android/xbmc/utils/StdString.h:866: error: undefined reference to 'std::codecvt<wchar_t, char, mbstate_t> const& std::use_facet<std::codecvt<wchar_t, char, mbstate_t> >(std::locale const&)'
collect2: ld returned 1 exit status
make: *** [libxbmc.so] Error 1


Please help me in this. Waiting for your replies. Thank you.
this is the new error i am facing now while 'make'ing.

CPP xbmc/guilib/TextureBundleXBT.o
CPP xbmc/guilib/TextureBundle.o
CPP xbmc/guilib/TextureManager.o
CPP xbmc/guilib/VisibleEffect.o
CPP xbmc/guilib/XBTF.o
CPP xbmc/guilib/XBTFReader.o
CPP xbmc/guilib/TextureGL.o
CPP xbmc/guilib/GUIFontTTFGL.o
CPP xbmc/guilib/GUITextureGLES.o
CPP xbmc/guilib/MatrixGLES.o
CPP xbmc/guilib/GUIShader.o
AR xbmc/guilib/guilib.a
CPP xbmc/threads/Atomics.o
CPP xbmc/threads/Event.o
CPP xbmc/threads/LockFree.o
CPP xbmc/threads/Thread.o
CPP xbmc/threads/Timer.o
CPP xbmc/threads/SystemClock.o
CPP xbmc/threads/platform/Implementation.o
AR xbmc/threads/threads.a
CPP xbmc/commons/Exception.o
CPP xbmc/commons/ilog.o
AR xbmc/commons/commons.a
LD libxbmc.so
collect2: error: ld returned 1 exit status
make: *** [libxbmc.so] Error 1

can anyone help me? thank you for your concern.
The readme is up to date - the wiki is not. We are using vanilla (google) NDK r8e now. Also gcc 4.7 (and thats exactly the setup the android buildbot which does the nightly builds uses every night without problems).

Also don't mess around with sudo while compiling. If i was you i would start from scratch with NDK r8e and GCC 4.7. If it still fails please post your configure line from tools/depends ...
I also had the same problems when compiling.
I solved it by installing java(jre-6u45-linux-i586 & jdk-6u45-linux-i586) and making it the default. The problem occurs with the last 'make' when using java 1.7
You can also try to use 'make clean' to redo the steps without redownloading everything.
never, ever do 'make' with sudo. you have now poisoned your source code. delete it and try again.
thank you... I could compile it yesterday itself. At last i found some "aapt could not found, dx could not found" errors. creating symlink to their location solved these errors too.
I used sudo and still using it to compile since without sudo 'make' produces some errors stating 'could not apply chmod on some files due to lack of permission'. What should i do?

Also frame rate of video playback is too high? i was tested and still testing on Samsung galaxy tab 3 7.0, samsung galaxy w, and micromax funbook (p3100). What will be the problem?
Remove the Code and Start again - you borked it by Doing sudo... What davilla Said...
You drank from the poisoned sudo tree, remove it all and try again. You never, ever need 'sudo make', never. Once more for the boys in the back, never !
ok... i removed all those codes and tried from the beginning. But it still produces some errors stating permission problems and i couldn't compile it. What will be the problem?
Terminal output of my error while building dependencies is shown below. Please refer to it and tell me what i am doing wrong.

...
changing mode of /home/vijeesh/install/i686-linux-gnu-native/lib/python2.6/lib-dynload/dl.so to 755
changing mode of /home/vijeesh/install/i686-linux-gnu-native/lib/python2.6/lib-dynload/ to 755
error: /home/vijeesh/install/i686-linux-gnu-native/lib/python2.6/lib-dynload/: Operation not permitted
make[3]: *** [sharedinstall] Error 1
make[3]: Leaving directory `/home/vijeesh/xbmc-android/tools/depends/native/python26-native/i686-linux-gnu-native'
make[2]: *** [.installed-i686-linux-gnu-native] Error 2
make[2]: Leaving directory `/home/vijeesh/xbmc-android/tools/depends/native/python26-native'
make[1]: *** [python26-native] Error 2
make[1]: Leaving directory `/home/vijeesh/xbmc-android/tools/depends/native'
make: *** [native/.installed-i686-linux-gnu-native] Error 2
then you should delete /home/vijeesh/install/ aswell (looks like you have used that dir as "--prefix" ... so basically remove everything it generated aswell (source code and prefix dir and tarballs dir).
thank you all... finally i could compile it successfully without any sudo permission...

But the previous problem persists. ie., video and audio playback speeds are higher. In some video, audio plays much faster but video is in slow motion. Tested in galaxy w and galaxy note 2 7.0.
I see the same on odroid-x running android - just consider current master broken somewhat for android...
what can i do to run it properly on my device? i tried the same on different devices but all of them shows the same issue. playback speed is higher. also it is out of sync. what will be the problem?
Pages: 1 2