[GUIDE] How to compile XBMC from source on Debian Squeeze

  • I'm not sure how many people are interested in this but here it is... A guide on how to successfully compile the latest XBMC version from source and have it running on your Debian Squeeze machine.


    Feel free to ask anything but bare in mind that I'm no Linux expert whatsoever. Something might be wrong, something might be missing or this whole procedure might not even work for you. Follow the guide below at your own risk, do not blame me if you screw up your system.


    GUIDE


    1) Make sure your '/etc/apt/sources.list' is something similar to this:


    Code
    deb http://http.debian.net/debian/ squeeze main contrib non-free
    deb-src http://http.debian.net/debian/ squeeze main contrib non-free
    
    
    deb http://http.debian.net/debian/ squeeze-updates main contrib non-free
    deb-src http://http.debian.net/debian/ squeeze-updates main contrib non-free
    
    
    deb http://security.debian.org/ squeeze/updates main contrib non-free
    deb-src http://security.debian.org/ squeeze/updates main contrib non-free


    I also have OMV's repository defined in this file. You don't need to remove/comment it, but for every other repository, please do (you can restore them in the end).


    2) Get the latest XBMC version from source:


    Code
    sudo apt-get install git
    cd $HOME
    git clone git://github.com/xbmc/xbmc.git


    2.1) In order to update the source (and clean old make files) and build a newer version:


    Code
    cd $HOME/xbmc
    git clean -xfd
    git reset --hard
    git pull --rebase


    3) Now we need to install all required dependencies to build XBMC from source, let's start. First update apt-get database and install the base dependencies:


    Code
    sudo apt-get update
    sudo apt-get install automake autopoint bison build-essential ccache cmake curl cvs default-jre fp-compiler gawk gdc gettext git-core gperf libasound2-dev libass-dev libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libbluetooth-dev libboost-dev libboost-thread-dev libbz2-dev libcap-dev libcdio-dev libcurl3 libcurl4-gnutls-dev libcurl4-gnutls-dev libcwiid-dev libcwiid1 libdbus-1-dev libenca-dev libflac-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libhal-dev libhal-storage-dev libiso9660-dev libjasper-dev libjpeg62-dev libltdl-dev liblzo2-dev libmad0-dev libmicrohttpd-dev libmodplug-dev libmpeg2-4-dev libmpeg3-dev libmysqlclient-dev libogg-dev libogg-dev libpcre3-dev libplist-dev libpng12-dev libpostproc-dev libsamplerate0-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl1.2-dev libsmbclient-dev libsqlite3-dev libssh-dev libssl-dev libswscale-dev libtiff4-dev libtool libudev-dev libusb-dev libva-dev libva-x11-1=1.0.1-3 libva1=1.0.1-3 libvdpau-dev libvdpau1=0.4.1-2 libvorbisenc2 libx11-dev libxcb1-dev libxcb1=1.6-1+squeeze1 libxmu-dev libxrandr-dev libxrender-dev libxslt-dev libxt-dev libyajl-dev nasm pmount python-dev python-sqlite swig unzip yasm zip


    3.1) Some required dependencies are too old in Squeeze repository so we need to backport them from Wheezy. Edit '/etc/apt/sources.list' and rename 'squeeze' to 'wheezy' for the following lines:


    Code
    deb http://http.debian.net/debian/ squeeze main contrib non-free
    deb-src http://http.debian.net/debian/ squeeze main contrib non-free


    Then execute the following to install more dependencies:


    Code
    sudo apt-get update
    sudo apt-get install libglew-dev libpulse-dev libtinyxml-dev mesa-utils=8.0.1-2+b3


    You should now restore '/etc/apt/sources.list' to the way it was, put back 'squeeze' instead of 'wheezy'. Don't forget to run 'sudo apt-get update' after any change to the 'sources.list' file.


    3.2) We are not done with the required build dependencies, we still need a few more from different repositories. Edit '/etc/apt/sources.list' and add the following lines:


    Code
    deb http://debian.oppserver.net/debian/ squeeze main contrib non-free
    deb-src http://debian.oppserver.net/debian/ squeeze main contrib non-free
    
    
    deb http://www.deb-multimedia.org/ squeeze main non-free
    deb-src http://www.deb-multimedia.org/ squeeze main non-free
    
    
    deb http://www.deb-multimedia.org/ squeeze-backports main
    deb-src http://www.deb-multimedia.org/ squeeze-backports main


    Then execute the following to install a few more dependencies:


    Code
    sudo apt-get update
    sudo apt-get install libbluray-dev libbluray1 libcec-dev libcec2 libcrystalhd-dev libcrystalhd3 libmp3lame-dev libnfs-dev libshairport-dev libva-egl1 libva-tpi1


    Remove or comment out the lines just added to '/etc/apt/sources.list' if you wish. By this point, we are note going to change the 'sources.list' file anymore so make sure it looks exactly like it was before you started this guide. Don't forget to run 'sudo apt-get update' after any change to the 'sources.list' file.


    4) We are still missing one last build dependency. This one however, will be build it from source. Just do this:


    Code
    cd $HOME/xbmc
    make -C lib/taglib
    sudo make -C lib/taglib install


    5) It's time to configure and compile XBMC...


    Code
    cd $HOME/xbmc
    ./bootstrap
    ./configure
    make


    Since we are building from source, these are unstable builds and debugging should probably be enabled if you need help. Personally, I've disabled debugging but it's your choice. To do that, just pass '--disable-debug' parameter to the configure command above. You can also enable/disable other settings here, look for the available options in the XBMC wiki or forums.


    6) The only step missing is to install XBMC in our system. Just run the following:


    Code
    sudo make install


    This will install XBMC into '/usr/local/bin/xbmc'.


    I don't have a graphical environment installed in my Debian Squeeze machine, only Xorg. I believe you can simply call 'xbmc' to run it but I personally do the following:


    Code
    xinit /usr/local/bin/xbmc --standalone :0


    I've also added a new init script to autostart XBMC when the system boots. I've used the following method for this: http://wiki.xbmc.org/index.php…nux#Add_a_new_init_script


    Done!


    NOTES

    • For now this seems to be working just fine. But bare in mind that Squeeze repository contains a lot of outdated packages, packages that are required to build XBMC from source (that's why we had to install some from Wheezy repository). If something does not work as expected or does not work at all, the culprit is probably an old package that needs to be updated in order to rebuild XBMC from source with the new dependency version.
  • Nazgulled, just from my reading this looks like a really well done guide.


    Thank you for contributing this!


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Not sure how useful it will be since most people around here are not running OMV in the same box as XBMC. But if there's anyone still running Debian Squeeze with a need for XBMC, those people will probably be on this forum :D

  • Ok, I recompiled XBMC after making a few changes to my system and VDPAU is now being used to decode video files. However, it's dropping and skipping frames like crazy! Videos are unwatchable, they play better with the CPU decoding them...


    Here's the changes I did:


    • Upgraded to Linux Kernel 3.2 from Squeeze Backports
    • Upgraded Linux NVIDIA drivers to v310.44 from http://debian.oppserver.net/debian/
    • Upgraded libglew-dev and libglew to version 1.7
    • Upgraded mesa-utils to version 1.8


    After all these changes, I pulled latest changes from XBMC repository, cleaned and rebuilt everything.


    Any ideas?


    P.S: The guide above was updated to reflect the changes to the new dependencies versions. The kernel and NVIDIA drivers it's up to you.

  • Very detailed guide! Thx
    I run XBMC-server on my OMV-Box without GUI, but just to update the xbmc-DB. Guide is in the HowTos. I will add your guide to the HowTos, too.


    And:
    Hopefully we don`t need the guides, when OMV on Wheezy is out :)

  • I hope that too, Solo. ;)


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!