2020-09-22, 20:33
Hi,
Just a little background first, I was unable to use my own compilations of Kodi 18 on PiZero and Pi2B because the video playback on normal MPEG4 1080p streams was stuttering. Normal meaning some 6-7 Mbps streams, mainly from DVB sources (TS) and not very lossy video files in the range of 2-4Mbps.
Details here:
https://forum.kodi.tv/showthread.php?tid=341002
The same goes for the official LibreELEC builds, which I constantly downloaded & loaded & tried up until 9.2.3. LibreELEC 9.2.4 (Kodi 18.8) finally plays everything smoothly and I went on investigating the changes on github (commits). Stumbled upon this:
https://github.com/LibreELEC/LibreELEC.t...d0ae3b27ed
And learned that it was the Raspberry provided mesa libs that were causing the issue. (BTW, thanks @HiassofT for finding this out!).
I'm using a stable version of ARM Linux, built soft float (for compatibility reasons), with an older mesa-11.2.2 that I had to rebuild to enable the vc4 driver. I considered building an actual mesa (20.x), but rebuilding all its dependencies (newer versions of the libs) is something I wouldn't be very happy with on these little Raspberry devices, it'll take ages.
I built ffmpeg externally (shared), linked to the Raspberry userland (/opt/vc) for OMX&MMAL and commenced building Kodi 18.8 the way LibreELEC folks are doing now for the Raspberry target, using the system default mesa drivers, with the build directives: -DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gles
This is how I started the Kodi 18.8 compilation for the PiZero - armv6 target:
- first I had to adapt (softfloat) the cmake/scripts/linux/ArchSetup.cmake
set(NEON_FLAGS "-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=soft -mfpu=vfp")
- then:
This is how the compilation crashed:
And this is one of the relevant commits I found on google. The "improvement":
https://github.com/xbmc/xbmc/pull/14772
Wondering now how or if I'd be able to disable all this debugging stuff. Or, maybe I don't even need EGL on Raspberry (VDPAU & VAAPI are anyways disabled) and could provide a cmake directive to ditch it (don't know how).
Any help appreciated.
Just a little background first, I was unable to use my own compilations of Kodi 18 on PiZero and Pi2B because the video playback on normal MPEG4 1080p streams was stuttering. Normal meaning some 6-7 Mbps streams, mainly from DVB sources (TS) and not very lossy video files in the range of 2-4Mbps.
Details here:
https://forum.kodi.tv/showthread.php?tid=341002
The same goes for the official LibreELEC builds, which I constantly downloaded & loaded & tried up until 9.2.3. LibreELEC 9.2.4 (Kodi 18.8) finally plays everything smoothly and I went on investigating the changes on github (commits). Stumbled upon this:
https://github.com/LibreELEC/LibreELEC.t...d0ae3b27ed
And learned that it was the Raspberry provided mesa libs that were causing the issue. (BTW, thanks @HiassofT for finding this out!).
I'm using a stable version of ARM Linux, built soft float (for compatibility reasons), with an older mesa-11.2.2 that I had to rebuild to enable the vc4 driver. I considered building an actual mesa (20.x), but rebuilding all its dependencies (newer versions of the libs) is something I wouldn't be very happy with on these little Raspberry devices, it'll take ages.
I built ffmpeg externally (shared), linked to the Raspberry userland (/opt/vc) for OMX&MMAL and commenced building Kodi 18.8 the way LibreELEC folks are doing now for the Raspberry target, using the system default mesa drivers, with the build directives: -DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gles
This is how I started the Kodi 18.8 compilation for the PiZero - armv6 target:
- first I had to adapt (softfloat) the cmake/scripts/linux/ArchSetup.cmake
set(NEON_FLAGS "-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=soft -mfpu=vfp")
- then:
Code:
CFLAGS="$CFLAGS -DEGL_NO_X11"
CXXFLAGS="$CXXFLAGS -DEGL_NO_X11"
cmake ../xbmc-18.8-Leia -DCMAKE_INSTALL_PREFIX=/usr/local \
-DENABLE_INTERNAL_CROSSGUID=ON \
-DENABLE_INTERNAL_FLATBUFFERS=ON \
-DENABLE_INTERNAL_FMT=ON \
-DCORE_SYSTEM_NAME=linux \
-DWITH_CPU=arm1176jzf-s \
-DCMAKE_C_FLAGS="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=soft" \
-DCMAKE_CXX_FLAGS="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=soft" \
-DENABLE_AVAHI=OFF \
-DENABLE_PLIST=OFF \
-DENABLE_AIRTUNES=OFF \
-DENABLE_AIRTUNES=OFF \
-DENABLE_UPNP=OFF \
-DENABLE_NEON=OFF \
-DENABLE_VDPAU=OFF \
-DENABLE_VAAPI=OFF \
-DCORE_PLATFORM_NAME=gbm \
-DGBM_RENDER_SYSTEM=gles
# finally, building it on a Pi2B with only 3 make jobs to fit in the 1GB available RAM
nohup cmake --build . -- VERBOSE=1 -j 3 2>&1 | tee kodi-build.log &
This is how the compilation crashed:
Code:
[ 81%] Building CXX object build/cores/VideoPlayer/codecs/audio/CMakeFiles/dvdaudiocodecs.dir/DVDAudioCodecFFmpeg.cpp.o
cd /kit/kodi-slack-build/kodi-build/build/cores/VideoPlayer/codecs/audio && /usr/bin/ccache /usr/bin/c++ -I/kit/kodi-slack-build/xbmc-18.8-Leia -I/kit/kodi-slack-build/xbmc-18.8-Leia/lib -I/kit/kodi-slack-build/xbmc-18.8-Leia/lib/gtest/include -I/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc -I/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/platform/linux -I/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/cores/VideoPlayer -I/kit/kodi-slack-build/kodi-build/build -I/usr/local/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/python2.7 -I/usr/include/samba-4.0 -I/usr/include/libxml2 -I/kit/kodi-slack-build/kodi-build/build/cpluff/include -I/kit/kodi-slack-build/kodi-build/build/include -I/kit/kodi-slack-build/kodi-build/build/cores/RetroPlayer/messages -I/usr/include/freetype2 -I/kit/kodi-slack-build/kodi-build/build/libdvd/include -I/usr/include/lzo -I/usr/include/libdrm -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=soft -std=c++11 -DMESA_EGL_NO_X11_HEADERS -D__GBM__=1 -DPLATFORM_SETTINGS_FILE=gbm.xml -Wall -O3 -DNDEBUG -s -D_LINUX -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE -DHAVE_LINUX_MEMFD=1 -DHAVE_MKOSTEMP=1 -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAS_LINUX_NETWORK -DHAVE_STD__U16_STRING=1 -DHAVE_STD__U32_STRING=1 -DHAVE_CHAR16_T=1 -DHAVE_CHAR32_T=1 -DHAVE_STDINT_H=1 -DHAS_BUILTIN_SYNC_ADD_AND_FETCH=1 -DHAS_BUILTIN_SYNC_SUB_AND_FETCH=1 -DHAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP=1 -DHAVE_INOTIFY=1 -DHAVE_POSIX_FADVISE=1 -DHAVE_LOCALTIME_R=1 -DHAVE_INTTYPES_H=1 -DHAS_ALSA=1 -DHAVE_LIBBLURAY=1 -DHAVE_LIBBLURAY_BDJ=1 -DHAVE_LIBCEC=1 -DHAS_DBUS=1 -DHAVE_LCMS2=1 -DHAS_LIRC=1 -DHAS_WEB_SERVER=1 -DHAS_WEB_INTERFACE=1 -DHAS_PULSEAUDIO=1 -DHAS_PYTHON=1 -DHAS_FILESYSTEM_SMB=1 -DHAVE_LIBUDEV=1 -DHAVE_LIBXSLT=1 -DFFMPEG_VER_SHA=\"4.0\" -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAS_EGL=1 -DHAVE_GBM=1 -DHAS_GLES=3 -DHAS_MYSQL=1 -DHAS_DVD_DRIVE -DHAS_CDDA_RIPPER -DBIN_INSTALL_PATH=\"/usr/local/lib/kodi\" -DINSTALL_PATH=\"/usr/local/share/kodi\" -std=c++11 -o CMakeFiles/dvdaudiocodecs.dir/DVDAudioCodecFFmpeg.cpp.o -c /kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:102:18: error: 'EGL_DEBUG_MSG_CRITICAL_KHR' was not declared in this scope
X(EGL_DEBUG_MSG_CRITICAL_KHR),
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:103:18: error: 'EGL_DEBUG_MSG_ERROR_KHR' was not declared in this scope
X(EGL_DEBUG_MSG_ERROR_KHR),
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:104:18: error: 'EGL_DEBUG_MSG_WARN_KHR' was not declared in this scope
X(EGL_DEBUG_MSG_WARN_KHR),
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:105:18: error: 'EGL_DEBUG_MSG_INFO_KHR' was not declared in this scope
X(EGL_DEBUG_MSG_INFO_KHR),
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:107:1: error: could not convert '{<expression error>, <expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::map<int, const char*>'
};
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:114:79: error: 'EGLLabelKHR' has not been declared
void EglErrorCallback(EGLenum error, const char *command, EGLint messageType, EGLLabelKHR threadLabel, EGLLabelKHR objectLabel, const char* message)
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:114:104: error: 'EGLLabelKHR' has not been declared
void EglErrorCallback(EGLenum error, const char *command, EGLint messageType, EGLLabelKHR threadLabel, EGLLabelKHR objectLabel, const char* message)
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp: In constructor 'CEGLContextUtils::CEGLContextUtils(EGLenum, const string&)':
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:196:69: error: 'PFNEGLDEBUGMESSAGECONTROLKHRPROC' was not declared in this scope
auto eglDebugMessageControl = CEGLUtils::GetRequiredProcAddress<PFNEGLDEBUGMESSAGECONTROLKHRPROC>("eglDebugMessageControlKHR");
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:196:130: error: no matching function for call to 'CEGLUtils::GetRequiredProcAddress(const char [26])'
auto eglDebugMessageControl = CEGLUtils::GetRequiredProcAddress<PFNEGLDEBUGMESSAGECONTROLKHRPROC>("eglDebugMessageControlKHR");
^
In file included from /kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:9:0:
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.h:28:12: note: candidate: template<class T> static T CEGLUtils::GetRequiredProcAddress(const char*)
static T GetRequiredProcAddress(const char * procname)
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.h:28:12: note: template argument deduction/substitution failed:
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:196:130: error: template argument 1 is invalid
auto eglDebugMessageControl = CEGLUtils::GetRequiredProcAddress<PFNEGLDEBUGMESSAGECONTROLKHRPROC>("eglDebugMessageControlKHR");
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:198:36: error: 'EGL_DEBUG_MSG_CRITICAL_KHR' was not declared in this scope
EGLAttrib eglDebugAttribs[] = {EGL_DEBUG_MSG_CRITICAL_KHR, EGL_TRUE,
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:199:36: error: 'EGL_DEBUG_MSG_ERROR_KHR' was not declared in this scope
EGL_DEBUG_MSG_ERROR_KHR, EGL_TRUE,
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:200:36: error: 'EGL_DEBUG_MSG_WARN_KHR' was not declared in this scope
EGL_DEBUG_MSG_WARN_KHR, EGL_TRUE,
^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.cpp:201:36: error: 'EGL_DEBUG_MSG_INFO_KHR' was not declared in this scope
EGL_DEBUG_MSG_INFO_KHR, EGL_TRUE,
^
build/utils/CMakeFiles/utils.dir/build.make:1862: recipe for target 'build/utils/CMakeFiles/utils.dir/EGLUtils.cpp.o' failed
gmake[2]: *** [build/utils/CMakeFiles/utils.dir/EGLUtils.cpp.o] Error 1
gmake[2]: Leaving directory '/kit/kodi-slack-build/kodi-build'
CMakeFiles/Makefile2:8578: recipe for target 'build/utils/CMakeFiles/utils.dir/all' failed
gmake[1]: *** [build/utils/CMakeFiles/utils.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
And this is one of the relevant commits I found on google. The "improvement":
https://github.com/xbmc/xbmc/pull/14772
Wondering now how or if I'd be able to disable all this debugging stuff. Or, maybe I don't even need EGL on Raspberry (VDPAU & VAAPI are anyways disabled) and could provide a cmake directive to ditch it (don't know how).
Any help appreciated.