Solved Build errors related to EGL_DEBUG_MSG_WARN_KHR
#1
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:
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.
Reply
#2
According to this external thread:
https://forum.khadas.com/t/compilation-x...ux/8485/19
Adding -DENABLE_GL=OFF to cmake won't be of any help.

P.S. Still, tried adding it just for fun:

CMake Warning:
  Manually-specified variables were not used by the project:

    ENABLE_GL
Reply
#3
For longer listings, please use pastebin websites.
Thx in advance.
Reply
#4
After reading the Kodi Devs replies from here:
https://forum.kodi.tv/showthread.php?tid...id=2957594
It looks like one of my options is to revert https://github.com/xbmc/xbmc/pull/14772
Sad

@Klojum 
I'm doing it if the listing is longer than a page. The build log errors snippet from my original post is pretty short and contains only the relevant details.
Reply
#5
Just took the latest 1.5 header files egl.h & eglext.h  from here:
https://www.khronos.org/registry/EGL/
And planted them (backed up & overwritten) in /usr/include/GLES/
Not sure if I broke mesa by doing this ...

Instead, I was considering to actually break Kodi - better than the system Smile
Will I break something if I just remove the following snippet from /xbmc-18.8-Leia/xbmc/utils/CMakeLists.txt ?
Code:
if(EGL_FOUND)
  list(APPEND SOURCES EGLUtils.cpp
                      EGLFence.cpp)
  list(APPEND HEADERS EGLUtils.h
                      EGLFence.h)
endif()
Reply
#6
Same result with the latest 1.5 header files egl.h & eglext.h from https://www.khronos.org/registry/EGL/ made available in /usr/include/GLES/

Code:
[ 81%] Building CXX object build/utils/CMakeFiles/utils.dir/EGLUtils.cpp.o
cd /kit/kodi-slack-build/kodi-build/build/utils && /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/utils.dir/EGLUtils.cpp.o -c /kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLUtils.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]: *** Waiting for unfinished jobs....
Reply
#7
With the following commented:
Code:
if(EGL_FOUND)
  list(APPEND SOURCES EGLUtils.cpp
                      EGLFence.cpp)
  list(APPEND HEADERS EGLUtils.h
                      EGLFence.h)
endif()
from /xbmc-18.8-Leia/xbmc/utils/CMakeLists.txt

It crashed in /xbmc/utils/EGLImage.cpp with some DRM_FORMAT_MOD_INVALID
Code:
[ 81%] Building CXX object build/utils/CMakeFiles/utils.dir/EGLImage.cpp.o
cd /kit/kodi-slack-build/kodi-build/build/utils && /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/utils.dir/EGLImage.cpp.o -c /kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLImage.cpp
In file included from /kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLImage.cpp:9:0:
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLImage.h:29:23: error: 'DRM_FORMAT_MOD_INVALID' was not declared in this scope
     uint64_t modifier{DRM_FORMAT_MOD_INVALID};
                       ^
/kit/kodi-slack-build/xbmc-18.8-Leia/xbmc/utils/EGLImage.h:29:45: error: cannot convert '<brace-enclosed initializer list>' to 'uint64_t {aka long long unsigned int}' in initialization
     uint64_t modifier{DRM_FORMAT_MOD_INVALID};
                                             ^
build/utils/CMakeFiles/utils.dir/build.make:1886: recipe for target 'build/utils/CMakeFiles/utils.dir/EGLImage.cpp.o' failed
gmake[2]: *** [build/utils/CMakeFiles/utils.dir/EGLImage.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....

I guess I'll stick with Kodi 17.x on the PiZero
Reply
#8
I think kodi 18 on Pi0/Pi1 is a dead end. The removal of omxplayer and the switch to arm side GL drivers is just too much for its limited cpu and memory.
HiassofT has built it for Pi1 but the it was sluggish in gui and 1080p video playback fell behind when subtitles or OSD were used.

Pi0/Pi1 users are recommended to stick with kodi 17.

Pi2/Pi3/Pi4 have a lot more cpu and memory and should be fine.
Reply
#9
Given the positive experience with LibreELEC 9.2.4 (Kodi 18.8) on PiZero with the Generic Buffer Management instead of the Raspberry provided mesa libs (/opt/vc userland),  and my observations that it runs perfectly fine, the same performance as with Kodi 17 for both playback and GUI snappiness, I'm confident it's not a dead end, nor a performance issue, but more of a buffering problem between the Kodi 18.x code and the Raspberry provided mesa libs (/opt/vc userland). Worth mentioning that before noticing the commit:
https://github.com/LibreELEC/LibreELEC.t...d0ae3b27ed
I tried all possible solutions, recompiling FFmpeg (many, many times), using the latest firmware, userland and kernel (Raspberry provided) and ... read all the Kodi commits between 18.6 and 18.8, trying to identify the "improvement".
Conclusion: maybe it's worth fixing the Raspberry userland (vc4 driver). Meanwhile, I'm about to rebuild an actual version of mesa (20.x) and use it for the Kodi18.8 compilation, provide the PiZero boards a few more years of Kodi support. They're a perfect fit for my multimedia needs, that's H264 1080p content. H265 & 4K are still exceptions, not to mention that on DVB (cable & satellites), the majority of channels are still SD (with some intermediate 720p resolutions).
I stopped the mesa 20.x rebuild when I noticed that rebuilding libclc requires a new version of llvm and tried to use the available mesa 11.2.2. But then, I didn't foresee the issues I've stumbled upon, detailed in this thread.

BTW, this is a recent Kodi 18.8 (own compilation - linked against /opt/vc) debug log, playing with omxplayer a remote (FTP) very lossy MPEG4 H264 video and stuttering. It starts fine for the first 2 seconds and then it starts to drop both video & audio and the displayed framerate drops to 8,5 fps. The same happens with the VideoPlayer (MMAL).
https://pastebin.com/cmbErrAa
Again, LibreELEC 9.2.4 (Kodi 18.8) using the Generic Buffer Management does the job just fine.

I read the commits & comments (yours) related to the drop of omxplayer in 19.x and I must admit, it's a sad development. OMX (player) is way more efficient compared to the default VideoPlayer with MMAL acceleration for the Raspberry boards. Furthermore, the default VideoPlayer (with MMAL) is useless on both PiZero & Pi2B, because of the constant audio pitch changes (speeding up and slowing down) while playing DVB Full HD streams, on both internal audio & external USB audio (before, I only thought it applies to the external USB devices due to some bus clock sync issues, but it's apparent also on the internal audio), regardless of the settings (Kodi - Settings - pitch correction). And that applies to LibreELEC too, all versions I tried, including LibreELEC 9.2.4. On the Pi2B (being a little more powerful), these pitch changes are not that evident, but noticeable when playing some classic music DVB video stream (symphony) that contains violins (you get an uauuauuauu effect).
Reply
#10
I'll set this thread on resolved. It's my problem, not Kodi's. Kodi 18.x apparently requires a recent mesa - 20.x releases. I'll rebuild a new mesa on my system and use the Generic Buffer Management API for the Kodi 18.8 compilation.
Reply
#11
LE 9.x with kodi 18 doesn't use gbm on RPi0-3, only RPi4 uses gbm with a hack to combine it with mmal video decoding/rendering. RPi0-3 still use the proprietary EGL driver and MMAL(/OMX decoding.

Only LE 10 with kodi 19 has switched to gbm and v4l2 decoding for all RPis - and RPi0/1 doesn't look too good with that.

so long,

Hias
Reply
#12
(2020-09-23, 21:53)abga Wrote: Given the positive experience with LibreELEC 9.2.4 (Kodi 18.8) on PiZero with the Generic Buffer Management instead of the Raspberry provided mesa libs (/opt/vc userland),  and my observations that it runs perfectly fine, the same performance as with Kodi 17 for both playback and GUI snappiness, I'm confident it's not a dead end, nor a performance issue, but more of a buffering problem between the Kodi 18.x code and the Raspberry provided mesa libs (/opt/vc userland).
I'd be interested to hear if you produce a good gbm build that runs on Pi zero.

Quote:Furthermore, the default VideoPlayer (with MMAL) is useless on both PiZero & Pi2B, because of the constant audio pitch changes (speeding up and slowing down) while playing DVB Full HD streams, on both internal audio & external USB audio (before, I only thought it applies to the external USB devices due to some bus clock sync issues, but it's apparent also on the internal audio), regardless of the settings (Kodi - Settings - pitch correction). And that applies to LibreELEC too, all versions I tried, including LibreELEC 9.2.4. On the Pi2B (being a little more powerful), these pitch changes are not that evident, but noticeable when playing some classic music DVB video stream (symphony) that contains violins (you get an uauuauuauu effect).

The audio resampling that causes the wow effect should only occur when "sync playback to display" is enabled. Without that setting I don't see how it could happen.
Reply
#13
@HiassofT 

Is LibreELEC 9.2.4 using a different packages/mediacenter/kodi/package.mk for the Rpi0-Rpi3 targets? Because this commit, that predates the Kodi version bump to 18.8 and the release of LibreELEC 9.2.4 is substituting the -DCORE_PLATFORM_NAME=rbpi with -DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gles:
https://github.com/LibreELEC/LibreELEC.t...d0ae3b27ed
And I'm talking only about the Kodi build, not FFmpeg, which is obviously linked against the libs in /opt/vc
Code:
LibreELEC:~ # cat /etc/os-release
NAME="LibreELEC"
VERSION="9.2.4"
ID="libreelec"
VERSION_ID="9.2"
PRETTY_NAME="LibreELEC (official): 9.2.4"
HOME_URL="https://libreelec.tv"
BUG_REPORT_URL="https://github.com/LibreELEC/LibreELEC.tv"
BUILD_ID="1c135e5303ae599339eea56fd6c253dd81965674"
OPENELEC_ARCH="RPi.arm"
LIBREELEC_ARCH="RPi.arm"
LIBREELEC_BUILD="official"
LIBREELEC_PROJECT="RPi"
LIBREELEC_DEVICE="RPi"
LibreELEC:~ # ldd /usr/lib/kodi/kodi.bin | grep opt
LibreELEC:~ #

@popcornmix 
Apparently LibreELEC 9.2.4 is a good Kodi 18.8 gbm build I'm trying to replicate on my own Linux system.

"sync playback to display" is definitely disabled, otherwise it'll kill the system (high load) and I'm happy to help you replicate the MMAL wow effect. I'm confident you could find yourself one of those  Raspberry merchandised DVB-T2 tuners, hook it on tvheadend, stream a 1080p TS to Kodi (requires the pvr.hts addon) and play it with VideoPlayer - MMAL on a Pi2B.
Reply
#14
The commit to drop the proprietary driver you linked is only in the master branch - which will become LibreELEC 10.

LE 9.2 is built from the libreelec-9.2 branch https://github.com/LibreELEC/LibreELEC.t...reelec-9.2 and doesn't contain the commit.

so long,

Hias
Reply
#15
(2020-09-23, 23:40)HiassofT Wrote: The commit to drop the proprietary driver you linked is only in the master branch - which will become LibreELEC 10.

LE 9.2 is built from the libreelec-9.2 branch https://github.com/LibreELEC/LibreELEC.t...reelec-9.2 and doesn't contain the commit.

so long,

Hias
Thanks for the clarification! Yet again I got confused by these crappy Javascripts M$ poisoned github with. I'm using some Firefox addons that are disabling JS and I need to always enable the JS per page and reload it, several times. I was confident that I was in the 9.2 branch when noticing that commit and not in the master branch ... whatever M$ touches becomes a disaster. Wink

Well, this means that there's something else I'm missing in my own compilation. Again, LibreELEC 9.2.3 for PiZero, which came with Kodi 18.6 (or 18.7) is unusable - video&audio playback stuttering with both OMX & MMAL. LibreELEC 9.2.4 for PiZero, with Kodi 18.8 works perfectly fine in any use cases.

My own Kodi 18.8 compilation, built similar to what is presented in my original post, but without: -DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gles
Instead with: -DCORE_PLATFORM_NAME=rbpi and -DCMAKE_PREFIX_PATH=/opt/vc links against the libs in /opt/vc
Code:
# ldd /usr/local/lib/kodi/kodi-rbpi | grep opt
        libbrcmGLESv2.so => /opt/vc/lib/libbrcmGLESv2.so (0x74ab1000)
        libbrcmEGL.so => /opt/vc/lib/libbrcmEGL.so (0x74a77000)
        libmmal.so => /opt/vc/lib/libmmal.so (0x74a64000)
        libmmal_core.so => /opt/vc/lib/libmmal_core.so (0x74a46000)
        libmmal_util.so => /opt/vc/lib/libmmal_util.so (0x74a26000)
        libmmal_vc_client.so => /opt/vc/lib/libmmal_vc_client.so (0x74a0b000)
        libmmal_components.so => /opt/vc/lib/libmmal_components.so (0x749f0000)
        libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x749ca000)
        libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0x749b4000)
        libvcos.so => /opt/vc/lib/libvcos.so (0x7499a000)
        libvcsm.so => /opt/vc/lib/libvcsm.so (0x74985000)
        libcontainers.so => /opt/vc/lib/libcontainers.so (0x74974000)
Maybe I need to ditch -DCMAKE_PREFIX_PATH=/opt/vc and rebuild it again. And, maybe I still need to rebuild a new mesa version.
Reply

Logout Mark Read Team Forum Stats Members Help
Build errors related to EGL_DEBUG_MSG_WARN_KHR0