Solved Failing to build Kodi 18 natively on Raspberry Pi 2B running HardFloat ARM Linux
#1
Is there any undocumented way to build Kodi 18 natively on a Raspberry Pi2B HardFloat ARM Linux system, that has all the tools and dependencies already available, that's without building an entire OS, like documented in the Kodi official doc? (LibreELEC is already built and a nice system BTW).
I built https://github.com/xbmc/FFmpeg/archive/4...RC5.tar.gz on my own, as shared lib, and tried to follow this doc:
https://github.com/xbmc/xbmc/blob/master...berryPi.md
- executed the following:
Code:
cd /kit/kodi-slack-build/kodi/tools/depends
./bootstrap
./configure --prefix=/kit/kodi-slack-build/kodi/ --with-platform=raspberry-pi2 --disable-debug
- if I run make I'm building a whole darn operating system - stopped after compiling cmake/python 2 & 3 .. etc, around 500MB of binaries that I already have available on my system
- the next step, I omitted running make in the depends subdir and tried to build Kodi after the bootstrap & configure
Code:
/kit/kodi-slack-build/kodi# make -j 3 -C tools/depends/target/cmakebuildsys
make: Entering directory '/kit/kodi-slack-build/kodi/tools/depends/target/cmakebuildsys'
mkdir -p /kit/kodi-slack-build/kodi/build
cd /kit/kodi-slack-build/kodi/build; /kit/kodi-slack-build/kodi/armv7l-linux-gnueabihf-native/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/kit/kodi-slack-build/kodi/raspberry-pi2-release/share/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=/kit/kodi-slack-build/kodi/raspberry-pi2-release -DCMAKE_BUILD_TYPE=Release -DENABLE_INTERNAL_CROSSGUID=OFF -DENABLE_INTERNAL_FFMPEG=OFF  /kit/kodi-slack-build/kodi
/bin/sh: /kit/kodi-slack-build/kodi/armv7l-linux-gnueabihf-native/bin/cmake: No such file or directory
make: *** [Makefile:17: all] Error 127
make: Leaving directory '/kit/kodi-slack-build/kodi/tools/depends/target/cmakebuildsys'
- only to find out that the cmake available on my system is no good and /kit/kodi-slack-build/kodi/armv7l-linux-gnueabihf-native/bin/cmake is called instead (which obviously doesn't exist as I didn't built it)

By trial and error I found out that I have -DCORE_PLATFORM_NAME=rbpi, started to get excited and followed this generic Linux doc ... and failed again:
https://github.com/xbmc/xbmc/blob/master...E.Linux.md

/kit/kodi-slack-build/kodi-build# cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_INTERNAL_CROSSGUID=ON -DENABLE_INTERNAL_FLATBUFFERS=ON -DENABLE_INTERNAL_FMT=ON -DCORE_PLATFORM_NAME=rbpi
Code:
-- The CXX compiler identification is GNU 8.2.0
-- The C compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Source directory: /kit/kodi-slack-build/kodi
-- Build directory: /kit/kodi-slack-build/kodi-build
-- Generator: Single-configuration: Release (Unix Makefiles)
-- CMake Version: 3.13.3
-- System type: Linux
-- Checking to see if CXX compiler accepts flag -std=c++11
-- Checking to see if CXX compiler accepts flag -std=c++11 - yes
-- Found CXX11: -std=c++11
-- Linker: GNU gold
-- Core system type: linux
-- Platform:
-- CPU: armv7l, ARCH: arm
-- Cross-Compiling: FALSE
-- Execute build artefacts on host: TRUE
-- Depends based build:
-- Could not find hardware support for SSE (missing: _SSE_TRUE _SSE_OK)
-- Could not find hardware support for SSE2 (missing: _SSE2_TRUE _SSE2_OK)
-- Could not find hardware support for SSE3 (missing: _SSE3_TRUE _SSE3_OK)
-- Could not find hardware support for SSSE3 (missing: _SSSE3_TRUE _SSSE3_OK)
-- Could not find hardware support for SSE4.1 (missing: _SSE41_TRUE _SSE41_OK)
-- Could not find hardware support for SSE4.2 (missing: _SSE42_TRUE _SSE42_OK)
-- Could not find hardware support for AVX (missing: _AVX_TRUE _AVX_OK)
-- Could not find hardware support for AVX2 (missing: _AVX2_TRUE _AVX2_OK)
-- NEON optimization enabled
-- Found Git: /usr/bin/git (found version "2.20.1")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Found Lzo2: /usr/lib/liblzo2.so
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.11")
-- Found PNG: /usr/lib/libpng.so (found version "1.6.36")
-- Found GIF: /usr/lib/libgif.so
-- Found JPEG: /usr/lib/libjpeg.so (found version "62")
-- Found Alsa: /usr/lib/libasound.so (found version "1.1.8")
-- Could NOT find Avahi (missing: AVAHI_CLIENT_LIBRARY AVAHI_COMMON_LIBRARY AVAHI_CLIENT_INCLUDE_DIR AVAHI_COMMON_INCLUDE_DIR)
-- Found Bluetooth: /usr/lib/libbluetooth.so
-- Found Bluray: /usr/lib/libbluray.so (found suitable version "1.0.2", minimum required is "0.9.3")
-- Found CAP: /lib/libcap.so (found version "2.26")
-- Found CCache: /usr/bin/ccache
-- Could NOT find CEC (missing: CEC_LIBRARY CEC_INCLUDE_DIR) (Required is at least version "4.0.0")
-- Found DBus: /usr/lib/libdbus-1.so (found version "1.12.12")
-- Found LCMS2: /usr/lib/liblcms2.so (found version "2.9")
-- Found LircClient: /usr/local/lib/liblirc_client.so
-- Could NOT find MDNS (missing: MDNS_LIBRARY MDNS_INCLUDE_DIR)
-- Could NOT find MicroHttpd (missing: MICROHTTPD_LIBRARY MICROHTTPD_INCLUDE_DIR)
-- Could NOT find NFS (missing: NFS_LIBRARY NFS_INCLUDE_DIR)
-- Found PulseAudio: /usr/lib/libpulse.so (found suitable version "12.2-rebootstrapped", minimum required is "2.0.0")
-- Found PythonLibs: /usr/lib/libpython2.7.so (found suitable version "2.7.15", minimum required is "2.7")
-- Found Python: /usr/include/python2.7
-- Found SmbClient: /usr/lib/libsmbclient.so (found version "0.4.0")
-- Could NOT find Sndio (missing: SNDIO_LIBRARY SNDIO_INCLUDE_DIR)
-- Found UDEV: /usr/lib/libudev.so (found version "220")
-- Found LibXml2: /usr/lib/libxml2.so (found version "2.9.9")
-- Found XSLT: /usr/lib/libxslt.so (found version "1.1.33")
-- Found Plist: /usr/lib/libplist.so (found version "2.0.0")
-- Found ASS: /usr/local/lib/libass.so (found version "0.13.2")
-- Found Cdio: /usr/lib/libcdio.so (found version "2.0.0")
-- Found EXPAT: /usr/lib/libexpat.so (found version "2.2.6")
-- Found CrossGUID: /kit/kodi-slack-build/kodi-build/build/lib/libcrossguid.a (found version "8f399e8bd4")
-- Found UUID: /usr/lib/libuuid.so (found version "2.33.1")
-- Found Curl: /usr/lib/libcurl.so (found version "7.63.0")
-- Found FFMPEG: /usr/local/include (found version "4.0")
-- Found FlatBuffers: /kit/kodi-slack-build/kodi-build/build/bin/flatc (found version "1.9.0")
-- Found Fmt: /kit/kodi-slack-build/kodi-build/build/lib/libfmt.a (found version "5.1.0")
-- Found FreeType: /usr/lib/libfreetype.so (found version "22.1.16")
-- Found FriBidi: /usr/lib/libfribidi.so (found version "1.0.5")
-- Found fstrcmp: /usr/local/lib/libfstrcmp.so (found version "0.7.D001")
-- Found Iconv: /usr/lib/libc.so
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1a")
-- Found PCRE: /usr/lib/libpcrecpp.so (found version "8.42")
-- Found RapidJSON: /usr/local/include (found version "1.1.0")
-- Found Sqlite3: /usr/lib/libsqlite3.so (found version "3.26.0")
-- Found TagLib: /usr/lib/libtag.so (found version "1.11.1")
-- Found TinyXML: /usr/lib/libtinyxml.so (found version "2.6.2")
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenGLES (missing: OPENGLES_gl_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindOpenGLES.cmake:37 (find_package_handle_standard_args)
  cmake/scripts/common/Macros.cmake:366 (find_package)
  cmake/scripts/common/Macros.cmake:380 (find_package_with_ver)
  CMakeLists.txt:179 (core_require_dep)


-- Configuring incomplete, errors occurred!
See also "/kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeOutput.log".
See also "/kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeError.log".
- inspecting the CMake error log I found out that the actual issue is related to pthread_create and not about not finding the OPENGLES_gl_LIBRARY
- and what's "/usr/bin/cc -D_ARMEL" doing on a HardFloat ARM system BTW?
/kit/kodi-slack-build/kodi-build/CMakeFiles# cat CMakeError.log
Code:
Determining if the pthread_create exist failed with the following output:
Change Dir: /kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_9d60b/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_9d60b.dir/build.make CMakeFiles/cmTC_9d60b.dir/build
gmake[1]: Entering directory '/kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_9d60b.dir/CheckSymbolExists.c.o
/usr/bin/cc   -D_ARMEL -DTARGET_RASPBERRY_PI -Wall    -o CMakeFiles/cmTC_9d60b.dir/CheckSymbolExists.c.o   -c /kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_9d60b
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9d60b.dir/link.txt --verbose=1
/usr/bin/cc -D_ARMEL -DTARGET_RASPBERRY_PI -Wall    -fuse-ld=gold  CMakeFiles/cmTC_9d60b.dir/CheckSymbolExists.c.o  -o cmTC_9d60b
CMakeFiles/cmTC_9d60b.dir/CheckSymbolExists.c.o:CheckSymbolExists.c:function main: error: undefined reference to 'pthread_create'
CMakeFiles/cmTC_9d60b.dir/CheckSymbolExists.c.o:CheckSymbolExists.c:function main: error: undefined reference to 'pthread_create'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_9d60b.dir/build.make:87: cmTC_9d60b] Error 1
gmake[1]: Leaving directory '/kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_9d60b/fast] Error 2

File /kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_cd2e5/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_cd2e5.dir/build.make CMakeFiles/cmTC_cd2e5.dir/build
gmake[1]: Entering directory '/kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_cd2e5.dir/CheckFunctionExists.c.o
/usr/bin/cc   -D_ARMEL -DTARGET_RASPBERRY_PI -Wall -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_cd2e5.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.13/Modules/CheckFunctionExists.c
Linking C executable cmTC_cd2e5
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cd2e5.dir/link.txt --verbose=1
/usr/bin/cc -D_ARMEL -DTARGET_RASPBERRY_PI -Wall -DCHECK_FUNCTION_EXISTS=pthread_create   -fuse-ld=gold  CMakeFiles/cmTC_cd2e5.dir/CheckFunctionExists.c.o  -o cmTC_cd2e5 -lpthreads
/usr/bin/ld.gold: error: cannot find -lpthreads
CMakeFiles/cmTC_cd2e5.dir/CheckFunctionExists.c.o:CheckFunctionExists.c:function main: error: undefined reference to 'pthread_create'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_cd2e5.dir/build.make:87: cmTC_cd2e5] Error 1
gmake[1]: Leaving directory '/kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_cd2e5/fast] Error 2
-last lines of  CMakeOutput.log:
Code:
Determining if the function pthread_create exists in the pthread passed with the following output:
Change Dir: /kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_4d396/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_4d396.dir/build.make CMakeFiles/cmTC_4d396.dir/build
gmake[1]: Entering directory '/kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_4d396.dir/CheckFunctionExists.c.o
/usr/bin/cc   -D_ARMEL -DTARGET_RASPBERRY_PI -Wall -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_4d396.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.13/Modules/CheckFunctionExists.c
Linking C executable cmTC_4d396
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4d396.dir/link.txt --verbose=1
/usr/bin/cc -D_ARMEL -DTARGET_RASPBERRY_PI -Wall -DCHECK_FUNCTION_EXISTS=pthread_create   -fuse-ld=gold  CMakeFiles/cmTC_4d396.dir/CheckFunctionExists.c.o  -o cmTC_4d396 -lpthread
gmake[1]: Leaving directory '/kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp'


Determining if the function iconv exists passed with the following output:
Change Dir: /kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_88fb2/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_88fb2.dir/build.make CMakeFiles/cmTC_88fb2.dir/build
gmake[1]: Entering directory '/kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_88fb2.dir/CheckFunctionExists.c.o
/usr/bin/cc   -D_ARMEL -DTARGET_RASPBERRY_PI -Wall -DCHECK_FUNCTION_EXISTS=iconv   -o CMakeFiles/cmTC_88fb2.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.13/Modules/CheckFunctionExists.c
Linking C executable cmTC_88fb2
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_88fb2.dir/link.txt --verbose=1
/usr/bin/cc -D_ARMEL -DTARGET_RASPBERRY_PI -Wall -DCHECK_FUNCTION_EXISTS=iconv   -fuse-ld=gold  CMakeFiles/cmTC_88fb2.dir/CheckFunctionExists.c.o  -o cmTC_88fb2 -lc
gmake[1]: Leaving directory '/kit/kodi-slack-build/kodi-build/CMakeFiles/CMakeTmp'

Any hints / help appreciated!
Reply


Messages In This Thread
Failing to build Kodi 18 natively on Raspberry Pi 2B running HardFloat ARM Linux - by abga - 2019-02-01, 08:28
Logout Mark Read Team Forum Stats Members Help
Failing to build Kodi 18 natively on Raspberry Pi 2B running HardFloat ARM Linux0