Error when compiling latest Kodi für Raspberry 2
#16
Get the source, apply the patch and use the script above to compile it Smile That should be enough for your needs.
Reply
#17
(2017-03-23, 10:08)KlotX Wrote: Get the source, apply the patch and use the script above to compile it Smile That should be enough for your needs.

Sounds very simple, but it isn't. First of all it took quite some time to find out which libraries and other software have to be installed on a fresh raspbian. Then I had to compile libcec myself because there is only an older version in the repositories. And finally the build process failed.

ffmpeg fails to build with numerous errors:
Code:
/home/pi/kodi/build/build/ffmpeg/src/ffmpeg/common.mak:60: recipe for target 'libavfilter/vf_blend.o' failed
make[6]: *** [libavfilter/vf_blend.o] Error 1
make[6]: Leaving directory '/home/pi/kodi/build/build/ffmpeg/src/ffmpeg-build/ffmpeg-prefix/src/ffmpeg-build'
CMakeFiles/ffmpeg.dir/build.make:110: recipe for target 'ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-build' failed
make[5]: *** [ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-build] Error 2
make[5]: Leaving directory '/home/pi/kodi/build/build/ffmpeg/src/ffmpeg-build'
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ffmpeg.dir/all' failed
make[4]: *** [CMakeFiles/ffmpeg.dir/all] Error 2
make[4]: Leaving directory '/home/pi/kodi/build/build/ffmpeg/src/ffmpeg-build'
Makefile:127: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/pi/kodi/build/build/ffmpeg/src/ffmpeg-build'
CMakeFiles/ffmpeg.dir/build.make:113: recipe for target 'build/ffmpeg/src/ffmpeg-stamp/ffmpeg-build' failed
make[2]: *** [build/ffmpeg/src/ffmpeg-stamp/ffmpeg-build] Error 2
make[2]: Leaving directory '/home/pi/kodi/build'
CMakeFiles/Makefile2:1108: recipe for target 'CMakeFiles/ffmpeg.dir/all' failed
make[1]: *** [CMakeFiles/ffmpeg.dir/all] Error 2
make[2]: Leaving directory '/home/pi/kodi/build'
CMakeFiles/Makefile2:1357: recipe for target 'build/swig/CMakeFiles/python_binding.dir/all' failed
make[1]: *** [build/swig/CMakeFiles/python_binding.dir/all] Error 2
make[1]: Leaving directory '/home/pi/kodi/build'
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

The script finally stops with this error:
Code:
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: kodi
CPack Error: Problem running install command: /usr/bin/cmake --build . --target "preinstall"
Please check /home/pi/kodi/build/packages/_CPack_Packages/armv7l/DEB/PreinstallOutput.log for errors
CPack Error: Error when generating package: kodi
During my first try it was something with dvd (no such file). After that I disabled DVDCSS, but the error from the script was the same. This time PreinstallOutput.log said:
Code:
/home/pi/kodi/build/build/ffmpeg/src/ffmpeg/common.mak:60: recipe for target 'libavformat/bintext.o' failed
make[6]: *** [libavformat/bintext.o] Error 1
CMakeFiles/ffmpeg.dir/build.make:110: recipe for target 'ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-build' failed
make[5]: *** [ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-build] Error 2
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ffmpeg.dir/all' failed
make[4]: *** [CMakeFiles/ffmpeg.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/ffmpeg.dir/build.make:113: recipe for target 'build/ffmpeg/src/ffmpeg-stamp/ffmpeg-build' failed
make[2]: *** [build/ffmpeg/src/ffmpeg-stamp/ffmpeg-build] Error 2
CMakeFiles/Makefile2:1108: recipe for target 'CMakeFiles/ffmpeg.dir/all' failed
make[1]: *** [CMakeFiles/ffmpeg.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
So it is basically the same error that occurs already before the package is created. I also saw a strange error in the output of the script right before the ffmpeg error:
Code:
CC      libavfilter/vf_aspect.o
CC      libavfilter/vf_atadenoise.o
CC      libavfilter/vf_bbox.o
CC      libavfilter/vf_blackdetect.o
CC      libavfilter/vf_blackframe.o
CC      libavfilter/vf_blend.o
CC      libavfilter/vf_boxblur.o
In file included from src/libavutil/common.h:39:0,
                 from src/libavutil/avutil.h:288,
                 from src/libavutil/imgutils.h:30,
                 from src/libavfilter/vf_blend.c:21:
/usr/include/stdlib.h:106:3: internal compiler error: Speicherzugriffsfehler
   {
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.

Now I am pretty clueless. I never thought that building kodi could be so hard....
Reply
#18
Yes, the initial process to install all needed libraries and so on is exactly what I'm writing about Smile there is a bunch of dependencies that need to be installed and some others need to be compiled and installed like libcec, llibplatform and a few others. I really need to finish it soon Smile

The cpack error is "normal", cmake doesn't have an error return code, so we can't verify if the build was successful or not, we assume it was and will try to generate debian packages.

That error in specific is related with ffmpeg, I've never come across it. You can try to use our fork (the one rascas mentioned) and build krypton_new branch, that's the branch we've been using. I don't think I ever tried to build kodi directly from the xbmc repo, this is something I'm planning to try as well some time soon.
Reply
#19
Alternatively you can use Pipplware's repo which already provides a compiled and working version of kodi 17 - if I'm not mistaken it already includes the patch you need, since it's based on popcornmix's krypton_rbp_backports branch.

Refer to this post here: https://www.raspberrypi.org/forums/viewt...25#p961205
Reply
#20
(2017-03-23, 00:32)rucksman Wrote: To be honest the only reason for me trying to compile Kodi myself is that I need the Hifiberry patch. Otherwise I would be happy with the versions that can be found in the Raspian repository,,,
The Hifiberry hack/patch is not needed if you have a proper card configuration file in /usr/share/alsa/cards (it has to be named HifiberryDigi.conf). In LibreELEC we are using this:
https://raw.githubusercontent.com/LibreE...yDigi.conf

so long,

Hias
Reply
#21
(2017-03-23, 14:54)KlotX Wrote: Alternatively you can use Pipplware's repo which already provides a compiled and working version of kodi 17 - if I'm not mistaken it already includes the patch you need, since it's based on popcornmix's krypton_rbp_backports branch.

Thanks a lot for this hint. Indeed I was able to install kodi from the pipplware repo and the hifiberry patch is indeed included. Nevertheless I would be glad if you could finish your blog post and make an announcement somewhere so that I can build my own version. I am always eager to learn new things ...

(2017-03-24, 14:44)HiassofT Wrote: The Hifiberry hack/patch is not needed if you have a proper card configuration file in /usr/share/alsa/cards (it has to be named HifiberryDigi.conf). In LibreELEC we are using this:
https://raw.githubusercontent.com/LibreE...yDigi.conf

Great news! This would make installing Kodi a lot easier for me. Although I installed kodi now fom the pippleware repo I will give this solution a try. Thanks a lot for this hint!
Reply
#22
(2017-03-24, 20:48)rucksman Wrote:
(2017-03-23, 14:54)KlotX Wrote: Alternatively you can use Pipplware's repo which already provides a compiled and working version of kodi 17 - if I'm not mistaken it already includes the patch you need, since it's based on popcornmix's krypton_rbp_backports branch.

Thanks a lot for this hint. Indeed I was able to install kodi from the pipplware repo and the hifiberry patch is indeed included. Nevertheless I would be glad if you could finish your blog post and make an announcement somewhere so that I can build my own version. I am always eager to learn new things ...

I plan to finish it soon, probably this weekend, I'll ask you to follow the steps and revise it so I don't miss anything Smile Thanks
Reply
#23
(2017-03-24, 14:44)HiassofT Wrote: The Hifiberry hack/patch is not needed if you have a proper card configuration file in /usr/share/alsa/cards (it has to be named HifiberryDigi.conf). In LibreELEC we are using this:
https://raw.githubusercontent.com/LibreE...yDigi.conf

Just tested it and it works great! The only problem is that in the official raspbian repos I can only get kodi version 15.2 Sad
Reply
#24
(2017-03-23, 14:54)KlotX Wrote: Alternatively you can use Pipplware's repo which already provides a compiled and working version of kodi 17 - if I'm not mistaken it already includes the patch you need, since it's based on popcornmix's krypton_rbp_backports branch.

The HifiBerry hack is not in krypton_rbp_backports.
The alsa conf file is now included in latest raspbian, and any other distributions should add it if they want to support passthrough of HifiBerry dac.
Reply
#25
(2017-03-24, 20:48)rucksman Wrote:
(2017-03-23, 14:54)KlotX Wrote: Alternatively you can use Pipplware's repo which already provides a compiled and working version of kodi 17 - if I'm not mistaken it already includes the patch you need, since it's based on popcornmix's krypton_rbp_backports branch.

Thanks a lot for this hint. Indeed I was able to install kodi from the pipplware repo and the hifiberry patch is indeed included. Nevertheless I would be glad if you could finish your blog post and make an announcement somewhere so that I can build my own version. I am always eager to learn new things ...

I managed to finish the first version of the guide, feel free to try it out and comments are more than welcome Smile

http://blog.nunosenica.com/compiling-kod...-raspbian/

I huge thank you to @rascas for all his support and knowledge sharing.
Reply
#26
Great stuff! I will try it with a fresh raspbian tuesday or wednesday and give you some feedback!
Reply
#27
(2017-03-27, 17:03)rucksman Wrote: Great stuff! I will try it with a fresh raspbian tuesday or wednesday and give you some feedback!

Please do, I'm looking forward for that feedback, I'm pretty sure I forgot about something, so all feedback is appreciated Smile
Reply
#28
(2017-03-27, 17:19)KlotX Wrote: Please do, I'm looking forward for that feedback, I'm pretty sure I forgot about something, so all feedback is appreciated Smile

I ran into a problem during buildung libbluray-dev. I followed these steps:
Code:
sudo apt-get install default-jdk javahelper ant doxygen graphviz texlive-latex-base texlive-latex-recommended texlive-latex-extra latex-xcolor texlive-fonts-recommended libasm4-java
wget http://archive.raspbian.org/raspbian/pool/main/libb/libbluray/libbluray_0.9.3.orig.tar.bz2
tar jxvf libbluray_0.9.3.orig.tar.bz2
rm libbluray_0.9.3.orig.tar.bz2
cd libbluray-0.9.3
wget https://raw.githubusercontent.com/popcornmix/xbmc/krypton_rbp_backports/tools/depends/target/libbluray/bump_to_Nevcairie_v0.9.2.patch
patch -p1 < bump_to_Nevcairie_v0.9.2.patch
rm bump_to_Nevcairie_v0.9.2.patch
tar -zcf ../libbluray_0.9.3.orig.tar.gz .
wget http://archive.raspbian.org/raspbian/pool/main/libb/libbluray/libbluray_0.9.3-3.debian.tar.xz
tar xf libbluray_0.9.3-3.debian.tar.xz
dpkg-buildpackage -us -uc

I got the following error (sorry, it is German, but you should get the point):
Code:
make[1]: Leaving directory '/home/pi/dependencies/libbluray-0.9.3'
dpkg-source -b libbluray-0.9.3
dpkg-source: Information: Quellformat »3.0 (quilt)« wird verwendet
dpkg-source: Information: libbluray wird unter Benutzung des existierenden ./libbluray_0.9.3.orig.tar.gz gebaut
dpkg-source: Fehler: Änderung in libbluray_0.9.3-3.debian.tar.xz kann nicht dargestellt werden: Inhalt der Binärdatei hat sich geändert
dpkg-source: Fehler: fügen Sie libbluray_0.9.3-3.debian.tar.xz zu debian/source/include-binaries hinzu, falls Sie das veränderte Programm im Debian-Tarball speichern möchten.
dpkg-source: Fehler: nicht darstellbare Änderungen an den Quellen
dpkg-buildpackage: Fehler: Fehler-Exitstatus von dpkg-source -b libbluray-0.9.3 war 2

Where is my mistake?

EDIT: Answering the question myself: I should have rm'ed libbluray_0.9.3-3.debian.tar.xz....
Reply
#29
hmm, I'm not sure since it is in german Big Grin But I think it could be related with the file still being there, can you please try to delete libbluray_0.9.3-3.debian.tar.xz before running dpkg-buildpackage command ?
Reply
#30
(2017-03-28, 12:46)KlotX Wrote: hmm, I'm not sure since it is in german Big Grin But I think it could be related with the file still being there, can you please try to delete libbluray_0.9.3-3.debian.tar.xz before running dpkg-buildpackage command ?

I did not see your post before editing my question. Indeed deleting the file helped...
Reply

Logout Mark Read Team Forum Stats Members Help
Error when compiling latest Kodi für Raspberry 20