Kodi Community Forum

Full Version: Error compiling Kodi in Fedora 34 - Python 3.9
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everybody. I am trying to compile Kodi from source under Fedora 34 (x84_64 arquitecture). My system specs are:

Fedora 34
cc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)
cmake version 3.20.5
Python 3.9.6
Linux kernel 5.13.12-200.fc34.x86_64 

I have followed all the instructions from https://github.com/xbmc/xbmc/blob/master...build-kodi, and in the final part of the compilation ([100%] Linking CXX executable kodi-x11), have multiple errors related with the fmt library (I guess) with mutiple undefined reference to "fmt::v6::internal::basic.....". I have checked the installation of the fmt-devel and fmt package, and the location of the libfmt.so  under /usr/lib64 directory. The development libraries are located under /usr/include/fmt directory.
Fmt package version is fmt-7.1.3-3.fc34.x86_64 and fmt-devel-7.1.3-3.fc34.x86_64. The CMakeOutput.log does not show any error.

Than I have tried to install the kodi package from the rpmfusion repository, but crash everytime when install any addon, no matter which (that is the reason why I am trying to compile it from source)

Any help will be appreciated
Thanks in advance
likely not settings the required FMT_SHARED define everywhere. mixing header-only and shared libfmt is not a good idea.
(2021-09-02, 13:37)spiff Wrote: [ -> ]likely not settings the required FMT_SHARED define everywhere. mixing header-only and shared libfmt is not a good idea.

where is it supposed I have to set FMT_SHARED??
(2021-09-02, 13:48)ilpadrino Wrote: [ -> ]
(2021-09-02, 13:37)spiff Wrote: [ -> ]likely not settings the required FMT_SHARED define everywhere. mixing header-only and shared libfmt is not a good idea.

where is it supposed I have to set FMT_SHARED??
I have tried adding:

option (FMT_SHARED "......." ON)

also with:

option (FMT_SHARED "......." OFF)

and also:

neither  option(ENABLE_INTERNAL_FMT "Enable internal fmt?" OFF)  nor  option(ENABLE_INTERNAL_FMT "Enable internal fmt?" ON)


Don't know where I have to set this
(2021-09-02, 17:55)ilpadrino Wrote: [ -> ]Don't know where I have to set this

AIUI, you have to specify it as part of your cmake configuration line.  eg cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_INTERNAL_FMT=ON
(2021-09-02, 18:55)black_eagle Wrote: [ -> ]
(2021-09-02, 17:55)ilpadrino Wrote: [ -> ]Don't know where I have to set this

AIUI, you have to specify it as part of your cmake configuration line.  eg cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_INTERNAL_FMT=ON
Thanks....working now Smile
FMT_SHARED is a c preprocessor token, not a cmake setting. It is used by libfmt to control which methods it will build into compile units including fmt.h. likely the fedora cmake config files for libfmt is the culprit. That being said it is all fine to use internal libfmt to workaround the issue.