Kodi Community Forum
[HOW-TO] Compile XBMC git master branch on Linux - Bluray optional - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
---- Thread: [HOW-TO] Compile XBMC git master branch on Linux - Bluray optional (/showthread.php?tid=95858)

Pages: 1 2 3


[HOW-TO] Compile XBMC git master branch on Linux - Bluray optional - h.udo - 2011-03-03

Compile XBMC master branch on Linux

This guide was originally published on my site. For clarity and brevity, I removed a few things (recompiling XBMC, managing different compiled XBMC versions, compiling with VirtualBox to always have a clean compiling environment, etc). I also removed a bunch of stuff explaining what the commands do. Consider this to be the quick guide and the original to be the I-wish-to-find-out-more-about-this-stuff guide. Either way, you will end up with a compiled from master XBMC. Original guide can be found in the above link or on my signature. Drop me a line, suggestion, whatever, either here or on the site.

These instructions are for Ubuntu 10.10 Maverick 32bits Desktop but can help you compile on other Linux distributions or previous Ubuntu versions.

I don't like to use sudo. If you do, add sudo before every command.
In order to change to superuser (root), you need to give it a password. Open terminal and issue the following command:

Quote:sudo passwd root

Change to root:

Quote:su

You are now the proud owner of superuser superpowers. Use them wisely!

Installing XBMC build dependencies

Quote:apt-get install git-core autopoint checkinstall libvdpau-dev libvdpau1 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 libasound-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 libxtst-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 libwavpack-dev libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext

Add (almost) all dependencies with a few lines. Last time I tried, it didn't work as expected. Want to give it a try? Run

Quote:add-apt-repository ppa:team-xbmc-svn/ppa
apt-get update
apt-get build-dep xbmc

Either way, install all the dependencies needed.

Compile XBMC with Bluray support. If you don't want it, ignore and remove --enable-libbluray from the configure command. Warning: does not provide the ability to play protected Blurays, only unprotected. Add libbluray to the system

Quote:add-apt-repository ppa:hackurx/libbluray
apt-get update
apt-get install libbluray

Change to building directory and clone XBMC git

Quote:cd /usr/local/src
git clone git://github.com/xbmc/xbmc.git

Change to XBMC directory

Quote:cd xbmc

You are in XBMC git master branch but check it anyway

Quote:git checkout master

Building XBMC

Quote:./bootstrap
./configure --prefix=/usr --disable-pulse --enable-libbluray --enable-vdpau
make -j3

The -j3 make switch controls how many cores to use when compiling. Set accordingly.

Quote:checkinstall -y --fstrans=no --install=yes --pkgname=hudo-xbmc --pkgversion="git`date +%Y%m%d`.`git rev-list --abbrev-commit --max-count=1 HEAD`"

Done! Go to Applications >> Sound & Video >> XBMC Media Center.


- jmarshall - 2011-03-03

I suggest using sudo for the things that need it and doing everything else as a normal user.

Cheers,
Jonathan


sudo friendly version - h.udo - 2011-03-03

sudo friendly version

Installing XBMC build dependencies

Quote:sudo apt-get install git-core autopoint checkinstall libvdpau-dev libvdpau1 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 libasound-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 libxtst-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 libwavpack-dev libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext

Add (almost) all dependencies with a few lines. Last time I tried, it didn't work as expected. Want to give it a try? Run

Quote:sudo add-apt-repository ppa:team-xbmc-svn/ppa
sudo apt-get update
sudo apt-get build-dep xbmc

Either way, install all the dependencies needed.

Compile XBMC with Bluray support. If you don't want it, ignore and remove --enable-libbluray from the configure command. Warning: does not provide the ability to play protected Blurays, only unprotected. Add libbluray to the system

Quote:sudo add-apt-repository ppa:hackurx/libbluray
sudo apt-get update
sudo apt-get install libbluray

Making sure you're on your home directory and clone XBMC git. If you want to compile XBMC on /usr/local/src directory like I do or any other directory other that home, every command as to be preceded with sudo.

Quote:cd ~
git clone git://github.com/xbmc/xbmc.git

Change to XBMC directory

Quote:cd xbmc

You are in XBMC git master branch but check it anyway

Quote:git checkout master

Building XBMC

Quote:./bootstrap
./configure --prefix=/usr --disable-pulse --enable-libbluray --enable-vdpau
make -j3

The -j3 make switch controls how many cores to use when compiling. Set accordingly.

Quote:sudo checkinstall -y --fstrans=no --install=yes --pkgname=hudo-xbmc --pkgversion="git`date +%Y%m%d`.`git rev-list --abbrev-commit --max-count=1 HEAD`"

Done! Go to Applications >> Sound & Video >> XBMC Media Center.


libbluray - cipher_ - 2011-03-04

edit: post was unnecessary - sorry


- h.udo - 2011-03-04

sudo friendly version added, as per Jonathan suggestion.

h.udo


sqlite - Grenti - 2011-03-04

Hi,

I keep running into this error after running "make"

/home/xbmc/setup/xbmc/xbmc/dbwrappers/sqlitedataset.cpp:210: undefined reference to `sqlite3_open_v2'
collect2: ld returned 1 exit status
make: *** [xbmc.bin] Error 1

I feel like I've searched everywhere for a solution. Any ideas?

Thanks


- h.udo - 2011-03-04

OK.
If you installed all the needed dependencies, libsqlite3-dev should be in your system. Is it?

System you are building on? 32 or 64bits? git commit? configure command options?


- Grenti - 2011-03-04

I do have libsqlite3-dev. I'm using ubuntu on apple tv. 32 bits. Everything seems to be up to date and I've followed your guide in terms of the git commit and configure command options.


- h.udo - 2011-03-04

Well, I have no way to compile on AppleTV. I don't own one to test with.

Furthermore, my guide doesn't point to a specific git commit. It points to XBMC git master branch HEAD commit. That means it always points to the latest commit.

To find out the commit, issue

git rev-list --max-count=1 HEAD
or
git rev-list --abbrev-commit --max-count=1 HEAD

Please seek help on the AppleTV section. I know we are talking of Ubuntu but the machines are completely different. It seems to be a problem with dependency libraries.

The offending line in that is file is:

Quote:if (sqlite3_open_v2(db_fullpath.c_str(), &conn, flags, NULL)==SQLITE_OK)

Please post if you find the solution. I'll investigate some more.

h.udo


- jmarshall - 2011-03-05

You don't need to sudo to git clone. That was the point I was making. Anything after installing the packages for build can be done without sudo (other than make install, should you wish to do that).


- h.udo - 2011-03-05

Apparently ubuntu doesn't like to make git clones in /usr/local/src without sudo. It also doesn't like a lot of things if we do them _out_ of /home/$user. Just throws the "not allowed" and "you're not root" at you. The arrogant little prick.

This is exactly why I don't like sudo. Too much hassle. A simple su and life is so much simpler.

BTW, I ran into errors running ./bootstrap and ./configure without sudo.

I'm going to upgrade my main machine to Maverick tomorrow and give it another spin. Things may be different in a real system. A VirtualBox machine isn't the same thing. Close, but not the same...


- jmarshall - 2011-03-05

Ok, so why are you extracting to /usr/local/src ?


- davilla - 2011-03-05

sqlite3_open_v2 missing relates to the version of sqlite3 that is installed. Older version will not have this symbol. You might have to manually download and install an updated sqlite3. sqilte3-3.6.11 does have this symbol.


- Grenti - 2011-03-05

i had sqlite 3.7.5 amalgamation installed. i uninstalled it and tried to install sqlite3-3.6.11 and got this error


./.libs/libsqlite3.so: undefined reference to `sqlite3BackupUpdate'
./.libs/libsqlite3.so: undefined reference to `sqlite3BackupRestart'
./.libs/libsqlite3.so: undefined reference to `sqlite3BtreeCopyFile'
collect2: ld returned 1 exit status
make: *** [sqlite3] Error 1


- h.udo - 2011-03-05

jmarshall Wrote:Ok, so why are you extracting to /usr/local/src ?

2 reasons:

- because I like it
- because I don't like to use home. Way too many different things automatically dumped there. It just feels... dirty! Laugh I'm a control freak.


This forum uses Lukasz Tkacz MyBB addons.