How to build XBMC in Debian (etch)

After many long hours of forum sweeping and googleing I finally managed to build XBMC in Debian. It took me exactly 18 hours to do this starting from scratch. (final build after satisfying all perquisites took about 3 hours)

Yes, it is possible to build and run XBMC in Debian without too much hassle.

Why: I have a linux machine running a server environment for my files, and I thought it would be nice to use it as a media center since it is always on. Since it is al set up i did not want to install an ubuntu on it just for the media center, so I had to build XBMC for Debian (etch)  from the sources. Unfortunately Debian is not yet supported by XBMC community, but you can obtain the source code and build it anyway. Here is what i did. (I am in no way a linux wiz, so this is probably not the best way to build it, but it should work)

My configuration: AMD K7 1300 Mhz, 768Mb RAM, GeForce MX440 SE using Debiean (etch) with Kernel Image 2.6.18-6-k7

Step 1 - Get the source code


(assuming you are root and are in your home folder)



(if you don't have subversion installed: apt-get install subversion )

Step 2 - Install the required packages


Add the backports to your /etc/apt/sources.list


Edit the /etc/apt/sources.list and add contrib and non-free
Install graphics driver so when you run glxinfo you should see Direct rendering enabled.

Now install these packages.



I did my build by excluding faac and pulse audio.

This command will most likely FAIL at the first time you try it, so just get rid of the packages which are not found, and use a tool like aptitude to search for different naming. (lib in front of the name, and/or -dev at the end) My environment is very messy, so I am not sure which ones I had from different sources. Try running ./configure --disable-faac from your XBMC sources directory, and it will complain about what you are missing from the environment.


Step 3 - Configure script


Change to your sources directory and run the ./configure script. (for me it is linuxport/XBMC/)
If ./configure finished successfully you should try to run make
If your lucky enough it might run, but I had several issues with it.

For me the first fix was to re-run configure with disabled PulseAudio and faac.



Step 4 - Editing and running the makefile




From this point my serious issues started, I will list a few which i had, if you are lucky and make finishes successfully, you may skip this section :)

The sqlite3_prepare_v2() issue
I got a missing function error here, so i changed the line of code in question(in the file the error was coming from).

Changed the function name sqlite3_prepare_v2 to sqlite3_prepare

I guess my sqlite libraries are old, you might try updating yours.

The CPulseAudioDirectSound issue

I got an error in the file "AudioRendererFactory.cpp" in line 64 related to CPulseAudioDirectSound not being found. This was strange because i explicitly disabled Pulseaudio. I just commented out both lines of code in this section. (lines 64 and 65)

The smbclient issue



This was a strange issue, i don't know why xbmc-s internal smbclient library does not work. In any case, I've installed smbclient via: apt-get install smbclient smbclient-dev

And edited the Makefile like this:

Find something like: OBJSXBMC += continued by path to libsmbclient-i486-linux.a, should be around line 314 and 315, and enclose it in /* .. */ block. (comment it out)

Next look for the LIBS=... line (around line 85) which contains all libraries and append: -lsmbclient to it's end.

The xrandr.c issues
All of these can be solved by upgrading your libxrandr packages. I did this by manually fetching the files and requirements from the debian packages list. Etch has xrandr 1.1.0 i think, and xbmc requires at least 1.2.3

http://packages.debian.org/lenny/libxrandr-dev

You can get the deb file here and try to install it by: dpkg -i PACKAGENAME.DEB (it will tell you what it's missing, and follow the links on the debian page, you will find them there. Get those packages, and install them the same way, then retry installing xrandr package)

Step 5 - Make Install


Once make has completed successfully (will take a few hours on slower machines) you can install xbmc.



Step 6 - Run and enjoy


Once you installed run it by typing "xbmc" in your terminal.

--------------------------------------

I will try to keep this list updated as comments roll in with problems and solutions.

Have fun using XBMC, and thank the guys and babes at xbmc.org for making such a cool software.

Tags: , , ,

Wednesday, March 25th, 2009 In English, My 2 cents, Tutoriale

2 Comments to How to build XBMC in Debian (etch)

  1. Why on earth is this such a mess? No wonder hardly anyone is using it. And having specific versions for dev libraries in the install is asking for trouble IMO. Why not just have a dependency relation target for XMBC? I applaud you for the effort you have gone to but its failed for me for Lenny and I’m not going to waste any more time on it. What on earth are the developers thinking making it so Ubuntu reliant and basically, a hacked mess of an install? Do they not want people to use it?

  2. Richard on June 23rd, 2009
  3. I posted this article so people would know that if you spend enough time with it, it is possible in the end to compile and run it on Debian even for someone with just basic linux knowledge(like me).

    I agree with you: any way we look at it, compiling this on Debian is a mess. So I listed some of the issues i stumbled in, good luck for all of you, who are building this.

  4. admin on June 30th, 2009

Leave a comment

  Osváth - Boros Róbert

Project manager / consultant and developer (freelancer)

http://www.ready2run.ro

---------------------------

Special skills: DDR dance-a-holic

History of The One

September 2010
M T W T F S S
« Mar    
 12345
6789101112
13141516171819
20212223242526
27282930