• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 14
Linux HOW-TO compile XBMC from a GIT source
#1
Star 
This is is provided as under GPL V3 read If you improve on this, please consider sharing your improvements or modifications cause it can help everyone else.)

Find in This How-to:

  1. Manual Compile step by step instructions. (recommended you do it at least ONCE.
  2. Script Version ( see FAQ's ) DO IT after you have compiled once by hand so you learn something about what your doing.

  3. Update Sections (contain further extension/improvements/important information

*Warning Image your HDD before doing anything else in this topic. Imaging programs such as clonezilla or Acronis True Image 2011, since it's Bootable rescue media fully supports all windows and Linus FS such as EXT2 EXT3 and EXT4, I have sourced an exclusive 15% discount for my blog readers.

*WARNING, sudo is not being used in this tutorial, I hate sudo and run as root for maintenance purposes ONLY. Otherwise you must use sudo.

If you have an existing XBMCLive which has been compiled via SVN must start with step A. If you used ccache with SVN, it therefore must be cleared out, just in case before using GIT, follow step B

A) aptitude purge subversion -y -q

B) ccache -zcC

Now proceed to step 1 and wait for completion and everytime after that for updates only use Step 2

If you have an existing XBMCLive which has never been compiled, simply start with step 1, thereafter every-time you wish to Simply update the existing code to a more recent version and compile use step 2

1) Upgrading existing XBMCLive with via compile of GIT source


Code:
stop xbmc-live
apt-get install python-software-properties pkg-config -y[font=verdana]
[/font]add-apt-repository [b]ppa:team-iquik/xbmc-stable[/b]
apt-get update
apt-get install [b]libplist-dev [/b]python-support python-dev ccache libyajl-dev libvdpau-dev debhelper zip git-core make g++ gcc gawk pmount libtool yasm nasm automake cmake gperf gettext 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-openssl-dev x11proto-xinerama-dev libxinerama-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 libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev
libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev
libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev
libiso9660-dev libass-dev libssl-dev fp-compiler gdc libwavpack-dev
libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libboost-thread-dev -y -q
apt-get build-dep xbmc -y
mkdir ~/setup
cd $HOME/setup
git clone git://github.com/xbmc/xbmc.git
make -C lib/libnfs && sudo make -C lib/libnfs install
./bootstrap; ./configure --prefix=/usr --enable-vdpau --disable-pulse ; make -j4
make -C lib/addons/script.module.pil
make install prefix=/usr
start xbmc-live
2) Updating an already existing GIT COMPILE to latest version
Code:
stop xbmc-live
cd $HOME/setup/xbmc
make distclean
git reset --hard
git clean -xfd
git pull --rebase
make -C lib/libnfs && sudo make -C lib/libnfs install
./bootstrap ; ./configure --prefix=/usr --enable-vdpau --disable-pulse --disable-crystalhd
make -C $HOME/setup/xbmc/lib/addons/script.module.pil
make -j4
make install prefix=/usr
start xbmc-live
Finally you should, though your not obliged to improve your boot time and install ureadahead
Code:
[b] apt-get install ureadahead -y -q[/b]
[b]FAQ
[/b]
Q) I'm running maverick, do I need more dependencies?
A) Yes
Code:
apt-get install autopoint
Note:
New Distros or non Ubuntu Perhaps should try apt-get if your distro does not respond to aptitude (aptitude can still be installed) Or whatever your distro responds as similar commands.

Q)[SIZE=2]Random compile problems cause errors.[/SIZE]
A)
Code:
./bootstrap && export MAKE=make && ./configure --prefix=/usr --enable-vdpau --disable-pulse ; make -j4
thx to deppan for contrib

Q) Will this method work in all Linux distros[SIZE=2]?[/SIZE]
A)
This method should work on any Ubuntu based distros or other Linux distro provided correct dependencies are installed for your distro, Hardy consult the readmes. for anything else consult the readmes respective to your platform. Don't forget Your distros commands may vary.

Q)
I'm a total moron and lazy git is there a script I can run to do this[SIZE=2]?[/SIZE]
A)
Thks to boykster who kindly put this how-to into a script, has been updated since then by me.
Code:
wget -nc -q http://dl.dropbox.com/u/4325533/XCI/xgb.sh;  chmod +x xgb.sh
usage is xgb.sh upgrade first time then xgb.sh refresh

Note:
<upgrade> Should only be ran once only at FIRST USE and thereafter <refresh>, Do Not USE REFRESH First, you will mess things UP.

Q)
[SIZE=2]Can I compile XBMC ontop of a running copy?[/SIZE]
A)
You can be compiling XBMC over the top of a running copy e.g if your watching a movie, simply by not closing service down (by issuing stop xbmc-live), pretty much like xbox days, xbmc can be updated over the top with not adverse reaction, in case of failed compile xbmc.bin isn't compiled and nothing is changed, max it can happen is your running the previous version you had. When in doubt backup.

Q)
[SIZE=2]Are there any ppa' that we can use with updated drivers/programs? [/SIZE]
A)
[SIZE=2] Added Karmic and lucid ppa's [/SIZE][SIZE=2]see this post[/SIZE](would appreciated help)
[SIZE=3]
[/SIZE]
Q) [SIZE=2]Sometimes when compiling XBMC.bin fails to compile, I didn't change anything?! [/SIZE]
A)
Building with script or instruction will sometimes fail, this is mainly because GIT TRUNK breaks due to code changes, if neither is working ask in IRC #XBMC-Linux, chances are devs know building in a particular platform is borked. Alternatively wait 24/48 hours or until team xbmc fix whatever is breaking builds.

Q) Are there any video/audio/apps most recent builds?
A)
find all my ppas here (help with these would be awesome)

Q) When I do git pull --rebase I get errors, how can I fix it?
A) [SIZE=2]git reset --hard [/SIZE][SIZE=2]to[/SIZE][SIZE=2] step 2)[/SIZE][SIZE=2], [/SIZE][SIZE=2]this will help update all files that may not be updating right, this has also been added to script.[/SIZE]

Q) [SIZE=2]Some dependencies been added to script, should I start again? [/SIZE]
A)
No need, just add the dependencies that have changed or as below.
Code:
[SIZE=2][color=Black]apt-get install install [/color][/SIZE]libboost-thread-dev libyajl-dev [b]libplist-dev[/b]
if your libboost is lesser than 1.40.0 you may need to compile boost from source

Q) Can I compile XBMC with bluray playback support?
A)
Yes, as long as the media is not encrypted follow the steps below and add to above manual compile.
Code:
cd $HOME/setup/xbmc/lib/libbluray
make
make install
If you do this the the ./configure line will need to be something like this;

Q) Can I compile XBMC with airplay support support?
A)
Yes since today apparently 23rd Aug 2011

Code:
./configure --prefix=/usr --enable-vdpau --disable-pulse --enable-libbluray
Please don't PM me with support requests [SIZE=2](because no one learns anything)[/SIZE]

Show your appreciation! REP up this post.

Regards.

X3lectric
Reply
#2
thanks, worked like a charm.
Reply
#3
You may also maybe mention something about distcc.
I have a VirtualBox Ubuntu minimal install on my Solaris Server and OS X machine just to run Distcc Smile.
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#4
thanks for the guide!
one last question though, will xbmc be compiled and installed in "~/setup" ? or will it be installed in "~/.xbmc" and the compilation only in "~/setup". Im kinda confussed here. Undecided
im asking cuz i already got one xbmc version installed and i would like to upgrade to the latest git version.
Reply
#5
~/setup is a permanent area that holds all the GIT files downloaded and where compilation takes place, ~/setup may exist in different directories in Linux, depends if you log in as root or use sudo for this.

BUT

XBMC gets installed to prefix=/usr as the install lines say.
Quote:make install prefix=/usr

I don't see any confusion perhaps you need glasses? Wink

@ darkscout

comment about distcc, while I apprecciate you point of view, understand this is released under GPL as such, I wont make any alterations to suit custom virtual box set-ups, This guide is provided as opensource under gpls v3 so anyone can do whatever they want with itas long as they post the changes and new code according to GPL.

If you want to add or improve something do the work yourselves. Otherwise I charge £180 and hour.

That's what opensource is.

My job is done here. any thing anyone want added do it yourselves, want an new feature add it freely.

Please realize opensource doesn't mean you make suggestion and some mug does the work for you, just because you asked nicely.
Reply
#6
aaah yes of course to /usr/bin/xbmc, thanks!
ya sry about that, was kinda late yesterday and ya im getting older Big Grin probably will need glasses soon ^^ (finally the proper geek look too) hehe!
Reply
#7
i just tried your guide. im getting this:

Quote:Done, type 'make install' to build and install
./configure: line 27957: dvdread-config: command not found
/home/xbmc/setup/xbmc/lib/libdvd/libdvdnav/../libdvdread/obj/dvdread-config returned an error . Can't proceed
configure: error: Submodule lib/libdvd/libdvdnav failed to configure
make: *** No targets specified and no makefile found. Stop.
xbmc@xbmc:~/setup/xbmc$ make install prefix=/usr
make: *** No rule to make target `install'. Stop.
xbmc@xbmc:~/setup/xbmc$ sudo make install prefix=/usr
make: *** No rule to make target `install'. Stop.
xbmc@xbmc:~/setup/xbmc$ sudo make install prefix="/usr"
make: *** No rule to make target `install'. Stop.
xbmc@xbmc:~/setup/xbmc$ su -
Password:
root@xbmc:~# cd /home/xbmc/setup/xbmc/
root@xbmc:/home/xbmc/setup/xbmc# make install prefix=/usr
make: *** No rule to make target `install'. Stop.

same result as "root" as you can see, any idea? Undecided
im running Lucid 10.04 as my signature says

[edit] i used sudo in the appropriate place during the guide though [/edit]
Reply
#8
hey, thanks for the guide!

i tried both ways on my ubuntu 10.10 machine. sudo and permanent su.

But i got the same message on step ... ./configure ... :
Quote:Done, type 'make install' to build and install
./configure: line 27957: dvdread-config: command not found
/home/xbmc/setup/xbmc/lib/libdvd/libdvdnav/../libdvdread/obj/dvdread-config returned an error . Can't proceed
configure: error: Submodule lib/libdvd/libdvdnav failed to configure
make: *** No targets specified and no makefile found. Stop.

I dont find a solution by google for this "/home/xbmc/setup/xbmc/lib/libdvd/libdvdnav/../libdvdread/obj/dvdread-config returned an error . Can't proceed" or "configure: error: Submodule lib/libdvd/libdvdnav failed to configure".

Only found how to install this lib, but dont work too.

cheer
SchwarzesS
Reply
#9
i guess the devs are actively porting libdvdnav.
is there a way to disable libdvdnav? for me libdvdcss worked just fine Undecided and i barely watch dvds anyway lol

i tried --disable-libdvdnav without luck
Reply
#10
I'm having the same problem. Can't compile because of dvdread-config
Image

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
Reply
#11
Are you getting this using the unstable git sources, or the stable ones?

I got the same thing while trying to apply this patch, to get seekbar clicking working, but seeing as you got the same thing it can't be related (and shouldn't be). Can't find anything in particular in the commits that seem to affect libdvdnav or dvdread-config (or dvdnav-config which seems to just be an alias, or vice versa), so I suppose it's been updated somewhere along the line in upstream, and something in the syntax changed, which sounds about right given the error message (mine seems to differ a bit:
Code:
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

Done, type 'make install' to build and install
Usage: dvdnav-config [OPTIONS] [LIBRARIES]
Options:
    [--prefix[=DIR]]
    [--exec-prefix[=DIR]]
    [--version]
        [--libs]
    [--cflags]
/storage/backup/xbmc-stuff/xbmc-git/src/xbmc/lib/libdvd/libdvdnav/../libdvdread/obj/dvdread-config returned an error. Can't proceed
configure: error: Submodule lib/libdvd/libdvdnav failed to configure

I don't know anything about libdvdnav to know what to place as the prefix/exec-prefix/libs/cflags, and certainly not the libs, so I'm at a loss. Guess this should be created as a trac ticket, but I would think they're on top of things.

Glad to see I'm not alone, atleast. Smile
Reply
#12
do:
export MAKE=make
before running ./configure, and the issue will go away.
Reply
#13
GREAT thanks! this work for me.
Reply
#14
deppan Wrote:do:
export MAKE=make
before running ./configure, and the issue will go away.

Thanks. Worked for me. Now the question is why? Wink
Reply
#15
thx, worked for me too but as root with the export command from deppan.
Quote:./bootstrap && export MAKE=make && ./configure --prefix=/usr --enable-vdpau --disable-pulse ; make -j4
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 14

Logout Mark Read Team Forum Stats Members Help
HOW-TO compile XBMC from a GIT source12