Kodi Community Forum
Linux Kodi Cross compiling for ARMv7 with Ubuntu 16.04 LTS - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: Linux Kodi Cross compiling for ARMv7 with Ubuntu 16.04 LTS (/showthread.php?tid=332902)



Kodi Cross compiling for ARMv7 with Ubuntu 16.04 LTS - samsonluk - 2018-06-17

Build host is Ubuntu 16.04 with gcc 8.1.0 cross toolchain armv7 NEON optimization enabled, target is Asus Tinkerboard, Leia master branch.
I basically follow git's README.raspberrypi without --with-firmware=$RPI_DEV/firmware and --with-platform=raspberry-pi2 in ./configure.
Dependencies built successfully as follow:
Quote:xbmc/tools/depends$ ./configure --host=arm-unknown-linux-gnueabi \ 
--build=i686-pc-linux-gnu \
--prefix=/usr/local/src/kodi-bcm \
--with-toolchain=/opt/x-tools/arm-unknown-linux-gnueabi \
--disable-debug

checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnueabi
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... yes
checking for ccache... yes
checking for curl... /usr/bin/curl
checking for tar... /bin/tar
checking for arm-unknown-linux-gnueabi-ranlib... /opt/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ranlib
checking for arm-unknown-linux-gnueabi-ld... /opt/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ld
checking for arm-unknown-linux-gnueabi-ar... /opt/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ar
checking for arm-unknown-linux-gnueabi-readelf... /opt/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-readelf
checking for arm-unknown-linux-gnueabi-strip... /opt/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-strip
checking for arm-unknown-linux-gnueabi-as... /opt/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-as
checking for arm-unknown-linux-gnueabi-nm... /opt/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-nm
checking for arm-unknown-linux-gnueabi-objdump... /opt/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-objdump
checking for arm-unknown-linux-gnueabi-gcc... /opt/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc
checking for arm-unknown-linux-gnueabi-g++... /opt/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-g++
checking how to run the C preprocessor... /opt/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -E
checking for ranlib... /usr/bin/ranlib
checking for ld... /usr/bin/ld
checking for ar... /usr/bin/ar
checking for readelf... /usr/bin/readelf
checking for strip... /usr/bin/strip
checking for as... /usr/bin/as
checking for nm... /usr/bin/nm
checking for objdump... /usr/bin/objdump
checking for gcc... /usr/bin/gcc
checking for g++... /usr/bin/g++
checking for library containing iconv_open... none required
checking for arm-unknown-linux-gnueabi-ccache... no
checking for ccache... /usr/bin/ccache
configure: WARNING: using cross tools not prefixed with host triplet
configure: creating ./config.status
config.status: creating target/config.site
config.status: creating native/config.site.native
config.status: creating Makefile.include
config.status: creating target/Toolchain.cmake
config.status: creating target/config-binaddons.site
config.status: creating target/Toolchain_binaddons.cmake
config.status: creating target/cross-file.meson
use simulator:
'target/config.site' -> '/usr/local/src/kodi-bcm/arm-unknown-linux-gnueabi-release/share/config.site'
'target/config-binaddons.site' -> '/usr/local/src/kodi-bcm/i686-linux-gnu-native/share/config-binaddons.site'
'target/Toolchain.cmake' -> '/usr/local/src/kodi-bcm/arm-unknown-linux-gnueabi-release/share/Toolchain.cmake'
'target/Toolchain_binaddons.cmake' -> '/usr/local/src/kodi-bcm/arm-unknown-linux-gnueabi-release/share/Toolchain_binaddons.cmake'
'target/cross-file.meson' -> '/usr/local/src/kodi-bcm/arm-unknown-linux-gnueabi-release/share/cross-file.meson'
'native/config.site.native' -> '/usr/local/src/kodi-bcm/i686-linux-gnu-native/share/config.site'


#------- configuration -------#
ccache:          yes
build type:      release
toolchain:       /opt/x-tools/arm-unknown-linux-gnueabi
cpu:             arm
host:            arm-unknown-linux-gnueabi
cflags:          -fPIC -DPIC  -Os
cxxflags:        -std=c++11 -fPIC -DPIC  -Os
ldflags:         -Wl,-rpath-link=/usr/local/src/kodi-bcm/arm-unknown-linux-gnueabi-release/lib
ffmpeg options:
prefix:          /usr/local/src/kodi-bcm
depends:         /usr/local/src/kodi-bcm/arm-unknown-linux-gnueabi-release
samson@37f0f5c53325:/usr/local/src/xbmc/tools/depends$
...
...
...
Running custom install script '/bin/sh /usr/local/src/xbmc/tools/depends/target/libinput/arm-unknown-linux-gnueabi-release/src/libinput-restore-selinux-context.sh /usr/local/src/kodi-bcm/arm-unknown-linux-gnueabi-release/lib /usr/local/src/xbmc/tools/depends/target/libinput/arm-unknown-linux-gnueabi-release/build/libinput.so.10.13.0'
Running custom install script '/usr/local/src/xbmc/tools/depends/target/libinput/arm-unknown-linux-gnueabi-release/tools/install-compat-scripts.sh /usr/local/src/kodi-bcm/arm-unknown-linux-gnueabi-release/bin'
touch .installed-arm-unknown-linux-gnueabi-release
make[2]: Leaving directory '/usr/local/src/xbmc/tools/depends/target/libinput'
touch .installed-arm-unknown-linux-gnueabi-release
Dependencies built successfully.

However, I failed to complete the "make -C tools/depends/target/cmakebuildsys" with the following error:
Quote:$ make -C tools/depends/target/cmakebuildsys
make: Entering directory '/usr/local/src/xbmc/tools/depends/target/cmakebuildsys'
mkdir -p /usr/local/src/xbmc/build
cd /usr/local/src/xbmc/build; /usr/local/src/kodi-bcm/i686-linux-gnu-native/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/usr/local/src/kodi-bcm/arm-unknown-linux-gnueabi-release/share/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=/usr/local/src/kodi-bcm/arm-unknown-linux-gnueabi-release -DCMAKE_BUILD_TYPE=Release -DENABLE_INTERNAL_CROSSGUID=OFF -DENABLE_INTERNAL_FFMPEG=OFF  /usr/local/src/xbmc
-- Source directory: /usr/local/src/xbmc
-- Build directory: /usr/local/src/xbmc/build
-- Generator: Single-configuration: Release (Unix Makefiles)
-- CMake Version: 3.9.4
-- System type: Linux
-- Linker: GNU gold
-- Core system type: linux
-- Platform:
-- CPU: arm, ARCH: arm
-- Cross-Compiling: TRUE
-- Execute build artefacts on host: FALSE
-- Depends based build: 1
-- 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
-- Could NOT find Avahi (missing: AVAHI_CLIENT_LIBRARY AVAHI_COMMON_LIBRARY AVAHI_CLIENT_INCLUDE_DIR AVAHI_COMMON_INCLUDE_DIR)
-- Could NOT find Bluetooth (missing: BLUETOOTH_LIBRARY BLUETOOTH_INCLUDE_DIR)
-- Could NOT find CAP (missing: CAP_LIBRARY CAP_INCLUDE_DIR)
-- Could NOT find LCMS2 (missing: LCMS2_LIBRARY LCMS2_INCLUDE_DIR)
-- Could NOT find LircClient (missing: LIRCCLIENT_LIBRARY LIRCCLIENT_INCLUDE_DIR)
-- Could NOT find MDNS (missing: MDNS_LIBRARY MDNS_INCLUDE_DIR)
-- Could NOT find PulseAudio (missing: PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY PULSEAUDIO_SIMPLE_LIBRARY PULSEAUDIO_INCLUDE_DIR) (Required is at least version "2.0.0")
-- Could NOT find Sndio (missing: SNDIO_LIBRARY SNDIO_INCLUDE_DIR)
-- Could NOT find VAAPI (missing: VAAPI_libva_LIBRARY VAAPI_libva-drm_LIBRARY VAAPI_libva_INCLUDE_DIR VAAPI_libva-drm_INCLUDE_DIR VAAPI_libva-x11_INCLUDE_DIR VAAPI_libva-x11_LIBRARY) (Required is at least version "0.39.0")
-- Could NOT find VDPAU (missing: VDPAU_LIBRARY VDPAU_INCLUDE_DIR)
CMake Error at /usr/local/src/kodi-bcm/i686-linux-gnu-native/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find GLX (missing: GLX_LIBRARY GLX_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/local/src/kodi-bcm/i686-linux-gnu-native/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindGLX.cmake:27 (find_package_handle_standard_args)
  cmake/scripts/common/Macros.cmake:374 (find_package)
  cmake/scripts/common/Macros.cmake:442 (find_package_with_ver)
  CMakeLists.txt:175 (core_optional_dep)


-- Configuring incomplete, errors occurred!
See also "/usr/local/src/xbmc/build/CMakeFiles/CMakeOutput.log".
See also "/usr/local/src/xbmc/build/CMakeFiles/CMakeError.log".
Makefile:16: recipe for target 'all' failed
make: *** [all] Error 1
make: Leaving directory '/usr/local/src/xbmc/tools/depends/target/cmakebuildsys'
Your advices/hints on how to overcome the above errors is much appreciated.


RE: Kodi Cross compiling for ARMv7 with Ubuntu 16.04 LTS - m2k1980 - 2018-08-18

cant crosscompile anymore for android aarch64 too


RE: Kodi Cross compiling for ARMv7 with Ubuntu 16.04 LTS - m2k1980 - 2018-08-18

ok got it working, after third time beginning from scratch its now working, idk what happened between Smile