Compiling Kodi and building deb packages – Raspbian Jessie

You may also like...

29 Responses

  1. Paul says:

    What would have to change to make this work for raspian stretch on a raspberry pi 3 b+? I need to make a build with x11 support.

  2. Paul R. Gibson, Jr. says:

    Nuno, I have finally overcome a full 12 hours worth of issues w/a Kodi 18 compile and a cmake –build is running now.
    Will keep all advised.

  3. Paul R. Gibson, Jr. says:

    Thanks very much for this guide. I have been experiencing so many crashes w/Kodi 17.1,2,3,4 and 17.5 and I wanted to take advantage of recent bug fixes from Team kodi but a Kodi 17.6 for my Debian-stretch/Raspbian was not available.
    I have successfully compiled my own Kodi 17.6 on my Pi3 using this guide and looking forward to a more stable Kodi environment.
    Also, you weren’t kidding about the “get some refreshments because this is going to take a while ” comment. My first compile took forever and aborted many times before final success. Now subsequent compile times are very short.
    Looking forward to a Kodi 18 compile guide.

    • njs says:

      Hi Paul, thank you very much for your kind comments. They’re very much appreciated.

      Compiling v18 isn’t that much different honestly, maybe a few dependency here and there if any. There is only a difference in paths, which is pointed out in the guide.

      Just give it a go and let me know how it went, if there is significant changes I’ll certainly will do a new blog post targeting specifically v18.

  4. Leonardo says:

    When i try to compile xbmc-master v18 and with your tutorial don’t work.
    Can you create tutorial to compile xbmc-master v18 on raspberry pi 3 ?

    • njs says:

      Thanks for your comments.

      This tutorial doesn’t cover xbmc 18, I’m working on a new post to compile v18, but it is not ready yet, a few PRs that I haven’t submitted yet are needed to make it work.

      • Leonardo says:

        I use the official tutorial and my kodi.bin stayed with 400mb. I Compiled in Ubuntu x86.

        • njs says:

          It is advisable, in my opinion, to compile it either natively or in a chroot environment. Most probably your build has too many libraries built-in and is not making use of the shared libraries available in the system. While it can be good in some cases, I think that for Kodi it is better to use shared libraries, as they can be updated on their own without recompiling kodi.

          • Leonardo says:

            You can share your binaries of kodi v18 for raspberry pi3 ?

          • njs says:

            I don’t have any up to date ones, if I have any at all, I’ll try to compile v18 and I’ll let you know how it went.

    • Paul R. Gibson, Jr. says:

      Leonardo, from what I have seen in my attempts to compile Kodi 18 on debian Stretch Pi3 there are significant differences from compiling Kodi 17. I am trying but having issues compiling Kodi 18 but when I get them ironed out I will pass my experiences on to you.

  5. popcornmix says:

    I’m getting this error building kodi:
    build/music/tags/music_tags.a(TagLoaderTagLib.cpp.o): In function `CTagLoaderTagLib::Load(std::string const&, MUSIC_INFO::CMusicInfoTag&, std::string const&, MUSIC_INFO::EmbeddedArt*)’:
    TagLoaderTagLib.cpp:(.text+0xebac): undefined reference to `TagLib::Ogg::Opus::File::File(TagLib::IOStream*, bool, TagLib::AudioProperties::ReadStyle)’

    Are you sure installing libtag11-dev from jessie is okay? That appears to be version 1.9.1-2.1, whereas kodi’s taglib is 1.11.1

    • njs says:

      I honestly don’t recall any issues with taglib, could it be that maybe taglib was bumped recently in Kodi ? I’ll need to investigate this, I’ll reply back here when I have a solution for it.

      Thanks for the feedback once again.

    • Rascas says:

      Never had an error/warning also using libtag1-dev from Jessie (1.9.1). Using your krypton_rbp_backports. Which branch are you using ?

    • njs says:

      I’ve just checked where I compile Kodi and the lib I have installed in libtag1-dev from Raspbian jessie. I’ve never encounter that issue before. Which branch are you using ? Are you following these exact steps ? Can you also provide the output of `apt-cache policy libtag1-dev`?
      I’ve also checked Kodi and cmake depends on taglib >= 1.9 (here).

    • popcornmix says:

      I’m using krypton_rbp_backports.
      (BTW I’ve pushed a fix for the ffmpeg / qasm build issue on backports).

      • njs says:

        Thanks for the fix 🙂

        To be able to compile your krypton_rbp_backports branch with ffmpeg optimisations enabled you’ll need to call cmake in the following way:

        CXXFLAGS="-DRPI=1" CFLAGS="-DRPI=1" cmake

        I’m planning to submit a PR to your branch to include this change.

        Regarding your specific error, I don’t have a clue why it happens. I plan to replicate this guide on a clean jessie installation to validate it. Please bear with me for a couple of days and I’ll get back to you.


    • popcornmix says:

      I found I had taglib in both /usr/lib and /usr/local/lib. I think the /usr/local/lib was from a historical attempt to build kodi.
      I’ve zapped the /usr/local/lib one and now the build has completed without errors.

      • njs says:

        Glad to hear that everything worked out just fine 🙂
        Feel free to suggest improvements to this guide.

  6. popcornmix says:

    The libshairplay deb package script link is broken

  7. popcornmix says:

    Looks like a missing dependency for libbluray:
    dpkg-checkbuilddeps: Unmet build dependencies: libasm4-java

    • njs says:

      Indeed it was missing. I’ve added that as well.

      Thank you very much for taking the time to test this guide. 😀

  8. popcornmix says:

    Thanks. Another:
    E: Unable to locate package xlive-fonts-recommended

  9. popcornmix says:

    Thanks for the instructions. Some issues I hit running through:

    Initial apt-get install:
    E: Unable to locate package libxrandprev

    Spurious character on end of this line:
    git clone<

    Incorrect download url:

    missing sudo and strange tag on end of this line:
    apt-get install default-jdk javahelper ant doxygen graphviz texlive-latex-base texlive-latex-recommended \texlive-latex-ex

    This needs to be url to raw patch, not html page

    • njs says:

      Thank you very much for your comments 🙂

      All the issues you pointed out are addressed and fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *