Kodi Community Forum

Full Version: HOW-To Compiling XBMC on Fedora 11 with All External Libraries & VDPAU
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Greeting All,

Here is my first post in this forum as I want to share about compiling XBMC on Fedora 11.
My target is to use as external binaries for XBMC, so it may not need update if there is an update in other libraries and use more recent libraries and I'm trying to enable any feature that XBMC may support.

This is based on XBMC wiki
HOW-TO compile XBMC for Linux on Fedora Red Hat Enterprise Linux CentOS

As fedora licence policy, we could not rely on pure fedora repositories. As above documentation, it uses rpmfusion repositories. But on my experiences, that some of the *-devel libraries from rpmfusion can't be used by XBMC if you want use external libraries. There some incomplete file for example dts support, the header file from libdca of rpmfusion just contain dca.h. Also I had bad experience with ffmpeg libraries.

So I switch to atrpms repositories (This make me re-install my fedora). I do not know what will happen if you switch from rpmfusion to atrpms directly, as there might coalition files between packages from each repositories. I'm suggest you that you use Fedora Installation that does not have rpmfusion repositories.

Step by step instruction:
  1. As root, enable ATRPMS repositories at yum respositories directory
    Code:
    vi /etc/yum.repos.d/atrpms.repo
    Put Line
    Code:
    [atrpms]
    name=Fedora Core $releasever - $basearch - ATrpms
    baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable
    gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
    gpgcheck=1
  2. Update your Fedora to use last revision of installed packages
    Code:
    yum -u update
  3. Install required packages for XBMC
    Use copy-paste for this one long line
    Quote:yum -y install ccache subversion git gcc-c++ boost-devel mesa-libGL-devel glew-devel libmad-devel libjpeg-devel libsamplerate-devel libogg-devel libvorbis-devel freetype-devel fontconfig-devel bzip2-devel fribidi-devel sqlite-devel mysql-devel libpng-devel pcre-devel lzo-devel libcdio-devel libsmbclient-devel SDL-devel SDL_image-devel SDL_mixer-devel enca-devel jasper-devel libmms-devel libXt-devel libXtst-devel libXmu-devel libXinerama-devel libcurl-devel dbus-devel hal-devel pulseaudio-libs-devel pulseaudio-libs-zeroconf faac-devel avahi-devel ffmpeg-devel a52dec-devel libdca-devel faad2-devel mpeg2dec-devel libass-devel libmpcdec-devel flac-devel wavpack-devel python-devel cmake gperf unzip make libtool flex bison libtiff-devel
  4. Checkout XBMC source code vis subversion
    Code:
    svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/
  5. Install Nvidia header library to support VDPAU
    This may give another problem on machine that have intel/ati as graphic card. But if you do want to not use the nvidia-graphics-devel, XBMC will compile automatically without support of VDPAU.
    Code:
    yum -y install nvidia-graphics-devel
    ln -s /usr/include/nvidia-graphics/vdpau /usr/include/vdpau
  6. There some tricky items that need to be solve
    Code:
    cp XBMC/xbmc/lib/cximage-6.0/jpeg/jpegint.h /usr/include/
    ln -s /usr/lib/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so
  7. Entering the XBMC directory as build directory and do configure.
    Quote:cd XBMC
    ./configure --disable-debug --enable-external-libraries --enable-external-ffmpeg --enable-external-libfaad --enable-external-libdts --enable-mid --enable-profiling --enable-external-libmad --enable-external-liba52 --enable-external-libmpeg2 --enable-external-libass --enable-external-libvorbis --enable-external-libogg --enable-external-libmpcdec --enable-external-libflac --enable-external-libwavpack --enable-external-python
    The long external option is put as just to make sure it use the external libraries. In short you may need just
    Code:
    ./configure --disable-debug --enable-external-libraries
    Disable debug is used to not include debug symbols to make the XBMC binary slimmer.
    There is also some issue on libass, as latest XBMC revision use libass-0.9.7. While Fedora 11 have libass-0.9.6. I was trying to use libass-0.9.7 from development rpm of Fedora 12, but it will failed compiled XBMC. So just straight with libass0.9.6 from original Fedora 11 with hope in future there might a change. XBMC will fallback with included libass that come with XBMC source code.
  8. Start compile
    Code:
    make
  9. Install the build
    Code:
    make install
I hope this might useful for other, and if I have enough time I may try to make SPEC and RPM for the build.
Quote:But I'm still have a little issue with that my build. When I see the size of xbmc.bin is 76M. I'm rather amazed with that big of file. But when I compared to standard pacakge fro ubuntu that provide by XBMC team, the xbmc.bin file is just 11M.
Is there anyone can explain that?

Debug symbols.
Hi,
I have started building RPMs for fedora last week and announced on Fedora Forum (http://forums.fedoraforum.org/showthread.php?t=229121).
RPMs are here: http://hansvon.homelinux.org/fedora/

Compared to your guide, I'm using RPM Fusion and not atrpms. Also, I'm not relying on external libraries (FFmpeg from RPM Fusion does not include VDPAU yet so it doesn't work).
I also need to remove the debug symbols... Maybe, I should also try to use external libraries when possible (?).
Hansvon Wrote:Hi,
Compared to your guide, I'm using RPM Fusion and not atrpms. Also, I'm not relying on external libraries (FFmpeg from RPM Fusion does not include VDPAU yet so it doesn't work).
Yes that is another reason, that ffmpeg at ATRPMS is support VDPAU, (and does mplayer at ATRPMS). while rpmfusion packages still not support VDPAU.
I'm thinking to rely on external binaries as it will reduce the package of xbmc it self.

I'm also still hoping the xbmc devs make more separation on some more libs to be able use more external libraries. But I know they are must be busy and believe they have their own priority. And to be fair external libraries just useful only for linux platform.

Hansvon Wrote:I also need to remove the debug symbols... Maybe, I should also try to use external libraries when possible (?).
Well, for this one, I'm just learnt too, when allthekiller saying about debug symbol, I was try --disable-debug. But if not, you also can do with command strip.
And if you make rpm, the rpmbuild will automatically strop the debug symbols too.
Yes, you're right about external packages. I've rebuilt my RPMs with

Code:
%configure --disable-debug --enable-vdpau  --enable-mid --enable-profiling --enable-external-libmad --enable-external-liba52 --enable-external-libmpeg2  --enable-external-libvorbis --enable-external-libogg --enable-external-libmpcdec --enable-external-libflac --enable-external-libwavpack --enable-external-python

A few can't be included (ffmpeg, libfaad, libdts libass) with RPM Fusion.
I will look into the debug package. I'm a bit new to the packaging business. The spec file I have used as source disable the debug package for some reason. Anyway, most people don't need it...
Hansvon Wrote:Yes, you're right about external packages. I've rebuilt my RPMs with

Code:
%configure --disable-debug --enable-vdpau  --enable-mid --enable-profiling --enable-external-libmad --enable-external-liba52 --enable-external-libmpeg2  --enable-external-libvorbis --enable-external-libogg --enable-external-libmpcdec --enable-external-libflac --enable-external-libwavpack --enable-external-python

A few can't be included (ffmpeg, libfaad, libdts libass) with RPM Fusion.
I will look into the debug package. I'm a bit new to the packaging business. The spec file I have used as source disable the debug package for some reason. Anyway, most people don't need it...

If you're interested, you could join RPM Fusion directly. I'm also interested in getting XBMC into RPM Fusion/Fedora and I am already a contributor to both Fedora and RPM Fusion, so I'd be willing to help you (or anyone else) in their packaging efforts, get it officially submitted and maintain or co-maintain the package. I added it to the wishlist a while back:

http://rpmfusion.org/Wishlist
fiveisalive Wrote:If you're interested, you could join RPM Fusion directly. I'm also interested in getting XBMC into RPM Fusion/Fedora and I am already a contributor to both Fedora and RPM Fusion, so I'd be willing to help you (or anyone else) in their packaging efforts, get it officially submitted and maintain or co-maintain the package. I added it to the wishlist a while back:

http://rpmfusion.org/Wishlist

The first problem of rpmfusion, that the ffmpeg package in rpmfusion is not compiled with supporting the vdpau. Second is the libdca-devel does not contain enough header to build xbmc with external libraries.

So currently, We could not use the external-libraries with the rpmfusion repositories.
peprasetya Wrote:The first problem of rpmfusion, that the ffmpeg package in rpmfusion is not compiled with supporting the vdpau. Second is the libdca-devel does not contain enough header to build xbmc with external libraries.

So currently, We could not use the external-libraries with the rpmfusion repositories.

Sure, but those things are fixable. In the meantime a package can still be submitted and you can still use --enable-external-python etc. for all the libraries that *are* included in Fedora/RPM Fusion. I also believe that vdpau has been recently added to Fedora and there may already be a request to enable vdpau in RPM Fusion.

Basically just because RPM Fusion might not be ready just now to have a fully fledged xbmc package, doesn't mean that the maintainers aren't willing to fix those issues to get it in (or send me your e-mail in a private message and I'll add you to the Cc on those bugs).

Can you check if there are bugs filed for those 2 issues (ffmpeg/libdca-devel) on http://bugzilla.rpmfusion.org/ and file them if not? If you don't want to, I can do it for you and I'll post those links back here.

Thanks.
ATrpms might be a better choice for XBMC. It has the necessary multimedia packages ready to go, including ffmpeg with VDPAU support. I build on Fedora 11 x86_64, plus ATrpms, with all external libraries enabled.

I just did a fresh build and removed the libmysqlclient.so symlink and jpegint.h from /usr/include. All it needs to build is to pass -L/usr/lib64/mysql in the LDFLAGS; no actual system changes are required. This differs from a couple of months ago when I setup my build environment on F11.

(Edited about build system)
fiveisalive Wrote:If you're interested, you could join RPM Fusion directly. I'm also interested in getting XBMC into RPM Fusion/Fedora and I am already a contributor to both Fedora and RPM Fusion, so I'd be willing to help you (or anyone else) in their packaging efforts, get it officially submitted and maintain or co-maintain the package. I added it to the wishlist a while back:

http://rpmfusion.org/Wishlist

I can try to submit the package to RPM Fusion (I guess this would mean to disable libdvdcss). I'm starting to read http://rpmfusion.org/Contributors ...
By the time, you may interest to try my repositories on other thread
Repositories for Fedora 11 - XBMC, VDPAU, External Libraries
It is based on library from ATRPMS.

Currently, I'm try do what I can be done. I'm have no contact between team of RPMFusion nor ATRPMS, or even joining their mailing list.

In future this may change, as new version of VDPAU may support decode divx/xvid (Currently on certain hardware), and I do not know who will be faster adopting change on the ffmpeg change to the new VDPAU, between XBMC devs, ATRPMS team, or RPMFusion team
Aron Parsons Wrote:ATrpms might be a better choice for XBMC. It has the necessary multimedia packages ready to go, including ffmpeg with VDPAU support. I build on Fedora 11 x86_64, plus ATrpms, with all external libraries enabled.

I just did a fresh build and removed the libmysqlclient.so symlink and jpegint.h from /usr/include. All it needs to build is to pass -L/usr/lib64/mysql in the LDFLAGS; no actual system changes are required. This differs from a couple of months ago when I setup my build environment on F11.

(Edited about build system)

For various reason RPM Fusion is generally the repository for add-on packages with the greatest community buy-in. ATrpms is fine, but can occasionally replace core Fedora packages (at least it did in the past), which is generally not a good thing. Of course, people are free to develop packages for any repo of their choice, but RPM Fusion probably has more maintainers (being the merger of the former Freshrpms, Livna and Dribble repos), many of which are also Fedora maintainers than ATrpms.
peprasetya Wrote:By the time, you may interest to try my repositories on other thread
Repositories for Fedora 11 - XBMC, VDPAU, External Libraries
It is based on library from ATRPMS.

Currently, I'm try do what I can be done. I'm have no contact between team of RPMFusion nor ATRPMS, or even joining their mailing list.

In future this may change, as new version of VDPAU may support decode divx/xvid (Currently on certain hardware), and I do not know who will be faster adopting change on the ffmpeg change to the new VDPAU, between XBMC devs, ATRPMS team, or RPMFusion team

Since the repositories should be more or less mutually exclusive (i.e. you shouldn't mix ATrpms with RPM Fusion, see: http://rpmfusion.org/FedoraThirdPartyRepos), it doesn't hurt to add the package to both. I plan to help get the xbmc package into RPM Fusion since that is the repo that I'm most familar with and has the larger userbase I think.
fiveisalive Wrote:Since the repositories should be more or less mutually exclusive (i.e. you shouldn't mix ATrpms with RPM Fusion, see: http://rpmfusion.org/FedoraThirdPartyRepos), it doesn't hurt to add the package to both. I plan to help get the xbmc package into RPM Fusion since that is the repo that I'm most familar with and has the larger userbase I think.

Yes I know, it should not mix the repositories atrpms and rpmfusion, as they have many same packages that may override each other.
That is why, since beginning of this thread, I'm stricly to ATrpms.
At first, I'm want to depend on RPMfusion, as there is already mirror in my country. But the condition, I could not rely on them, as I prefer to have external libraries.

And I think, currently if any of you want to strict to RPMfusion, I think it's better to use the included libraries within XBMC source code. This is a good one too, as I believe XBMC devs will adopt quickly to any new version of the libraries.
peprasetya Wrote:Yes I know, it should not mix the repositories atrpms and rpmfusion, as they have many same packages that may override each other.
That is why, since beginning of this thread, I'm stricly to ATrpms.
At first, I'm want to depend on RPMfusion, as there is already mirror in my country. But the condition, I could not rely on them, as I prefer to have external libraries.

As I was trying to explain in the previous post, RPM Fusion will be able to offer the versions of the external libraries required for xbmc very soon (I discussed this with the maintainer on IRC). Note that updates to, say, ffmpeg have to be done carefully because so many packages other than xbmc depend on them. It will be done very soon in the case of ffmpeg.

Quote:And I think, currently if any of you want to strict to RPMfusion, I think it's better to use the included libraries within XBMC source code. This is a good one too, as I believe XBMC devs will adopt quickly to any new version of the libraries.

Using internal libraries is very bad practice because it can lead to security issues and maintenance issues. If a security issue is found in an external library, it can be patched and fixed globally, private copies need to be patched separately and can often be forgotten. The first version of xbmc that I submit will probably rely on one or two internal libraries initially to get the review going, but those will have to be fixed by the time it is officially in the repo.

Also it works the other way around, if you submit a popular package that requires updating the external libraries, it's more likely that those maintainers will be motivated to do so, especially if they would like access to the application in question in their repo (e.g. xbmc). So rather than just assuming that RPM Fusion won't update the libraries in question, it's best to get involved and help move the process forward. Wink
Pages: 1 2