Kodi Community Forum

Full Version: [Solved] compile problem for Helix [master]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I'm not able to compile kodi from git master.
$ git show
commit 6004c447cb14bbf95fa71d1f2c10247652996d59
...
Date: Wed Nov 12 10:18:14 2014 +0100

$ configure --with-ffmpeg=auto
Here's pastebin of config.log

I've been able to compile Gotham and it was great to see I could use VDPAU with the OSS radeon driver Smile
I see that Gotham was using the 'internal' ffmpeg which has gone now.

ffmpeg built from git master
$ ffmpeg
ffmpeg version n2.4.3 Copyright © 2000-2014 the FFmpeg developers
built on Nov 8 2014 19:03:11 with gcc 4.8 (SUSE Linux)
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-static --enable-postproc
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
Hyper fast Audio and Video encoder


Here's the output from make

See ffmpeg related error (?)
DVDDemuxFFmpeg.cpp:524:41: error: ‘av_read_frame_flush’ was not declared in this scope
av_read_frame_flush(m_pFormatContext);

^
-----------
Hardware: AMD E350 APU with HD6310 graphics
Arch: x86_64
OS: OpenSUSE 13.2 kernel 3.16.2 Mesa 10.3.0
Leave the ffmpeg configure options out
I did that, but when I ran configure again on kodi
$ ./configure --with-ffmpeg=auto
...
checking for FFMPEG... no
configure: "Installing FFmpeg"
ERROR: gnutls not found


It doesn't build libpostproc.a which I think is required.
I did have the gnutls package but not libgnutls & others which I added, so now:
# zypper se gnutls

S | Name | Summary | Type
--+------------------------------+--------------------------------------------------+--------
i | gnutls | The GNU Transport Layer Security Library | package
i | libgnutls-devel | Development package for gnutls | package
| libgnutls-devel-32bit | Development package for gnutls | package
i | libgnutls-openssl-devel | Development package for gnutls | package
i | libgnutls-openssl27 | The GNU Transport Layer Security Library | package
i | libgnutls28 | The GNU Transport Layer Security Library | package
| libgnutls28-32bit | The GNU Transport Layer Security Library | package
i | libgnutlsxx-devel | Development package for gnutls | package
i | libgnutlsxx28 | The GNU Transport Layer Security Library | package
i | libxmlsec1-gnutls-devel | GNUTLS crypto plugin for XML Security Library | package
i | libxmlsec1-gnutls1 | GNUTLS crypto plugin for XML Security Library | package
| libxmlsec1-gnutls1-debuginfo | Debug information for package libxmlsec1-gnutls1 | package
| xmlsec1-gnutls-devel | GNUTls crypto plugin for XML Security Library | package

$ ./configure --with-ffmpeg=auto
I see that this now pulls in ffmpeg & configures & makes it under the kodi directory
./tools/depends/target/ffmpeg/ffmpeg-2.4.3-Helix-beta1

$ make -j 2
...
LD kodi.bin
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: warning: libjpeg.so.8, needed by /usr/lib64/libSDL_image.so, may conflict with libjpeg.so.62
-----------------------
Kodi built successfully
-----------------------

Looks good - I need to run it with VDPAU_DRIVER=r600 ./kodi.bin to get the VDPAU hardware acceleration, but HD H264 video plays fine with hardly any extra cpu load.

I think the necessary ffmpeg options are set in the script
kodi/tools/depends/target/ffmpeg/autobuild.sh
for the case where configure pulls in ffmpeg.
Out of curiosity, is the ffmpeg code that is pulled down from
https://github.com/xbmc/FFmpeg/archive/2...ta1.tar.gz
by configure, a specially patched version for Kodi ?

Would the ffmpeg code from git://source.ffmpeg.org/ffmpeg.git be expected to work with Kodi or not?
and yes, it's patched and mainline won't work (exposes some internal symbols among other things).
Thanks. It's becoming clearer (I saw that ffmpeg code was removed from the main repo and incorrectly assumed you'd switched to using an external version). I'd previously been building from the FernetMenta repo xvba branch because I couldn't get the OSS radeon driver to work.

I see that the gnutls configure error is unrelated to ffmpeg - on OpenSUSE the package I was missing was libgnutls-devel package

So I should just run
$ ./configure
(defaults to --with-ffmpeg=force) which will download the tarball of Kodi's ffmpeg and run the ffmpeg make as part of configure (which takes an hour or so)
As I said before, just run ./configure and leave out the ffmpeg options (its automatically handled)

Read the docs for the dependencies required https://github.com/xbmc/xbmc/tree/master/docs

For oss see 174854 (thread) and adapt it to your distro. Dont use xvba anything its not maintained or supported anymore.
At the time, I thought you were talking about the configure options to build ffmpeg from the official ffmpeg repository.
Readme
README.linux doesn't mention the libgnutls-devel package, presumably because it's focussed on Ubuntu, which is fair enough, but I thought I'd add the detail in the post in case anyone with OpenSUSE tries to Google the same error.
I've got the OSS radeon working. I was just explaining that I wasn't so familiar with the latest Kodi git repo.
Compiling Helix on Debian Jessie needs libgnutls too.
@andydiver: thanks for the pointer!
The readme linux should have some section that includes these deps since it is a general Linux readme. readmeubuntu takes care of the ubuntu bit.

If I were you I would make a PR to mainline proposing such changes that are distro specific and be done.
generally, the README.linux should be reworked to list all upstream vanilla lib names to be platform agostic. OTOH, this will probably help many users even less, since upstream library names can differ quite a lot from package names on different distros.