v17 enable-player=omxplayer with cmake for raspberry pi 2 ... how?
#1
Trying to use cmake to build RC3 for Raspberry Pi2/Linux. The old configure line I used was:
Code:
./configure --prefix=$_prefix --exec-prefix=$_prefix  \
  --with-platform=raspberry-pi \
  --disable-gl \
  --enable-gles \
  --disable-x11 \
  --disable-vaapi \
  --disable-vdpau \
  --disable-debug \
  --disable-mid \
  --enable-player=omxplayer \
  --with-lirc-device=/run/lirc/lircd \
  ac_cv_lib_bluetooth_hci_devid=no

(See the README.raspberrypi).

What is the cmake method I can use to:
1) enable omxplayer
2) pass the platform=raspberry-pi to the builder?

I have starting with the below but adding -A=raspberry-pi failed so I removed it... I tried -DENABLE_PLAYER=omxplayer but I don't see anything in the output to show that worked:

Code:
cmake -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DENABLE_EVENTCLIENTS=ON \
    -DLIRC_DEVICE=/run/lirc/lircd \
    -DENABLE_X11=OFF \
    ../"xbmc-$_tag"/project/cmake
  make VERBOSE=1
  make preinstall
Need help programming a Streamzap remote?
Reply
#2
There is no option to enable omxplayer in cmake, it is enabled by default, at least if you pass the platform:
-DCORE_SYSTEM_NAME=rbpi
Reply
#3
(2017-01-14, 19:16)rascas Wrote: There is no option to enable omxplayer in cmake, it is available by default, at least if you pass the platform:
-DCORE_SYSTEM_NAME=rbpi

Thanks for the quick reply. I tried building with the following but got errors:
Code:
cmake -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DCORE_SYSTEM_NAME=rbpi \
    -DENABLE_EVENTCLIENTS=ON \
    -DLIRC_DEVICE=/run/lirc/lircd \
    ../"xbmc-$_tag"/project/cmake

Errors... looks like a few
Code:
...
CMake Error at scripts/rbpi/ArchSetup.cmake:22 (message):
  Unknown CPU: armv7l
Call Stack (most recent call first):
  scripts/common/ArchSetup.cmake:95 (include)
  CMakeLists.txt:28 (include)
Need help programming a Streamzap remote?
Reply
#4
additionally pass -DCPU=[arm1176jzf-s|cortex-a7|cortex-a53] for rpi1/2/3 respectively
Reply
#5
and it looks like you are missing the rpi firmware, which leads to the MMAL errors.
Reply
#6
@wsnipex - Using Arch ARM. I have the raspberrypi-firmware package installed. Files are in: /opt/vc I am now building with the following but it too ends in errors... if I remove the DCORE_SYSTEM_NAME=rbpi line, it gets much further into the build (currently going)... thoughts?

Build log.

Code:
export LDFLAGS="$LDFLAGS -L/opt/vc/lib"

  cmake -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DENABLE_EVENTCLIENTS=ON \
    -DENABLE_X11=OFF \
    -DLIRC_DEVICE=/run/lirc/lircd \
    -DCORE_SYSTEM_NAME=rbpi \
    -DCPU=cortex-a7 \
    ../"xbmc-$_tag"/project/cmake
  make VERBOSE=1
  make preinstall
Need help programming a Streamzap remote?
Reply
#7
(2017-01-14, 19:36)wsnipex Wrote: and it looks like you are missing the rpi firmware, which leads to the MMAL errors.

Yep. Either that or Graysky system has the firmware in a place different than the default /opt/vc. Change accordingly:
-DCMAKE_PREFIX_PATH=/opt/vc
Reply
#8
(2017-01-14, 19:45)rascas Wrote:
(2017-01-14, 19:36)wsnipex Wrote: and it looks like you are missing the rpi firmware, which leads to the MMAL errors.

Yep. Either that or Graysky system has the firmware in a place different than the default /opt/vc. Change accordingly:
-DCMAKE_PREFIX_PATH=/opt/vc

OK... I removed the export line and tried the following but it failed (MMAL is find now it seem)!

build log.

Looks like it's just mad about the unknown cpu type in line 22 of the above log.

Code:
cmake -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DENABLE_EVENTCLIENTS=ON \
    -DENABLE_X11=OFF \
    -DLIRC_DEVICE=/run/lirc/lircd \
    -DCMAKE_PREFIX_PATH=/opt/vc \
    -DCPU=cortex-a7 \
    -DCORE_SYSTEM_NAME=rbpi \
    ../"xbmc-$_tag"/project/cmake
  make VERBOSE=1
  make preinstall
Need help programming a Streamzap remote?
Reply
#9
> CPU: armv7l, ARCH:
delete CMakeCache.txt and try again. And I'd do make -j4
Reply
#10
You have to check what that 2 files says in the end.
Also ../"xbmc-$_tag"/project/cmake isn't needed.
Reply
#11
@wsnipex - I start from a clean build dir each time so CMakeCache.txt does not exist when I issues the command cmake command (errors come way before /usr/bin/make is called).

@rascas -

See also "/scratch-nfs/kodi-rbp-git/src/kodi-build/CMakeFiles/CMakeOutput.log". which is here
See also "/scratch-nfs/kodi-rbp-git/src/kodi-build/CMakeFiles/CMakeError.log". which is here.

If I remove the -DCORE_SYSTEM_NAME=rbpi line, the cmake finishes without error. What could be missing?

Code:
cmake -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DCMAKE_PREFIX_PATH=/opt/vc \
    -DLIRC_DEVICE=/run/lirc/lircd \
    -DCPU=cortex-a7 \
    -DENABLE_EVENTCLIENTS=ON \
    -DENABLE_X11=OFF \
    ../"xbmc-$_tag"/project/cmake

-- The CXX compiler identification is GNU 6.3.1
-- The C compiler identification is GNU 6.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/lib/distcc/bin/cc
-- Check for working CXX compiler: /usr/lib/distcc/bin/c++
-- Check for working CXX compiler: /usr/lib/distcc/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/lib/distcc/bin/cc
-- Check for working C compiler: /usr/lib/distcc/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: /scratch-nfs/kodi-rbp-git/src/xbmc-17.0rc3-Krypton
-- Build directory: /scratch-nfs/kodi-rbp-git/src/kodi-build
-- Generator: Single-configuration: Release (Unix Makefiles)
-- CMake Version: 3.7.1
-- 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.11.0")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Found Lzo2: /usr/lib/liblzo2.so  
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.8")
-- Found PNG: /usr/lib/libpng.so (found version "1.6.28")
-- Found GIF: /usr/lib/libgif.so  
-- Found JPEG: /usr/lib/libjpeg.so  
-- Found EXPAT: /usr/lib/libexpat.so (found version "2.2.0")
-- Found Sqlite3: /usr/lib/libsqlite3.so (found version "3.16.2")
-- Found FreeType: /usr/lib/libfreetype.so (found version "19.0.13")
-- Found PCRE: /usr/lib/libpcrecpp.so (found version "8.39")
-- Found TinyXML: /usr/lib/libtinyxml.so (found version "2.6.2")
-- Found PythonLibs: /usr/lib/libpython2.7.so (found suitable version "2.7.13", minimum required is "2.7")
-- Found PYTHON: /usr/include/python2.7  
-- Found Yajl: /usr/lib/libyajl.so (found suitable version "2.1.0", minimum required is "2.0.0")
-- Found FriBidi: /usr/lib/libfribidi.so (found version "0.19.7")
-- Found TagLib: /usr/lib/libtag.so (found version "1.11.1")
-- FFmpeg 3.1 not found, falling back to internal build
-- Found CrossGuid: /scratch-nfs/kodi-rbp-git/src/kodi-build/build/lib/libcrossguid.a (found version "8f399e8bd4")
-- Found UUID: /usr/lib/libuuid.so (found version "2.29.")
-- Found MicroHttpd: /usr/lib/libmicrohttpd.so (found version "0.9.52")
-- Found MySqlClient: /usr/lib/libmysqlclient.so  
-- Found SSH: /usr/lib/libssh.so (found version "0.7.3")
-- Found LibXml2: /usr/lib/libxml2.so (found version "2.9.4")
-- Found XSLT: /usr/lib/libxslt.so (found version "1.1.29")
-- Found ALSA: /usr/lib/libasound.so (found version "1.1.3")
-- Found UDEV: /usr/lib/libudev.so (found version "232")
-- Found DBus: /usr/lib/libdbus-1.so (found version "1.10.14")
-- Found Avahi: /usr/lib/libavahi-client.so (found version "0.6.32")
-- Found SmbClient: /usr/lib/libsmbclient.so (found version "0.2.3")
-- Could NOT find CCACHE (missing:  CCACHE_PROGRAM)
-- Found PulseAudio: /usr/lib/libpulse.so (found suitable version "9.0", minimum required is "2.0.0")
-- Could NOT find VDPAU (missing:  VDPAU_LIBRARY VDPAU_INCLUDE_DIR)
-- Found VAAPI: /usr/lib/libva.so (found suitable version "0.39.4", minimum required is "0.38.0")
-- Found Bluetooth: /usr/lib/libbluetooth.so  
-- Found CAP: /usr/lib/libcap.so (found version "2.25")
-- Found Curl: /usr/lib/libcurl.so (found version "7.52.1")
-- OpenSSL is statically linked into Curl: FALSE
-- Found ASS: /usr/lib/libass.so (found version "0.13.4")
-- Found CEC: /usr/lib/libcec.so (found suitable version "4.0.0", minimum required is "4.0.0")
-- Found Bluray: /usr/lib/libbluray.so (found version "0.9.3")
-- Found PLIST: /usr/lib/libplist.so (found version "1.12")
-- Found NFS: /usr/lib/libnfs.so (found version "1.11.0")
-- Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so (found version "1.0.2j")
-- Found CDIO: /usr/lib/libcdio.so (found version "0.94")
-- Found Shairplay: /usr/lib/libshairplay.so  
-- Found OpenGl: /usr/lib/libGL.so  
-- Found EGL: /opt/vc/lib/libEGL.so (found version "10")
-- Found PythonInterp: /usr/bin/python (found version "3.6")
-- Found Threads: TRUE  
-- Found Java: /usr/bin/java (found version "1.7.0.99") found components:  Runtime
-- Found SWIG: /usr/bin/swig (found version "3.0.11")
-- Override disabled for AEDefines.h, using generic implementation
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.12")
-- Found CWIID: /usr/lib/libcwiid.so (found version "0.6.00")
-- #---- CONFIGURATION ----#
-- -- PATH config --
-- Prefix: /usr
-- Libdir: /usr/lib
-- Bindir: /usr/bin
-- Includedir: /usr/include
-- Datarootdir: /usr/share
-- Datadir: /usr/share
-- Docdir: /usr/share/doc/kodi
-- MICROHTTPD enabled: Yes
-- MYSQLCLIENT enabled: Yes
-- SSH enabled: Yes
-- XSLT enabled: Yes
-- ALSA enabled: Yes
-- UDEV enabled: Yes
-- DBUS enabled: Yes
-- AVAHI enabled: Yes
-- SMBCLIENT enabled: Yes
-- CCACHE enabled: No
-- PULSEAUDIO enabled: Yes
-- VDPAU enabled: No
-- VAAPI enabled: Yes
-- BLUETOOTH enabled: Yes
-- CAP enabled: Yes
-- CEC enabled: Yes
-- BLURAY enabled: Yes
-- PLIST enabled: Yes
-- NFS enabled: Yes
-- SDL enabled: No
-- OPENGL enabled: Yes
-- X enabled: No
-- LIBDRM enabled: No
-- XRANDR enabled: No
-- AML enabled: No
-- IMX enabled: No
-- Configuring done
-- Generating done
-- Build files have been written to: /scratch-nfs/kodi-rbp-git/src/kodi-build
Need help programming a Streamzap remote?
Reply
#12
I think you still have some firmware missing:
Code:
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
distcc[22462] ERROR: compile (null) on localhost failed

Doesn't Arch have the rpi-update tool ? It installs kernel/firmware and should install all needed files.
Reply
#13
@rascas - No rpi-update tool that I am aware of... Arch tends to package everything so the package manager is able to track files more effectively. What is a file I can manually search for in /opt that belongs to -lpthreads to confirm?
Need help programming a Streamzap remote?
Reply
#14
If have you everything from here, it should be ok:
https://github.com/raspberrypi/firmware
CMAKE_PREFIX_PATH should also be enough for the raspberry pi libraries.

You are building directly on the Pi I suppose. Do you still have error with the CPU and unknow ARCH ? That is strange. Did you try to force the CPU and ARCH along with the platform ?
-DCORE_SYSTEM_NAME=rbpi
-DWITH_CPU=cortex-a7
-DWITH_ARCH=arm

Post your log again.
Reply
#15
@rascas - OK. Yes, I am building on a RPi2. Trying your suggestion about forcing the WITH_ARCH=arm allowed the configuration to work! Build is starting now. I will post back about the result.

Log from the cmake first step:

Code:
cmake -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DCMAKE_PREFIX_PATH=/opt/vc \
    -DCORE_SYSTEM_NAME=rbpi \
    -DCPU=cortex-a7 \
    -DWITH_ARCH=arm \
    -DENABLE_EVENTCLIENTS=ON \
    -DENABLE_OPENGL=OFF \
    -DENABLE_X11=OFF \
    -DENABLE_VAAPI=OFF \
    -DENABLE_VDPAU=OFF \
    -DLIRC_DEVICE=/run/lirc/lircd \
    ../"xbmc-$_tag"/project/cmake

Log from first cmake step: log

EDIT: Result is a fully functional package!
Need help programming a Streamzap remote?
Reply

Logout Mark Read Team Forum Stats Members Help
enable-player=omxplayer with cmake for raspberry pi 2 ... how?2