Compilation xbmc in linux

Hello,
I try to compile xmbc into ubuntu linux. I miss several variable into /usr/include/EGL/eglext.h.
I don’t see how to go about :sleepy:

If someone has an idea ? Should we put more debian? did I forget an option in the compilation?

Explicites errors:
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:102:5: error: ‘EGL_DEBUG_MSG_CRITICAL_KHR’ was not declared in this scope
X(EGL_DEBUG_MSG_CRITICAL_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’
#define X(VAL) std::make_pair(VAL, #VAL)
^~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:102:5: note: suggested alternative: ‘EGL_BITMAP_PITCH_KHR’
X(EGL_DEBUG_MSG_CRITICAL_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’
#define X(VAL) std::make_pair(VAL, #VAL)
^~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:103:5: error: ‘EGL_DEBUG_MSG_ERROR_KHR’ was not declared in this scope
X(EGL_DEBUG_MSG_ERROR_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’
#define X(VAL) std::make_pair(VAL, #VAL)
^~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:103:5: note: suggested alternative: ‘EGL_BAD_STREAM_KHR’
X(EGL_DEBUG_MSG_ERROR_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’
#define X(VAL) std::make_pair(VAL, #VAL)
^~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:104:5: error: ‘EGL_DEBUG_MSG_WARN_KHR’ was not declared in this scope
X(EGL_DEBUG_MSG_WARN_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’
#define X(VAL) std::make_pair(VAL, #VAL)
^~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:104:5: note: suggested alternative: ‘EGL_BAD_STATE_KHR’
X(EGL_DEBUG_MSG_WARN_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’
#define X(VAL) std::make_pair(VAL, #VAL)
^~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:105:5: error: ‘EGL_DEBUG_MSG_INFO_KHR’ was not declared in this scope
X(EGL_DEBUG_MSG_INFO_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’
#define X(VAL) std::make_pair(VAL, #VAL)
^~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:105:5: note: suggested alternative: ‘EGL_LOCK_USAGE_HINT_KHR’
X(EGL_DEBUG_MSG_INFO_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’
#define X(VAL) std::make_pair(VAL, #VAL)
^~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:107:1: error: could not convert ‘{, , , }’ from ‘’ to ‘std::map<int, const char*>’
};
^
/home/khadas/xbmc/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)
^~~~~~~~~~~
/home/khadas/xbmc/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)
^~~~~~~~~~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp: In constructor ‘CEGLContextUtils::CEGLContextUtils(EGLenum, const string&)’:
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:192:69: error: ‘PFNEGLDEBUGMESSAGECONTROLKHRPROC’ was not declared in this scope
auto eglDebugMessageControl = CEGLUtils::GetRequiredProcAddress(“eglDebugMessageControlKHR”);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:192:69: note: suggested alternative: ‘PFNEGLSETDAMAGEREGIONKHRPROC’
auto eglDebugMessageControl = CEGLUtils::GetRequiredProcAddress(“eglDebugMessageControlKHR”);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PFNEGLSETDAMAGEREGIONKHRPROC
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:192:130: error: no matching function for call to ‘CEGLUtils::GetRequiredProcAddress< >(const char [26])’
auto eglDebugMessageControl = CEGLUtils::GetRequiredProcAddress(“eglDebugMessageControlKHR”);
^
In file included from /home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:9:0:
/home/khadas/xbmc/xbmc/utils/EGLUtils.h:28:12: note: candidate: template static T CEGLUtils::GetRequiredProcAddress(const char*)
static T GetRequiredProcAddress(const char * procname)
^~~~~~~~~~~~~~~~~~~~~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.h:28:12: note: template argument deduction/substitution failed:
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:192:130: error: template argument 1 is invalid
auto eglDebugMessageControl = CEGLUtils::GetRequiredProcAddress(“eglDebugMessageControlKHR”);
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:194:36: error: ‘EGL_DEBUG_MSG_CRITICAL_KHR’ was not declared in this scope
EGLAttrib eglDebugAttribs[] = {EGL_DEBUG_MSG_CRITICAL_KHR, EGL_TRUE,
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:194:36: note: suggested alternative: ‘EGL_BITMAP_PITCH_KHR’
EGLAttrib eglDebugAttribs[] = {EGL_DEBUG_MSG_CRITICAL_KHR, EGL_TRUE,
^~~~~~~~~~~~~~~~~~~~~~~~~~
EGL_BITMAP_PITCH_KHR
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:195:36: error: ‘EGL_DEBUG_MSG_ERROR_KHR’ was not declared in this scope
EGL_DEBUG_MSG_ERROR_KHR, EGL_TRUE,
^~~~~~~~~~~~~~~~~~~~~~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:195:36: note: suggested alternative: ‘EGL_BAD_STREAM_KHR’
EGL_DEBUG_MSG_ERROR_KHR, EGL_TRUE,
^~~~~~~~~~~~~~~~~~~~~~~
EGL_BAD_STREAM_KHR
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:196:36: error: ‘EGL_DEBUG_MSG_WARN_KHR’ was not declared in this scope
EGL_DEBUG_MSG_WARN_KHR, EGL_TRUE,
^~~~~~~~~~~~~~~~~~~~~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:196:36: note: suggested alternative: ‘EGL_BAD_STATE_KHR’
EGL_DEBUG_MSG_WARN_KHR, EGL_TRUE,
^~~~~~~~~~~~~~~~~~~~~~
EGL_BAD_STATE_KHR
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:197:36: error: ‘EGL_DEBUG_MSG_INFO_KHR’ was not declared in this scope
EGL_DEBUG_MSG_INFO_KHR, EGL_TRUE,
^~~~~~~~~~~~~~~~~~~~~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:197:36: note: suggested alternative: ‘EGL_LOCK_USAGE_HINT_KHR’
EGL_DEBUG_MSG_INFO_KHR, EGL_TRUE,
^~~~~~~~~~~~~~~~~~~~~~
EGL_LOCK_USAGE_HINT_KHR
build/utils/CMakeFiles/utils.dir/build.make:1862: recipe for target ‘build/utils/CMakeFiles/utils.dir/EGLUtils.cpp.o’ failed

I forget. I installed linux-gpu-mali-fbdev_0.9-r12p0_arm64.deb

No debian is the last option as it doesn’t get updated frequently.

How will we know which options you have used. I think you have egl enabled while your distro is not able to compile it.

There can be many options to look into. I have tried around more than 10 times to build it today as some of the deps are missing.

I will try again tomorrow or day after as I am testing hardware decoding for rockchip rk3399.

It would be better to ask in kodi forum to get a faster response.

I have a working kodi with panfrost support but its hw acc for vim3 while vim3 can still handle sw acc due to its powerful cpu.
Here is my pkgbuild which works fine on manjaro.
kodi

Follow the configs from there and see if it compiled. Make sure you have all the deps.

2 Likes

Thanks you for your fast response.
I use "cmake -DX11_RENDER_SYSTEM=gles -DENABLE_VDPAU=OFF -DENABLE_VAAPI=OFF ".
The system detect "-- Found EGL: /usr/lib/aarch64-linux-gnu/libEGL.so (found version “0.99”) ".

If I compare with my previous version on nvidia Jetson card. The /usr/include/EGL/eglext.h had debug section and others functions.

I see tomorrow your solution.

Hello,
I’ve put it to compile using the same pkgbuild i shared above but with gbm enabled.

Its building and I hope it doesn’t fail.

Let’s see.

Hello,

I tried “ubuntu test image” and the compilation work :slight_smile:. But don’t run.

When I run kodi-x11, I have
libEGL warning: DRI2: failed to authenticate
ERROR: Unable to create GUI. Exiting

and in dmesg, I have :
[16832.162157] fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[16832.169471] fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[16832.175935] fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[16832.182824] fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0

I think that I don’t compile with bad parameter Audio.

Have you tried kodi instead kodi-x11

And these errors are common.

I understood my stupidity I compiled with the mesa driver and not mali driver :frowning:

Oh ok.

Mine build fine but failed to load as I think I used the wrong ffmpeg so will have to give it another try tomorrow.

[Spikerguy] do you had success to compile xmbc?

In ubuntu image bionic 4.9.206, I had a same error :x

Yes I was able to compile it just fine with both gbm and x11 separately.

But gbm one failed to start as I was trying to use custom ffmpeg I will try to build it again soon but just waiting for 5.8-rc update so I dont have to maintain vdec patch manually.

What is the error post it here .

In fact I can’t compile kodi-x11 :expressionless: like you told me earlier

And I don’t know create package via PKGBUILD :sleepy: The documentation say “use makepkg” but there not makepkg.

I think I don’t have the right methodology

I try this:
export _codename=Leia

export _libdvdcss_version=“1.4.2-$_codename-Beta-5”
export _libdvdnav_version=“6.0.0-$_codename-Alpha-3”
export _libdvdread_version=“6.0.0-$_codename-Alpha-3”
export _ffmpeg_version=“4.0.4-$_codename-18.4”
export _fmt_version=“5.1.0”
export _crossguid_version=“8f399e8bd4”
export _fstrcmp_version=“0.7.D001”
export _flatbuffers_version=“1.9.0”
export srcdir=/home/khadas/xbmc

export pkgbase=kodi
export pkgver=18.6

curl -L -o $pkgbase-$pkgver-$_codename.tar.gz https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz
curl -L -o $pkgbase-libdvdcss-$_libdvdcss_version.tar.gz https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_version.tar.gz
curl -L -o $pkgbase-libdvdnav-$_libdvdnav_version.tar.gz https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_version.tar.gz
curl -L -o $pkgbase-libdvdread-$_libdvdread_version.tar.gz https://github.com/xbmc/libdvdread/archive/$_libdvdread_version.tar.gz
curl -L -o $pkgbase-ffmpeg-$_ffmpeg_version.tar.gz https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz
curl -L -o $pkgbase-fmt-$_fmt_version.tar.gz http://mirrors.kodi.tv/build-deps/sources/fmt-$_fmt_version.tar.gz
curl -L -o $pkgbase-crossguid-$_crossguid_version.tar.gz http://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_version.tar.gz
curl -L -o $pkgbase-fstrcmp-$_fstrcmp_version.tar.gz http://mirrors.kodi.tv/build-deps/sources/fstrcmp-$_fstrcmp_version.tar.gz
curl -L -o $pkgbase-flatbuffers-$_flatbuffers_version.tar.gz http://mirrors.kodi.tv/build-deps/sources/flatbuffers-$_flatbuffers_version.tar.gz

mkdir “$srcdir/kodi-build-x11”
cd “$srcdir/kodi-build-x11”
cmake -DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_INSTALL_LIBDIR=/usr/lib
-DENABLE_EVENTCLIENTS=ON
-DENABLE_INTERNAL_FFMPEG=OFF
-DENABLE_INTERNAL_CROSSGUID=ON
-DENABLE_INTERNAL_FSTRCMP=ON
-DENABLE_INTERNAL_FLATBUFFERS=ON
-DWITH_FFMPEG=SHARED
-DENABLE_GL=OFF
-DENABLE_GLES=ON
-DENABLE_VAAPI=OFF
-DENABLE_VDPAU=OFF
-Dlibdvdcss_URL="$srcdir/$pkgbase-libdvdcss-$_libdvdcss_version.tar.gz"
-Dlibdvdnav_URL="$srcdir/$pkgbase-libdvdnav-$_libdvdnav_version.tar.gz"
-Dlibdvdread_URL="$srcdir/$pkgbase-libdvdread-$_libdvdread_version.tar.gz"
-DFFMPEG_URL="$srcdir/$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz"
-DCROSSGUID_URL="$srcdir/$pkgbase-crossguid-$_crossguid_version.tar.gz"
-DFSTRCMP_URL="$srcdir/$pkgbase-fstrcmp-$_fstrcmp_version.tar.gz"
-DFLATBUFFERS_URL="$srcdir/$pkgbase-flatbuffers-$_flatbuffers_version.tar.gz"

but all package compilation bug with ‘file “-I.” not found’

and with cmake -DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_INSTALL_LIBDIR=/usr/lib
-DENABLE_EVENTCLIENTS=ON
-DENABLE_INTERNAL_FFMPEG=OFF
-DWITH_FFMPEG=SHARED
-DENABLE_GL=OFF
-DENABLE_GLES=ON
-DENABLE_VAAPI=OFF
-DENABLE_VDPAU=OFF

Error:
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:102:5: error: ‘EGL_DEBUG_MSG_CRITICAL_KHR’ was not declared in this scope
X(EGL_DEBUG_MSG_CRITICAL_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’
#define X(VAL) std::make_pair(VAL, #VAL)
^~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:102:5: note: suggested alternative: ‘EGL_BITMAP_PITCH_KHR’
X(EGL_DEBUG_MSG_CRITICAL_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’
#define X(VAL) std::make_pair(VAL, #VAL)
^~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:103:5: error: ‘EGL_DEBUG_MSG_ERROR_KHR’ was not declared in this scope
X(EGL_DEBUG_MSG_ERROR_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’
#define X(VAL) std::make_pair(VAL, #VAL)
^~~
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:103:5: note: suggested alternative: ‘EGL_BAD_STREAM_KHR’
X(EGL_DEBUG_MSG_ERROR_KHR),
^
/home/khadas/xbmc/xbmc/utils/EGLUtils.cpp:38:31: note: in definition of macro ‘X’

Whatever happens I come across EGL_PLATFORM_X11_EXT.

I tried the gdm platform but I get this error message
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GBM (missing: GBM_INCLUDE_DIR) (found version “17.1.8”)
Call Stack (most recent call first):

I can’t put libgdm-dev, because it conflicts with linux-gpu-mali-fbdev.

If I use the raspberry platform, it does not work because I miss the mmal package.

I don’t see how you did it: x

Currently, Xmbc is my only point blocking Khadas.

Which distro? Try Manjaro and it is pre built. You just have to install it.

I use the https://dl.khadas.com/Firmware/VIM3/Ubuntu/EMMC/VIM3_Ubuntu-xfce-bionic_Linux-4.9_arm64_EMMC_V20191231.7z.

I make a test with movies into cloud :slight_smile:

Last I remember Khadas used to ship kodi with their 4.9kernel DE images.

Try Manjaro I have released latest images which is 20.06.

Will need Android in emmc for sd card to boot into Manjaro.

I’m going to watch Manjaro.
I need access to the nvme and the NPU: p

You can have nvme support on Manjaro but no idea about NPU.
You can build arch packages from AUR and use it on Manjaro as arch have the largest packages of all the distros available.