Compiling Kodi and building deb packages – Raspbian Stretch

You may also like...

7 Responses

  1. Paul R. Gibson, Jr. says:

    BTW, the pthread issue I highlighted turned out to be nothing. With -Wnodev that callout was suppressed. The real issue at that time was the string(REPLACE…) syntax issue.

  2. Paul R. Gibson, Jr. says:

    ns….I am build K18 for a second time so i can get a better handle on any issues.
    From the first build attempt there was an issue with missing fmt package and with rapidjson package. Once I installed them all was ok and during second build/cmake attempt there were no fmt/rapidjson issues because they had been previously installed.
    Two other issues from both build attempts are as follows:

    1)
    CMake Error at cmake/cpack/CPackConfigDEB.cmake:126 (string):
    string sub-command REPLACE requires at least four arguments.
    Call Stack (most recent call first):
    cmake/scripts/rbpi/Install.cmake:309 (include)
    CMakeLists.txt:414 (include)

    CODE LOOKED LIKE THIS:
    string(REPLACE “\”” “” CHANGELOG ${CHANGELOG})

    I CHANGED CODE TO THIS:
    string(REPLACE “\”” ” ” CHANGELOG “${CHANGELOG}”)

    2)The file generated by cmake for the cpack debian package making process had the following entries which are incorrect. I could not find where the file CPackConfig.cmake was created so I just hacked it to look better:

    SET(CPACK_DEBIAN_PACKAGE_VERSION “2:18.0~git20171214.0453-b4e54bf036-di-1~stretch”)
    SET(CPACK_DEB_COMPONENT_INSTALL “ON”)
    SET(CPACK_GENERATOR “DEB”)
    SET(CPACK_INSTALL_CMAKE_PROJECTS “/share/kodi/build;kodi;ALL;/”)
    SET(CPACK_INSTALL_PREFIX “/usr”)
    SET(CPACK_MODULE_PATH “/share/kodi/cmake/modules”)
    SET(CPACK_NSIS_DISPLAY_NAME “kodi 0.0.1”)
    SET(CPACK_NSIS_INSTALLER_ICON_CODE “”)
    SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE “”)
    SET(CPACK_NSIS_INSTALL_ROOT “$PROGRAMFILES”)
    SET(CPACK_NSIS_PACKAGE_NAME “kodi 0.0.1”)
    SET(CPACK_OUTPUT_CONFIG_FILE “/share/kodi/build/CPackConfig.cmake”)
    SET(CPACK_PACKAGE_DEFAULT_LOCATION “/”)
    SET(CPACK_PACKAGE_DESCRIPTION_FILE “/usr/share/cmake-3.7/Templates/CPack.GenericDescription.txt”)
    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY “kodi built using CMake”)
    SET(CPACK_PACKAGE_DIRECTORY “/share/kodi/build/packages”)
    SET(CPACK_PACKAGE_FILE_NAME “kodi-0.0.1-armv7l”)
    SET(CPACK_PACKAGE_INSTALL_DIRECTORY “kodi 0.0.1”)
    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY “kodi 0.0.1”)
    SET(CPACK_PACKAGE_NAME “kodi”)
    SET(CPACK_PACKAGE_RELOCATABLE “true”)
    SET(CPACK_PACKAGE_VENDOR “Humanity”)
    SET(CPACK_PACKAGE_VERSION “0.0.1”)
    SET(CPACK_PACKAGE_VERSION_MAJOR “0”)
    SET(CPACK_PACKAGE_VERSION_MINOR “1”)
    SET(CPACK_PACKAGE_VERSION_PATCH “1”)

    I HACKED/CHANGED to look like this.
    SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE “http://kodi.tv”)
    SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ” “)
    SET(CPACK_DEBIAN_PACKAGE_VERSION “2:18.0~git20171214.0453-b4e54bf036-di-1~stretch”)
    SET(CPACK_DEB_COMPONENT_INSTALL “ON”)
    SET(CPACK_GENERATOR “DEB”)
    SET(CPACK_INSTALL_CMAKE_PROJECTS “/share/kodi/build;kodi;ALL;/”)
    SET(CPACK_INSTALL_PREFIX “/usr”)
    SET(CPACK_MODULE_PATH “/share/kodi/cmake/modules”)
    SET(CPACK_NSIS_DISPLAY_NAME “kodi 18.0.0”)
    SET(CPACK_NSIS_INSTALLER_ICON_CODE “”)
    SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE “”)
    SET(CPACK_NSIS_INSTALL_ROOT “$PROGRAMFILES”)
    SET(CPACK_NSIS_PACKAGE_NAME “kodi 18.0.0”)
    SET(CPACK_OUTPUT_CONFIG_FILE “/share/kodi/build/CPackConfig.cmake”)
    SET(CPACK_PACKAGE_DEFAULT_LOCATION “/”)
    SET(CPACK_PACKAGE_DESCRIPTION_FILE “/usr/share/cmake-3.7/Templates/CPack.GenericDescription.txt”)
    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY “kodi built using CMake”)
    SET(CPACK_PACKAGE_DIRECTORY “/share/kodi/build/packages”)
    SET(CPACK_PACKAGE_FILE_NAME “kodi-18.0.0-armv7l”)
    SET(CPACK_PACKAGE_INSTALL_DIRECTORY “kodi 18.0.0”)
    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY “kodi 18.0.0”)
    SET(CPACK_PACKAGE_NAME “kodi”)
    SET(CPACK_PACKAGE_RELOCATABLE “true”)
    SET(CPACK_PACKAGE_VENDOR “Humanity”)
    SET(CPACK_PACKAGE_VERSION “18.0.0”)
    SET(CPACK_PACKAGE_VERSION_MAJOR “18”)
    SET(CPACK_PACKAGE_VERSION_MINOR “0”)
    SET(CPACK_PACKAGE_VERSION_PATCH “0”)

    You can imaging what deb packages and armv7l directory looked like when set to 0.0.1

    • njs says:

      Regarding fmt and rapidjson, I submited a patch where you can compile the internal versions by setting -DENABLE_INTERNAL_FMT=ON and -DENABLE_INTERNAL_RapidJSON=ON 🙂

      About the other issues I’ll try to have a look at them in the following days 🙂

      Thanks for all the input, it’s really appreciated.

  3. Paul R. Gibson, Jr. says:

    BTW I am trying to compile: git clone https://github.com/popcornmix/xbmc.git

    • Paul R. Gibson, Jr. says:

      I have/am using/are testing a kodi 18 build on my PI3 Debian Stretch.

      I had to overcome many many hurdles to accomplish the build.

      • njs says:

        Depending on the configuration you might encounter some issues indeed, I’ll try to update the branch with the latest version and compile it.

        I can also create a post about how to compile v18, so your input on the things you came across and how you solve them would be interesting.

        Thanks

  4. Paul R. Gibson, Jr. says:

    Ok…I give up and must ask for help. I am attempting Kodi 18 build. I have overcome fmt and rapidjson issues but I am stuck on how to resolve the below error. I googled and still cannot find fix.
    In your spare time is it possible for you to assist me in overcoming the below issue?
    /usr/bin/cc -fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad CMakeFiles/cmTC_3aabe.dir/CheckSymbolExists.c.o -o cmTC_3aabe -rdynamic
    CMakeFiles/cmTC_3aabe.dir/CheckSymbolExists.c.o: In function `main’:
    CheckSymbolExists.c:(.text+0x48): undefined reference to `pthread_create’
    collect2: error: ld returned 1 exit status

    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0ca02.dir/link.txt –verbose=1
    /usr/bin/cc -fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_0ca02.dir/CheckFunctionExists.c.o -o cmTC_0ca02 -rdynamic -lpthreads
    /usr/bin/ld: cannot find -lpthreads
    collect2: error: ld returned 1 exit status

    On a positive note I was able to compile and use another kodi 17.6 build that I made on my Debian Stretch rpi3. (kodi still crashes on my PI. Guess I better submit a ticket to the kodi team.

    Thanks in advance, and once I am successful I will help you write a kodi 18 compile blog post if you wish.

Leave a Reply

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