-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Description
Bug report
Describe the bug
Here is a clear and concise description of what the problem is:
I follow the documentation guide on building Kodi (including the prep section for my distro), but the build fails due to a missing file (mariadb/mysql.h).
Expected Behavior
Here is a clear and concise description of what was expected to happen:
I should get a build of Kodi that I would then install.
Actual Behavior
I do not get a build of Kodi since the process aborts due to the error.
Possible Fix
I got it to work by tweaking 2 files:
/kodi/xbmc/dbwrappers/mysqldataset.h
#include <mariadb/mysql.h>
became
#include <mysql.h>
/kodi/xbmc/dbwrappers/mysqldataset.cpp
#include <mariadb/errmsg.h>
became
#include <errmsg.h>
@neo1973 pointed out the issue is related to how mariadb is handled in Fedora. I don´t know how one would make the code distro-agnostic to avoid this problem.
To Reproduce
Steps to reproduce the behavior:
-
I follow the build guide all the way to section 4
-
I prepare the task with this command:
cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=wayland -DAPP_RENDER_SYSTEM=gl -DENABLE_INTERNAL_FFMPEG=ON
- I start the build with this command:
cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN)
Debuglog
The debuglog can be found here:
[ 66%] Building CXX object build/dbwrappers/CMakeFiles/dbwrappers.dir/mysqldataset.cpp.o
cd /home/myusername/kodi-build/build/dbwrappers && /usr/bin/ccache /usr/bin/c++ -DCMS_NO_REGISTER_KEYWORD -DEXV_LOCALEDIR=\"../share/locale\" -DFFMPEG_VER_SHA=8.0.1 -DFMT_SHARED -DHAS_AIRPLAY -DHAS_AIRTUNES -DHAS_ALSA -DHAS_AVAHI -DHAS_DBUS -DHAS_EGL -DHAS_FILESYSTEM_NFS -DHAS_FILESYSTEM_SMB -DHAS_GL -DHAS_ISO9660PP -DHAS_LIRC -DHAS_MARIADB -DHAS_PULSEAUDIO -DHAS_PYTHON -DHAS_UDFREAD -DHAS_WEB_INTERFACE -DHAS_WEB_SERVER -DHAS_ZEROCONF -DHAVE_DRM_MODIFIER_NAME -DHAVE_EGLEXTANGLE -DHAVE_HDR_OUTPUT_METADATA -DHAVE_LCMS2 -DHAVE_LIBBLUETOOTH -DHAVE_LIBBLURAY -DHAVE_LIBBLURAY_BDJ -DHAVE_LIBCAP -DHAVE_LIBCEC -DHAVE_LIBPOSTPROC -DHAVE_LIBUDEV -DHAVE_LIBVA -DHAVE_LIBXSLT -DHAVE_NEW_CROSSGUID -DHAVE_WAYLAND -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -DTINYXML2_IMPORT -D_FILE_OFFSET_BITS=64 -I/home/myusername/kodi-build -I/home/myusername/kodi/xbmc -I/home/myusername/kodi/xbmc/platform/linux -I/home/myusername/kodi/xbmc/cores/VideoPlayer -I/home/myusername/kodi-build/build -I/home/myusername/kodi/xbmc/platform/posix -isystem /home/myusername/kodi-build/build/include -isystem /usr/include/libxml2 -isystem /usr/include/fribidi -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/harfbuzz -isystem /usr/include/glib-2.0 -isystem /usr/lib64/glib-2.0/include -isystem /usr/include/sysprof-6 -isystem /usr/include/uuid -isystem /home/myusername/kodi-build/build/cores/RetroPlayer/messages -isystem /usr/include/lzo -isystem /usr/include/taglib -isystem /usr/include/libdrm -isystem /usr/lib64/pkgconfig/../../include/dbus-1.0 -isystem /usr/lib64/pkgconfig/../../lib64/dbus-1.0/include -isystem /usr/include/libcec -isystem /usr/include/p11-kit-1 -isystem /usr/include/python3.14 -isystem /usr/include/samba-4.0 -isystem /usr/include/mysql -Wall -Wdouble-promotion -Wmissing-field-initializers -Wsign-compare -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -std=c++20 -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE -DHAVE_LINUX_UDMABUF=1 -DHAVE_LINUX_DMA_HEAP=1 -DHAVE_LINUX_DMA_BUF=1 -DHAVE_MKOSTEMP=1 -DHAVE_GETMNTENT_R=1 -DHAVE_LINUX_MEMFD=1 -DHAVE_STATX=1 -DHAVE_SSE=1 -DHAVE_SSE2=1 -DHAVE_SSE3=1 -DHAVE_SSSE3=1 -DHAVE_SSE4_1=1 -D__STDC_CONSTANT_MACROS -D_FILE_OFFSET_BITS=64 -DHAS_POSIX_NETWORK -DHAS_LINUX_NETWORK -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_GMTIME_R=1 -DHAVE_INTTYPES_H=1 -DHAS_UPNP=1 -DHAS_OPTICAL_DRIVE -DHAS_CDDA_RIPPER -DBIN_INSTALL_PATH=\"/usr/local/lib64/kodi\" -DINSTALL_PATH=\"/usr/local/share/kodi\" -Werror=double-promotion -Werror=missing-field-initializers -Werror=sign-compare -DWITH_GZFILEOP -pthread -D_REENTRANT -MD -MT build/dbwrappers/CMakeFiles/dbwrappers.dir/mysqldataset.cpp.o -MF CMakeFiles/dbwrappers.dir/mysqldataset.cpp.o.d -o CMakeFiles/dbwrappers.dir/mysqldataset.cpp.o -c /home/myusername/kodi/xbmc/dbwrappers/mysqldataset.cpp
In file included from /home/myusername/kodi/xbmc/dbwrappers/Database.cpp:16:
/home/myusername/kodi/xbmc/dbwrappers/mysqldataset.h:18:10: fatal error: mariadb/mysql.h: No such file or directory
18 | #include <mariadb/mysql.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [build/dbwrappers/CMakeFiles/dbwrappers.dir/build.make:79: build/dbwrappers/CMakeFiles/dbwrappers.dir/Database.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
/usr/bin/gmake -f build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/build.make build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/depend
gmake[2]: Entering directory '/home/myusername/kodi-build'
cd /home/myusername/kodi-build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/myusername/kodi /home/myusername/kodi/xbmc/guilib/listproviders /home/myusername/kodi-build /home/myusername/kodi-build/build/guilib_listproviders /home/myusername/kodi-build/build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/DependInfo.cmake "--color="
Dependencies file "build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/DirectoryProvider.cpp.o.d" is newer than depends file "/home/myusername/kodi-build/build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/compiler_depend.internal".
Dependencies file "build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/IListProvider.cpp.o.d" is newer than depends file "/home/myusername/kodi-build/build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/compiler_depend.internal".
Dependencies file "build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/MultiProvider.cpp.o.d" is newer than depends file "/home/myusername/kodi-build/build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/compiler_depend.internal".
Dependencies file "build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/StaticProvider.cpp.o.d" is newer than depends file "/home/myusername/kodi-build/build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target guilib_listproviders
gmake[2]: Leaving directory '/home/myusername/kodi-build'
/usr/bin/gmake -f build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/build.make build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/build
gmake[2]: Entering directory '/home/myusername/kodi-build'
[ 66%] Building CXX object build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/DirectoryProvider.cpp.o
cd /home/myusername/kodi-build/build/guilib_listproviders && /usr/bin/ccache /usr/bin/c++ -DCMS_NO_REGISTER_KEYWORD -DEXV_LOCALEDIR=\"../share/locale\" -DFFMPEG_VER_SHA=8.0.1 -DFMT_SHARED -DHAS_AIRPLAY -DHAS_AIRTUNES -DHAS_ALSA -DHAS_AVAHI -DHAS_DBUS -DHAS_EGL -DHAS_FILESYSTEM_NFS -DHAS_FILESYSTEM_SMB -DHAS_GL -DHAS_ISO9660PP -DHAS_LIRC -DHAS_MARIADB -DHAS_PULSEAUDIO -DHAS_PYTHON -DHAS_UDFREAD -DHAS_WEB_INTERFACE -DHAS_WEB_SERVER -DHAS_ZEROCONF -DHAVE_DRM_MODIFIER_NAME -DHAVE_EGLEXTANGLE -DHAVE_HDR_OUTPUT_METADATA -DHAVE_LCMS2 -DHAVE_LIBBLUETOOTH -DHAVE_LIBBLURAY -DHAVE_LIBBLURAY_BDJ -DHAVE_LIBCAP -DHAVE_LIBCEC -DHAVE_LIBPOSTPROC -DHAVE_LIBUDEV -DHAVE_LIBVA -DHAVE_LIBXSLT -DHAVE_NEW_CROSSGUID -DHAVE_WAYLAND -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -DTINYXML2_IMPORT -D_FILE_OFFSET_BITS=64 -I/home/myusername/kodi-build -I/home/myusername/kodi/xbmc -I/home/myusername/kodi/xbmc/platform/linux -I/home/myusername/kodi/xbmc/cores/VideoPlayer -I/home/myusername/kodi-build/build -I/home/myusername/kodi/xbmc/platform/posix -isystem /home/myusername/kodi-build/build/include -isystem /usr/include/libxml2 -isystem /usr/include/fribidi -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/harfbuzz -isystem /usr/include/glib-2.0 -isystem /usr/lib64/glib-2.0/include -isystem /usr/include/sysprof-6 -isystem /usr/include/uuid -isystem /home/myusername/kodi-build/build/cores/RetroPlayer/messages -isystem /usr/include/lzo -isystem /usr/include/taglib -isystem /usr/include/libdrm -isystem /usr/lib64/pkgconfig/../../include/dbus-1.0 -isystem /usr/lib64/pkgconfig/../../lib64/dbus-1.0/include -isystem /usr/include/libcec -isystem /usr/include/p11-kit-1 -isystem /usr/include/python3.14 -isystem /usr/include/samba-4.0 -isystem /usr/include/mysql -Wall -Wdouble-promotion -Wmissing-field-initializers -Wsign-compare -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -std=c++20 -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE -DHAVE_LINUX_UDMABUF=1 -DHAVE_LINUX_DMA_HEAP=1 -DHAVE_LINUX_DMA_BUF=1 -DHAVE_MKOSTEMP=1 -DHAVE_GETMNTENT_R=1 -DHAVE_LINUX_MEMFD=1 -DHAVE_STATX=1 -DHAVE_SSE=1 -DHAVE_SSE2=1 -DHAVE_SSE3=1 -DHAVE_SSSE3=1 -DHAVE_SSE4_1=1 -D__STDC_CONSTANT_MACROS -D_FILE_OFFSET_BITS=64 -DHAS_POSIX_NETWORK -DHAS_LINUX_NETWORK -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_GMTIME_R=1 -DHAVE_INTTYPES_H=1 -DHAS_UPNP=1 -DHAS_OPTICAL_DRIVE -DHAS_CDDA_RIPPER -DBIN_INSTALL_PATH=\"/usr/local/lib64/kodi\" -DINSTALL_PATH=\"/usr/local/share/kodi\" -Werror=double-promotion -Werror=missing-field-initializers -Werror=sign-compare -DWITH_GZFILEOP -pthread -D_REENTRANT -MD -MT build/guilib_listproviders/CMakeFiles/guilib_listproviders.dir/DirectoryProvider.cpp.o -MF CMakeFiles/guilib_listproviders.dir/DirectoryProvider.cpp.o.d -o CMakeFiles/guilib_listproviders.dir/DirectoryProvider.cpp.o -c /home/myusername/kodi/xbmc/guilib/listproviders/DirectoryProvider.cpp
In file included from /home/myusername/kodi/xbmc/dbwrappers/mysqldataset.cpp:9:
/home/myusername/kodi/xbmc/dbwrappers/mysqldataset.h:18:10: fatal error: mariadb/mysql.h: No such file or directory
18 | #include <mariadb/mysql.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [build/dbwrappers/CMakeFiles/dbwrappers.dir/build.make:149: build/dbwrappers/CMakeFiles/dbwrappers.dir/mysqldataset.cpp.o] Error 1
[SOME MORE JOBS CONCLUDE SUCCESSFULLY HERE, TRUNCATED BECAUSE IT'S A HUGE WALL OF TEXT]
gmake[2]: Leaving directory '/home/myusername/kodi-build'
[ 66%] Built target guilib_listproviders
gmake[1]: Leaving directory '/home/myusername/kodi-build'
gmake: *** [Makefile:146: all] Error 2
Screenshots
n.a.
Additional context or screenshots (if appropriate)
n.a.
Your Environment
Used Operating system:
- Android
- iOS
- tvOS
- Linux
- macOS
- Windows
- Windows UWP
- Operating system version/name: Nobara 43 (Kernel Version: 6.18.3-201.nobara.fc43.x86_64 (64-bit))
- Kodi version: I don´t actually know? I'm running the build guide so I assume it's pulling the latest stable version?
There's a text in the git clone directory called "version.txt" in which the following data is listed:
VERSION_MAJOR 22 VERSION_MINOR 0 VERSION_TAG ALPHA2 VERSION_CODE 21.90.702 ADDON_API 21.90.702