Monday, January 30, 2012

Day Eight: Building XBMC from Source

Between working and learning C and Vi for my Operating Systems class, I was not able to put any more time into compiling Freeciv since my last post. Upon starting my Ubuntu install in VirtualBox this afternoon, I discovered that I had somehow corrupted my operating system because it would not boot to desktop. I deleted that setup and installed a new machine with the latest version of Ubuntu. Everything is working fine now, but the delay put me behind schedule. My other group members are reporting success so far in building XBMC from source code. I will document my progress here and list all the steps along the way.

(note: the following steps are for Ubuntu users)
Step 1: Install Source Code
If you do not already have git installed, you can install it from terminal with this command:

sudo apt-get install git-core

Navigate to your home directory and issue this command:

git clone git://github.com/xbmc/xbmc.git xbmc

Step 2: Install Dependencies 
This single line installs most of the dependencies:


sudo apt-get install git-core make g++ gcc gawk pmount libtool nasm yasm automake cmake gperf zip unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound2-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmpeg3-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs python-dev libyajl-dev libboost-thread-dev libplist-dev libusb-dev libudev-dev

And then one more line for newer versions of Ubuntu:

sudo apt-get install autopoint libltdl-dev


Step 3: Add XBMC's PPA to Your System
You can use these commands to add the PPA to your apt repository:

sudo add-apt-repository ppa:team-xbmc/unstable
sudo add-apt-repository ppa:pulse-eight/libcec

(These are other possible PPAs but they should not be necessary)
ppa:team-xbmc/ppa
ppa:team-xbmc/xbmc-ppa-build-depends
ppa:nathan-renniewaldock/xbmc-stable


Then update apt-get:

sudo apt-get update


Then run the "magic command" to build the dependencies

(note: this part did not work for me on 10.04, but xbmc compiled correctly anyways)
sudo apt-get build-dep xbmc        

Step 4: Compile
Navigate to the xbmc directory and run the following commands:
./bootstrap
./configure
make
make install    (note: might need to admin privileges)


Unfortunately, my compilation breaks during the make process, and I am unable to compile XBMC from source at the moment. I tried to utilize all of my resources, but it is obvious that I will need to make a topic on XBMC's forum or start a conversation in the IRC.

I have tried to compile the source code from the SVN repository as well and discovered some missing dependencies that were not installed from the provided command line code. Here are the extra dependencies that I had to install: libmms-dev, libwavpack-dev, libfaad-dev

The SVN version did not compile either. I will retry the process on a different virtual machine running an older version of Ubuntu. That is the only thing I can think to do at this point.

UPDATE:
I created a new virtual machine with Ubuntu 10.04 and went through all of the steps again. It compiles successfully and I am able to run it by calling "xbmc" through the terminal. Hooray!


No comments:

Post a Comment