User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Instructions for building XBMC for Raspbian

Thu Jul 05, 2012 7:43 am

Obsys on the #raspbian IRC channel passed along to me some instructions for creating a working version of XBMC in Raspbian. Building my own version of XBMC, I've refined the instructions a bit and posted them on the Raspbian wiki:

http://www.raspbian.org/RaspbianXBMC

Testing XBMC with some H.264 media files I do have to say that the result is quite snappy and thoroughly usable. The playback is also extremely smooth without any stuttering or skipping of the image. Obsys indicates that XBMC running on Raspbian seems to be smoother and more responsive than XBMC on some of the more specialized Linux distributions, but I have not verified this myself.

The build instructions are not optimal and a number of improvements could be made. However, they are it's a good place to start. Over time I'll work to improve the build process and I hope others will help as well. On an class 4 SD card, the build process took a little over 24 hours. I can safely say that this is probably about the most complex piece of software one would probably want to build on a Raspberry Pi.

To save others the arduous task of building XMBC I'll look into releasing a Raspbian SD image that includes XBMC based on the build. However, it may take me some time for me to get to.

I would like to thank Obsys for the build instructions and for helping me on IRC through some difficulties I had in initially getting XBMC to run.

Given the number of people who ask about XMBC running within Raspbian on the IRC channel, I have a feeling these instruction will be useful to a number of other people.

robotfunk
Posts: 45
Joined: Wed May 30, 2012 7:28 pm

Re: Instructions for building XBMC for Raspbian

Fri Jul 06, 2012 3:15 pm

Thanks for this, it would be great not to have to change SD cards to run XBMC. I'm using Hexxeh's image of Raspbian (fully updated). One thing that is odd here is that sudo does not work (not found).
So I had to change tools/rbp/setup-sdk.sh to remove the odd instance of 'sudo'. I'm root by the way.

So far so good. I cloned the git repo and I tried to 'make -C tools/rbp/depends/xbmc/'.
It errors with 'configure.in:2113: required file `${OUTPUT_FILES}.in' not found'.

Any idea what to do here? Here's a full output I'm getting:

Code: Select all

root@raspbian:/home/xbmc-rbp# make -C tools/rbp/depends/xbmc/
make: Entering directory `/home/xbmc-rbp/tools/rbp/depends/xbmc'
cd ../../../../; ./bootstrap
autoreconf2.50: Entering directory `.'
autoreconf2.50: configure.in: not using Gettext
autoreconf2.50: running: aclocal --force 
autoreconf2.50: configure.in: tracing
autoreconf2.50: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf2.50: running: /usr/bin/autoconf --force
autoreconf2.50: running: /usr/bin/autoheader --force
autoreconf2.50: running: automake --add-missing --copy --force-missing
Useless use of /d modifier in transliteration operator at /usr/share/automake-1.9/Automake/Wrap.pm line 60.
configure.in: installing `build-aux/install-sh'
configure.in: installing `build-aux/missing'
configure.in:12: installing `build-aux/config.guess'
configure.in:12: installing `build-aux/config.sub'
configure.in:2113: required file `${OUTPUT_FILES}.in' not found
autoreconf2.50: automake failed with exit status: 1
make: *** [configure] Error 1
make: Leaving directory `/home/xbmc-rbp/tools/rbp/depends/xbmc'

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Instructions for building XBMC for Raspbian

Fri Jul 06, 2012 8:19 pm

robotfunk wrote:Any idea what to do here? Here's a full output I'm getting:
Sorry, I don't see what the problem is. Did you perform step 8?

To get sudo on Hexxeh's image, just do 'apt-get install sudo'. You'll then need to add your user account to the sudo group in '/etc/group' file.

eppe
Posts: 19
Joined: Mon May 14, 2012 12:23 am

Re: Instructions for building XBMC for Raspbian

Fri Jul 06, 2012 11:00 pm

Hi robotfunk,

I went through this step successfully, the only difference I see from your logs is the automake version.
I have 1.11 on my raspbian while you seem to be running the 1.9.

Give a try to :
apt-get install automake
automake --version
I am getting :
automake (GNU automake) 1.11.5

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 5:02 am

I would love to hear if others have been able to follow the steps to create a working version of XBMC.

My next steps will be to eliminate the need to monkey around with the Broadcom GL libraries and header files and to have the install go into /opt/xbmc. It would be great if someone beat me to it and we could update the wiki with the necessary changes to the build recipe.

posi
Posts: 3
Joined: Thu Jul 05, 2012 6:55 pm

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 6:29 am

mpthompson wrote:I would love to hear if others have been able to follow the steps to create a working version of XBMC.
Building works for me without any problems. I did not tried the binary yet. I can't confirm the duration - my build finished in less than 12h. Can't imagine that the SD card is the reason... Will give more feedback later today.

Patrick

linuxlinks
Posts: 7
Joined: Sat Jul 07, 2012 10:03 am
Contact: Website

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 10:06 am

I am currently building XBMC, been going for about 7 hours so far; with a Class 10 card. Hopefully it won't take 24 hours ;)

Steve
LinuxLinks.com
http://www.linuxlinks.com

User avatar
bob_binz
Posts: 373
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 11:30 am

mpthompson wrote:I would love to hear if others have been able to follow the steps to create a working version of XBMC.
No joy so far - using a heavily modified Hexxeh-R3 image though (because I was playing with it before Pisces was available and have it set up nice now)

Needed to add libtool, gettext, autoconf and autopoint so far (obviously already in Pisces)

Now stopping during configure with:

Code: Select all

checking for gcry_control in -lgcrypt...no
configure: error: Could not find required library. Please see the README for your platform.
Not taken this any further as yet because I'm now AFP (away from Pi) Will get onto it later and update if I get anywhere.

eppe
Posts: 19
Joined: Mon May 14, 2012 12:23 am

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 12:12 pm

bob_binz wrote: checking for gcry_control in -lgcrypt...no
configure: error: Could not find required library. Please see the README for your platform.
Did you do the apt-get install part ?
You are certainly missing the libgcrypt-dev package.
Try : apt-get install libgcrypt11-dev

User avatar
bob_binz
Posts: 373
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 12:33 pm

eppe wrote:
bob_binz wrote: checking for gcry_control in -lgcrypt...no
configure: error: Could not find required library. Please see the README for your platform.
Did you do the apt-get install part ?
You are certainly missing the libgcrypt-dev package.
Try : apt-get install libgcrypt11-dev
Thanks for replying. libgcrypt is installed. Having looked at the log file, it's a problem with the GL ES parts, so I need to go back and check my symlinks. Here's the interesting part from the logfile:

Code: Select all

configure:19226: checking for gcrypt.h
configure:19226: result: yes
configure:19236: checking for gcry_control in -lgcrypt
configure:19261: arm-linux-gnueabihf-gcc -o conftest  -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -O2   conftest.c -lgcrypt   -lEGL -lGLESv2 -lbcm_host -lvcos -lvchiq_arm -L/usr/lib/arm-linux-gnueabihf -lmysqlclient -lpthread -lm -lrt -ldl >&5
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glDiscardFramebufferEXT'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glPointSizePointerOES'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_set_error_api'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_BindFramebuffer'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glintAttribPointer'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_state_free'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_FramebufferRenderbuffer'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_buffer_info_set'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_set_error'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_DeleteFramebuffers'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `gl11_client_state_init'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_GetFramebufferAttachmentParameteriv'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_IsRenderbuffer'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_GetRenderbufferParameteriv'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_DeleteRenderbuffers'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_FramebufferTexture2D'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_BindRenderbuffer'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_GenerateMipmap'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_RenderbufferStorage'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_GenFramebuffers'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_GenRenderbuffers'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_CheckFramebufferStatus'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `gl20_client_state_init'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_buffer_info_get'
/usr/lib/arm-linux-gnueabihf/libEGL.so: undefined reference to `glxx_client_IsFramebuffer'
collect2: ld returned 1 exit status

lanlafi
Posts: 16
Joined: Sat Jun 02, 2012 9:15 am

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 1:28 pm

make is running for about 3 hours now. Let's see where it goes.

linuxlinks
Posts: 7
Joined: Sat Jul 07, 2012 10:03 am
Contact: Website

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 2:29 pm

It took about 11 hours to compile. Not bad!

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 6:12 pm

linuxlinks wrote:It took about 11 hours to compile. Not bad!
And... :)

Sorry, I'm just very curious as to whether the build instructions worked for someone else. ;)

User avatar
bob_binz
Posts: 373
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 7:07 pm

Ok, I borked my symlinks. Build underway. See ya in half a day!

linuxlinks
Posts: 7
Joined: Sat Jul 07, 2012 10:03 am
Contact: Website

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 9:24 pm

mpthompson wrote:
linuxlinks wrote:It took about 11 hours to compile. Not bad!
And... :)

Sorry, I'm just very curious as to whether the build instructions worked for someone else. ;)
Sorry. The instructions worked perfectly. One problem is that when exiting xbmc, the keyboard no longer responds; the pi hasn't hung as can still ssh in.

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Instructions for building XBMC for Raspbian

Sat Jul 07, 2012 11:05 pm

linuxlinks wrote:One problem is that when exiting xbmc, the keyboard no longer responds; the pi hasn't hung as can still ssh in.
I sometimes have keyboard hangups as you describe, but not associated specifically with XBMC. I just unplug and then plug it back in to the USB port to get it working again.

lanlafi
Posts: 16
Joined: Sat Jun 02, 2012 9:15 am

Re: Instructions for building XBMC for Raspbian

Sun Jul 08, 2012 6:48 am

Build was successful. config.status was created at 11:38 am, xbmc.bin was created 10:41 pm, last write to system dir was 11:44 pm, so about 12 hours. Build instructions were fine.

jerhat
Posts: 14
Joined: Fri Jun 08, 2012 1:26 am

Re: Instructions for building XBMC for Raspbian

Sun Jul 08, 2012 7:14 am

I didn't do accurate benchmarking but I can say it is much smoother than openelec xbmc, especially when navigating through the menus. xbmc on raspbian: cpu usage around 85%, openelec xbmc: cpu 100%.

This is really a great stuff! Thanks obsys for the good work and mike for putting together the instructions!

lanlafi
Posts: 16
Joined: Sat Jun 02, 2012 9:15 am

Re: Instructions for building XBMC for Raspbian

Sun Jul 08, 2012 8:14 am

xbmc runs OK on raspbian. I've tried with the 192 MB memory split, but it didn't work out, xbmc stucks in menus, needs to be killed via ssh. So, it should be run with the 128 MB memory split, as in the instruction. I have lots of black screens with some media, even with the default color depth.

lanlafi
Posts: 16
Joined: Sat Jun 02, 2012 9:15 am

Re: Instructions for building XBMC for Raspbian

Sun Jul 08, 2012 9:44 am

Disregard my previous comment about black screens during playback, it is an issue of my monitor (Samsung 2243SW connected via a HDMI to DVI adapter and a DVI cable). I've reconnected the Pi to my Panasonic TV via HDMI, and there were no black screens during playback. Even srt subtitles work, which didn't work on openelec xbmc the last time I've checked (a month ago).

User avatar
Iggy82
Posts: 10
Joined: Sat Jun 02, 2012 12:55 pm
Location: Cambridge, UK
Contact: Website

Re: Instructions for building XBMC for Raspbian

Sun Jul 08, 2012 3:10 pm

Now installing this, I guess it gonna be an overnight job to compile.

Note for other users haven't had XBMC running on thier Pi yet I would recommend downloading the latest SD card OpenELEC image from http://www.kvarley.co.uk/raspberrypi/openelec/

The latest OpenELEC is pretty snappy compared to its older siblings so I'll be really interested to see how this build performs. The primary purpose of my Pi is XBMC so I'm always looking to find the best performing variant! Comments so far have been very promising! I'll try and host an SD image of this once I have it all up and running (probably tomorrow night).

ejsolutions
Posts: 96
Joined: Fri Jun 29, 2012 2:27 pm
Location: In the sticks of Haggisland

Re: Instructions for building XBMC for Raspbian

Sun Jul 08, 2012 7:45 pm

Iggy82 wrote:... I'll try and host an SD image of this once I have it all up and running (probably tomorrow night).
A 'clean' pisces+xbmc image would be extremely useful for many. I'm currently building as per above but it's on a system with tweaks and additions.

So far, I've noted:
Early on there was a complaint about gperf not being installed with triggers and to run debhelper on it.
Numerous warnings about deprecated functions being used.

Rhetorical; why is it that no matter how powerful CPUs have become in twenty years, a compile still takes ages?

Beini
Posts: 16
Joined: Mon Jul 09, 2012 4:26 pm

Re: Instructions for building XBMC for Raspbian

Mon Jul 09, 2012 4:46 pm

Thank you for the instructions. I have now succesfully build it and it took about 2h with distcc. Here's some of my notes about the process:

1. ./configure fails without 'zip' and 'unzip installed, and they are missing from the apt-get install list.

2. Symlinking and copying to system directories just feels dirty to me :) Here's how I did it:

Made the file /etc/ld.so.conf.d/0_broadcom.conf and added a the line "/opt/vc/lib/" to it. After that ran ldconfig. Used these environment variables to set the paths:

Code: Select all

export C_INCLUDE_PATH=/opt/vc/include:/opt/vc/include/interface/vcos/pthreads
export CPLUS_INCLUDE_PATH=/opt/vc/include:/opt/vc/include/interface/vcos/pthreads
export LDFLAGS="-L/opt/vc/lib"
That way no symlinks or copying to system directories is needed. That said, might be better to install xbmc to /usr/local when doing it manually like this.

User avatar
paaland
Posts: 71
Joined: Mon Mar 12, 2012 2:30 pm
Location: Norway
Contact: Website

Re: Instructions for building XBMC for Raspbian

Mon Jul 09, 2012 5:04 pm

The building went fine, and took about 12 hours, but when I try to start xbmc all I get is a message box that says I need to run with color depth of at least 16 bits. How can I change the color depth in xwindows on Raspbian?
Dragon 32>BBC Model B>PC>PC>PC>PC>Raspberry PI (circle complete)

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Instructions for building XBMC for Raspbian

Mon Jul 09, 2012 6:23 pm

Beini wrote:2. Symlinking and copying to system directories just feels dirty to me :) Here's how I did it:

Made the file /etc/ld.so.conf.d/0_broadcom.conf and added a the line "/opt/vc/lib/" to it. After that ran ldconfig. Used these environment variables to set the paths:

Code: Select all

export C_INCLUDE_PATH=/opt/vc/include:/opt/vc/include/interface/vcos/pthreads
export CPLUS_INCLUDE_PATH=/opt/vc/include:/opt/vc/include/interface/vcos/pthreads
export LDFLAGS="-L/opt/vc/lib"
That way no symlinks or copying to system directories is needed. That said, might be better to install xbmc to /usr/local when doing it manually like this.
Thanks, I was looking for this specific information. Helps a lot.

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 18 guests