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.
- mpthompson
- Posts: 620
- Joined: Fri Feb 03, 2012 7:18 pm
- Location: San Carlos, CA
Re: Instructions for building XBMC for Raspbian
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:
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'
- mpthompson
- Posts: 620
- Joined: Fri Feb 03, 2012 7:18 pm
- Location: San Carlos, CA
Re: Instructions for building XBMC for Raspbian
Sorry, I don't see what the problem is. Did you perform step 8?robotfunk wrote:Any idea what to do here? Here's a full output I'm getting:
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.
Re: Instructions for building XBMC for Raspbian
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
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
- mpthompson
- Posts: 620
- Joined: Fri Feb 03, 2012 7:18 pm
- Location: San Carlos, CA
Re: Instructions for building XBMC for Raspbian
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.
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.
Re: Instructions for building XBMC for Raspbian
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.mpthompson wrote:I would love to hear if others have been able to follow the steps to create a working version of XBMC.
Patrick
-
- Posts: 7
- Joined: Sat Jul 07, 2012 10:03 am
Re: Instructions for building XBMC for Raspbian
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

Steve
LinuxLinks.com
http://www.linuxlinks.com
Re: Instructions for building XBMC for Raspbian
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)mpthompson wrote:I would love to hear if others have been able to follow the steps to create a working version of XBMC.
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.
Re: Instructions for building XBMC for Raspbian
Did you do the apt-get install part ?bob_binz wrote: checking for gcry_control in -lgcrypt...no
configure: error: Could not find required library. Please see the README for your platform.
You are certainly missing the libgcrypt-dev package.
Try : apt-get install libgcrypt11-dev
Re: Instructions for building XBMC for Raspbian
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:eppe wrote:Did you do the apt-get install part ?bob_binz wrote: checking for gcry_control in -lgcrypt...no
configure: error: Could not find required library. Please see the README for your platform.
You are certainly missing the libgcrypt-dev package.
Try : apt-get install libgcrypt11-dev
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
Re: Instructions for building XBMC for Raspbian
make is running for about 3 hours now. Let's see where it goes.
-
- Posts: 7
- Joined: Sat Jul 07, 2012 10:03 am
Re: Instructions for building XBMC for Raspbian
It took about 11 hours to compile. Not bad!
- mpthompson
- Posts: 620
- Joined: Fri Feb 03, 2012 7:18 pm
- Location: San Carlos, CA
Re: Instructions for building XBMC for Raspbian
And...linuxlinks wrote:It took about 11 hours to compile. Not bad!

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

Re: Instructions for building XBMC for Raspbian
Ok, I borked my symlinks. Build underway. See ya in half a day!
-
- Posts: 7
- Joined: Sat Jul 07, 2012 10:03 am
Re: Instructions for building XBMC for Raspbian
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.mpthompson wrote:And...linuxlinks wrote:It took about 11 hours to compile. Not bad!![]()
Sorry, I'm just very curious as to whether the build instructions worked for someone else.
- mpthompson
- Posts: 620
- Joined: Fri Feb 03, 2012 7:18 pm
- Location: San Carlos, CA
Re: Instructions for building XBMC for Raspbian
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.linuxlinks wrote:One problem is that when exiting xbmc, the keyboard no longer responds; the pi hasn't hung as can still ssh in.
Re: Instructions for building XBMC for Raspbian
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.
Re: Instructions for building XBMC for Raspbian
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!
This is really a great stuff! Thanks obsys for the good work and mike for putting together the instructions!
Re: Instructions for building XBMC for Raspbian
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.
Re: Instructions for building XBMC for Raspbian
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).
Re: Instructions for building XBMC for Raspbian
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).
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).
-
- Posts: 96
- Joined: Fri Jun 29, 2012 2:27 pm
- Location: In the sticks of Haggisland
Re: Instructions for building XBMC for Raspbian
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.Iggy82 wrote:... I'll try and host an SD image of this once I have it all up and running (probably tomorrow night).
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?
Re: Instructions for building XBMC for Raspbian
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:
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.
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

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"
Re: Instructions for building XBMC for Raspbian
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)
- mpthompson
- Posts: 620
- Joined: Fri Feb 03, 2012 7:18 pm
- Location: San Carlos, CA
Re: Instructions for building XBMC for Raspbian
Thanks, I was looking for this specific information. Helps a lot.Beini wrote:2. Symlinking and copying to system directories just feels dirty to meHere'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: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.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"