Building for Android x86 fails
#1
Hi,
I'm trying to build XBMC for Android x86. I'm using Ubuntu 12.04 64bits.
I have installed ndkr9 and latest sdk.

Have installed these libs:
sudo apt-get install build-essential default-jdk git curl autoconf unzip zip zlib1g-dev gawk gperf cmake
sudo apt-get install ia32-libs

Executed this command:
./make-standalone-toolchain.sh --ndk-dir=../../ --install-dir=${TOOL_CHAIN}android-14 --platform=android-14 --toolchain=x86-4.8 --arch=x86 --system=linux-x86_64

then boostrap in tools depends and configure:
sudo ./configure --with-tarballs=/opt/xbmc-tarballs --host=i686-linux-android --with-sdk-path=/home/phi_admin/android-sdk-linux --with-ndk=/home/phi_admin/android-ndk-r9/ --with-toolchain=/home/phi_admin/android-ndk-r9/platforms/android-14 --prefix=/opt/xbmc-depends

Here is the configure logs:
http://pastebin.com/yQphAzyq

then i'm calling make.

However make of dependency is failing. Here is the log for the make -j 20:
mpih-add1-asm.S: Assembler messages:
mpih-add1-asm.S:47: Error: invalid instruction suffix for `push'
mpih-add1-asm.S:48: Error: invalid instruction suffix for `push'
mpih-add1-asm.S:78: Error: operand type mismatch for `jmp'
mpih-add1-asm.S:113: Error: invalid instruction suffix for `pop'
mpih-add1-asm.S:114: Error: invalid instruction suffix for `pop'
make[5]: *** [mpih-add1-asm.lo] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all] Error 2
make[2]: *** [i686-linux-android-android-14/src/.libs/libgcrypt.a] Error 2
make[1]: *** [libgcrypt] Error 2
make: *** [target/.installed-i686-linux-android-android-14] Error 2


The full logs are here:
http://pastebin.com/Bvz2eH2B


Any ideas what is wrong?
Reply
#2
please use pastebin.com and remove the pasted stuff
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
Your toolchain isn't used ... post tools/depends/config.log ... also what is ${TOOL_CHAIN}
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#4
Using this one.
TOOL_CHAIN_X86=/home/phi_admin/android-ndk-r9/platforms/android-14/

The config.log is in here:
http://pastebin.com/Z7F5HCwP
Reply
#5
Think this is wrong:

--with-toolchain=/home/phi_admin/android-ndk-r9/platforms/android-14

it should point in here
/home/phi_admin/android-ndk-r9/toolchains/x86-4.8/prebuilt/linux-x86_64/

isn't it?

Apparently it was the toolchain.. it's building...
Reply
#6
same error Sad

http://pastebin.com/cwLh1bga
Reply
#7
Being a thick Welshman and all that I don't understand why you're trying to build XBMC for Android x86 when xbmc already has an Android x86 Gotham build out or am I missing something??
Reply
#8
I repeat my question - what is ${TOOL_CHAIN} in your cmdline you posted. The Toolchain dir has to match what you have given as install-dir in the make-standalone-toolchain.sh command ...

./make-standalone-toolchain.sh --ndk-dir=../../ --install-dir=${TOOL_CHAIN}android-14 --platform=android-14 --toolchain=x86-4.8 --arch=x86 --system=linux-x86_64
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#9
Hi sheepybach,
unfortunately our customer wants to use the DVD player of his Android device, and XBMC has DVD player libraries in it. However they are not being used in the Android XBMC app version, I want to make them available.
In order to do so I need to re build it.

Hi memphiz,


I found out that I was using the toolchain r9 which is wrong. I'm re trying with the r8 now.
Reply
#10
r9 was fine ... r9e (or any other letter) is not.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#11
Hi, i'm trying to build XBMC for Android x86 on the same computer of Coutinho (we work together), I advanced few steps, but it generated an error.

I executed this command: OK
sudo ./make-standalone-toolchain.sh --ndk-dir=../../
--install-dir=/home/phi_admin/android-ndk-r9/toolchains/x86-4.8/prebuilt/linux-x86_64/
--platform=android-14 --toolchain=x86-4.8 --arch=x86
--system=linux-x86_64


After this command: but output was : "key already exists", then i believe that is correct.
sudo 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



after in /xbmc-android/tools/depends, executed these three commands

1 - phi_admin@Phi02:~/xbmc1/xbmc-android/tools/depends$ sudo ./bootstrap

2 - phi_admin@Phi02:~/xbmc1/xbmc-android/tools/depends$ sudo ./configure
--with-tarballs=/opt/xbmc-tarballs --host=i686-linux-android
--with-sdk-path=/home/phi_admin/android-sdk-linux
--with-ndk=/home/phi_admin/android-ndk-r9
--with-toolchain=/home/phi_admin/android-ndk-r9/toolchains/x86-4.8/prebuilt/linux-x86_64
--prefix=/opt/xbmc-depends

3 - phi_admin@Phi02:~/xbmc1/xbmc-android/tools/depends$ sudo make -j1


in "sudo make -j1", this command run for ~10 minutes, then:

/home/phi_admin/android-ndk-r9/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.8/../../../../i686-linux-android/bin/ld:
error: /opt/xbmc-depends/i686-linux-android-android-14/lib/libusb.a(usb.o):
incompatible target
/home/phi_admin/android-ndk-r9/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.8/../../../../i686-linux-android/bin/ld:
error: /opt/xbmc-depends/i686-linux-android-android-14/lib/libusb.a(linux.o):
incompatible target
../.libs/libusbpp.a(usbpp.o):usbpp.cpp:function
USB:Big Grinevice:Confusedtring(std:Confusedtring&, int, unsigned short): error:
undefined reference to 'usb_get_string'
../.libs/libusbpp.a(usbpp.o):usbpp.cpp:function
USB:Big Grinevice:Confusedtring(std:Confusedtring&, int, unsigned short): error:
undefined reference to 'usb_get_string'
../.libs/libusbpp.a(usbpp.o):usbpp.cpp:function
USB:Big Grinevice::controlTransfer(unsigned char, unsigned char, unsigned
short, unsigned short, unsigned short, unsigned char*, int): error:
undefined reference to 'usb_control_msg'
../.libs/libusbpp.a(usbpp.o):usbpp.cpp:function
USB::Interface::driverName(std:Confusedtring&): error: undefined reference
to 'usb_get_driver_np'
../.libs/libusbpp.a(usbpp.o):usbpp.cpp:function USB::Busses::rescan():
error: undefined reference to 'usb_find_busses'
../.libs/libusbpp.a(usbpp.o):usbpp.cpp:function USB::Busses::rescan():
error: undefined reference to 'usb_find_devices'
../.libs/libusbpp.a(usbpp.o):usbpp.cpp:function USB::Busses::rescan():
error: undefined reference to 'usb_get_busses'
../.libs/libusbpp.a(usbpp.o):usbpp.cpp:function USB::Busses::rescan():
error: undefined reference to 'usb_open'
../.libs/libusbpp.a(usbpp.o):usbpp.cpp:function USB::Busses::Busses():
error: undefined reference to 'usb_init'
../.libs/libusbpp.a(usbpp.o):usbpp.cpp:function
USB:Big Grinevice::~Device(): error: undefined reference to 'usb_close'
collect2: error: ld returned 1 exit status
make[5]: *** [descriptor_test] Error 1
make[5]: Leaving directory
`/home/phi_admin/xbmc1/xbmc-android/tools/depends/target/libusb/i686-linux-android-android-14/tests'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
`/home/phi_admin/xbmc1/xbmc-android/tools/depends/target/libusb/i686-linux-android-android-14'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/home/phi_admin/xbmc1/xbmc-android/tools/depends/target/libusb/i686-linux-android-android-14'
make[2]: *** [i686-linux-android-android-14/.libs/libusb.a] Error 2
make[2]: Leaving directory
`/home/phi_admin/xbmc1/xbmc-android/tools/depends/target/libusb'
make[1]: *** [libusb] Error 2
make[1]: Leaving directory
`/home/phi_admin/xbmc1/xbmc-android/tools/depends/target'
make: *** [target/.installed-i686-linux-android-android-14] Error 2


Error log ( Last piece of terminal): http://pastebin.com/igD0AH0c

know about? any ideas?
Reply
#12
Jenkins builds this fine each night. See the output of a complete build here:

http://jenkins.xbmc.org/job/XBMC-Android...onsoleFull

See our configure line:

./configure --with-tarballs=/home/jenkins/xbmc-tarballs --host=i686-linux-android --with-sdk-path=/home/jenkins/android-dev/android-sdk-linux --with-ndk=/home/jenkins/android-dev/android-ndk-r9 --with-toolchain=/home/jenkins/android-dev/x86-linux-4.8-vanilla/android-14 --prefix=/home/jenkins/workspace/XBMC-Android-X86@2/tools/depends/xbmc-depends

Especially the --with-toolchain which points to /home/jenkins/android-dev/x86-linux-4.8-vanilla/android-14

This should be /home/phi_admin/android-ndk-r9/toolchains/x86-4.8/prebuilt/linux-x86_64/android-14 on yours ... (check if there is an android-14 subdir) ... i guess there is still something wrong with the configure line.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#13
In the "make-standalone-toolchain.sh" command, the "--install-dir" should point to a separate, new directory.
Having "--install-dir=/home/phi_admin/android-ndk-r9/toolchains/x86-4.8/prebuilt/linux-x86_64/" is wrong. It installs on itself and you probably corrupted your ndk.

Quote:The --install-dir option (and therefore the <android-toolchain-arm>/<android-toolchain-x86> value)
specifies where the resulting toolchain should be installed (your choice).
Reply
#14
Thats even worse then i figured Wink
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#15
I run these commands with yours tips:

This command i change the "install-dir" and download a new ndk, case i had corrupte my last ndk.
# sudo ./make-standalone-toolchain.sh --ndk-dir=../../ --install-dir=$HOME/toolchain/android-14 --platform=android-14 --toolchain=x86-4.8 --system=linux-x86

Now my configure run perfectly.
# sudo ./configure --with-tarballs=/opt/xbmc-tarballs --host=i686-linux-android --with-sdk-path=/home/pazeto/Android/android-sdks --with-ndk=/home/pazeto/Android/android-ndk-r9b1 --with-toolchain=/home/pazeto/toolchain/android-14 --prefix=/opt/xbmc-depends

then, i run this:
#sudo make -C tools/depends/target/xbmc

and after, this:
# make

then:
Undecided

AR xbmc/commons/commons.a
CPP xbmc/android/activity/android_main.o
CPP xbmc/android/activity/AndroidFeatures.o
CPP xbmc/android/activity/AndroidKey.o
CPP xbmc/android/activity/AndroidTouch.o
CPP xbmc/android/activity/AndroidMouse.o
AndroidMouse.cpp: In member function 'bool CAndroidMouse::onMouseEvent(AInputEvent*)':
AndroidMouse.cpp:48:11: warning: unused variable 'mousePointerId' [-Wunused-variable]
int32_t mousePointerId = AMotionEvent_getPointerId(event, mousePointerIdx);
^
CPP xbmc/android/activity/AndroidJoyStick.o
In file included from AndroidJoyStick.cpp:22:0:
AndroidExtra.h:35:25: error: expected identifier before numeric constant
#define AKEYCODE_ESCAPE 111
^
AndroidExtra.h:35:25: error: expected '}' before numeric constant
AndroidExtra.h:35:25: error: expected unqualified-id before numeric constant
In file included from /home/pazeto/toolchain/android-14/sysroot/usr/include/android/input.h:45:0,
from /home/pazeto/toolchain/android-14/sysroot/usr/include/android/native_activity.h:27,
from XBMCApp.h:27,
from AndroidJoyStick.cpp:23:
/home/pazeto/toolchain/android-14/sysroot/usr/include/android/keycodes.h:259:1: error: expected declaration before '}' token
}
^
make[1]: *** [AndroidJoyStick.o] Error 1


Error log ( Last piece of terminal ):
http://pastebin.com/81tzWbGr

thanks for the replies, and you know about this error?
Reply

Logout Mark Read Team Forum Stats Members Help
Building for Android x86 fails0