Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Solved Error when building Kodi Omega
#1
Hi,

I have tried to build Kodi according to the instructions (Linux build guide). Unfortunately the script aborts after about 50% with an error message.

Terminal output:
frank@Curie:~/kodi-build$ cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN) 2>&1 >err1.txt
In file included from /home/frank/kodi/xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.cpp:12:
/home/frank/kodi-build/build/cores/RetroPlayer/messages/savestate_generated.h:11:41: error: static assertion failed: Non-compatible flatbuffers version included
   11 | static_assert(FLATBUFFERS_VERSION_MAJOR == 2 &&
      |                                         ^
/home/frank/kodi-build/build/cores/RetroPlayer/messages/savestate_generated.h:11:41: note: the comparison reduces to ‘(23 == 2)’
In file included from /home/frank/kodi-build/build/cores/RetroPlayer/messages/savestate_generated.h:16:
/home/frank/kodi-build/build/cores/RetroPlayer/messages/video_generated.h:11:41: error: static assertion failed: Non-compatible flatbuffers version included
   11 | static_assert(FLATBUFFERS_VERSION_MAJOR == 2 &&
      |                                         ^
/home/frank/kodi-build/build/cores/RetroPlayer/messages/video_generated.h:11:41: note: the comparison reduces to ‘(23 == 2)’
gmake[2]: *** [build/cores/RetroPlayer/savestates/CMakeFiles/retroplayer_savestates.dir/build.make:90: build/cores/RetroPlayer/savestates/CMakeFiles/retroplayer_savestates.dir/SavestateFlatBuffer.cpp.o] Fehler 1
gmake[1]: *** [CMakeFiles/Makefile2:9107: build/cores/RetroPlayer/savestates/CMakeFiles/retroplayer_savestates.dir/all] Fehler 2
gmake[1]: *** Auf noch nicht beendete Prozesse wird gewartet …
gmake: *** [Makefile:146: all] Fehler 2
The hopefully complete logfiles are here: Log1 und Log2
Can anyone here give me hints on how to fix this error?

best regards
Frank
Reply
#2
Which linux are you using?

You could try compiling via -DENABLE_INTERNAL_FLATBUFFERS=OFF
Reply
#3
I use Ubuntu 24.04.
(2024-07-10, 22:23)DaVu Wrote: You could try compiling via -DENABLE_INTERNAL_FLATBUFFERS=OFF
In which command do I have to specify this? The last one?
Reply
#4
Ah, damn. Sorry. My mistake. I said "compile". But this option need to be set at "configuring"
Reply
#5
But if you are using Ubuntu, why don't you follow the official Ubuntu-docs? https://github.com/xbmc/xbmc/blob/Omega/....Ubuntu.md

"libflatbuffers-dev" should be available from the Ubuntu sources, no?
Reply
#6
(2024-07-10, 22:59)DaVu Wrote: But if you are using Ubuntu, why don't you follow the official Ubuntu-docs?
I followed the Ubuntu instructions. Chapter 4 then refers to the general Linux guide.
(2024-07-10, 22:59)DaVu Wrote: "libflatbuffers-dev" should be available from the Ubuntu sources, no?
"libflatbuffers-dev" is installed. Here is the list of all my installed packages. Just a quick question: libflatbuffers-dev is version 2.08 and the self-built flatbuffers is version 23.3.3. Could there have been a version error?
(2024-07-10, 22:59)DaVu Wrote: But this option need to be set at "configuring"
Ok, done. The result is the same error message.
Reply
#7
I have found the error to my problem. As suspected, there was a version problem. After I deleted all dependencies to the self-compiled flatbuffers, 'flatc' was back to version 2.0.8 and not 23.3.3. This means that line sudo make -C tools/depends/target/flatbuffers PREFIX=/usr/local in the instructions is no longer valid, or the version would have to be changed in the sources. Unfortunately I have a new problem when building. Here are the error messages and logs: Err1 and Log1
Reply
#8
(2024-07-11, 19:47)SirBoss Wrote: sudo make -C tools/depends/target/flatbuffers PREFIX=/usr/local

Never compile as root!
Need help programming a Streamzap remote?
Reply
#9
Thanks for the info. Why is this not done and why is it written in the Linux build guide? I have no idea what I'm doing, I'm just trying to build Kodi Omega according to the instructions.
By the way, with Kodi Nexus it also worked except for a small error in the makefile of the wayland-protocols.
I would like to have a ready-to-use script that contains all the necessary instructions to create the standard Kodi application for a standard Ubuntu 24.04.
Reply
#10
I'm having the same problem with building.  I'm trying to compile Kodi/XBMC 21.0 Omega on Pop_OS! 22.04 however I'm getting some build errors.  Build fails at 92% with an Error 2. 

Errors are listed below in the compile process... 14 errors - all related to Flatbuffers.  I tried reinstalling flatbuffers  but the error seems to be related to the number of arguments passed into a function.

Essentially the error is about expecting 3 arguments but is only getting 2.

Here is a output of the errors:-

https://paste.kodi.tv/bolozibabe.kodi

Here is an explanation of the errors:

Error 1 to 3: The VerifyField function is being called with uint8_t as the template argument and verifier and VT_VERSION, VT_TYPE, VT_SLOT as the function arguments. The function expects a third argument which is not provided.

Error 4 and 5: The VerifyField function is being called with uint64_t as the template argument and verifier and VT_TIMESTAMP_FRAMES, VT_TIMESTAMP_WALL_CLOCK_NS as the function arguments. The function expects a third argument which is not provided.

Error 6: The VerifyField function is being called with uint8_t as the template argument and verifier and VT_PIXEL_FORMAT as the function arguments. The function expects a third argument which is not provided.

Error 7 to 10: The VerifyField function is being called with uint16_t as the template argument and verifier and VT_NOMINAL_WIDTH, VT_NOMINAL_HEIGHT, VT_MAX_WIDTH, VT_MAX_HEIGHT as the function arguments. The function expects a third argument which is not provided.

Error 11: The VerifyField function is being called with float as the template argument and verifier and VT_PIXEL_ASPECT_RATIO as the function arguments. The function expects a third argument which is not provided.

Error 12 and 13: The VerifyField function is being called with uint16_t as the template argument and verifier and VT_VIDEO_WIDTH, VT_VIDEO_HEIGHT as the function arguments. The function expects a third argument which is not provided.

Error 14: The VerifyField function is being called with uint8_t as the template argument and verifier and VT_ROTATION_CCW as the function arguments. The function expects a third argument which is not provided.


Possible solution is to add the missing third argument to the VerifyField function calls. The third argument should be of type size_t as indicated by the error messages.

A general solution was provided to me:

Open the SavestateFlatBuffer.cpp and savestate_generated.h files in a text editor or IDE.
Locate all instances of the VerifyField function.
For each instance, add a third argument that represents the size of the data type being verified. For example, if the data type is uint8_t, the size would be sizeof(uint8_t). If the data type is uint64_t, the size would be sizeof(uint64_t), and so on.
Save the changes and try to compile the program again.


I couldn't find SavestateFlatBuffer.cpp in the correct location, I found it in kodi-build/build/cores/RetroPlayer/savestates/CMakeFiles/retroplayer_savestates.dir/ and it's called SavestateFlatBuffer.cpp.o.d - not the correct file name

Is there an explanation to this problem?
Reply
#11
(2024-07-12, 00:35)graysky Wrote:
(2024-07-11, 19:47)SirBoss Wrote: sudo make -C tools/depends/target/flatbuffers PREFIX=/usr/local

Never compile as root!
Sorry, but I have to say, that those dependencies do have to be installed as root. Otherwise installing them will fail. Entering this command without "sudo" will result in a CMake error. I've just tried that using a Kubuntu 22.04 VM. So, using root at this point is 100% correct. 

@SirBoss
I'm not sure why you tried to compile flatbuffers. That's not needed if you have followed the instructions closely. While looking at the Ubuntu-docs, you already have installed "libflatbuffers". So there's no need to compile those anymore. After following the Ubuntu-Docs, the only commands (for now) which I do have to execute additionally from the Linux-Docs after installing the dependencies mentioned at the Ubuntu-Docs are

sudo make -C tools/depends/target/fmt PREFIX=/usr/local
and
sudo make -C tools/depends/target/spdlog PREFIX=/usr/local

I have to admit, that in my VM Kubuntu is using X11 instead of Wayland. 

Currently it compiles and is at 60%. Will take a while because the resources of the VM aren't that high.

I'll keep you updated.
Reply
#12
So,,,I had to reconfigure Kodi to enable internal fmt and then recompile everything.

This is the command I used to configure Kodi:

cmake ../../gits/xbmc/ -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_INTERNAL_FFMPEG=ON -DENABLE_INTERNAL_FMT=ON -DCORE_PLATFORM_NAME=x11 -DAPP_RENDER_SYSTEM=gl

I´m just using a different folder structure beside the one the docs are suggesting. But that doesn´ t make any difference for configuring and compiling Kodi.

After that I got Kodi up and running fine. So the guide is correct. It might be confusing at some point, but on the other hand if should be clear that flatbuffers (used in Kodi <20.04) doesn´ t need to be compiled if libflatbuffers (used from >=20.04) is installed already. The "Linux"-docs are kind of "general" docs for compiling Kodi on Linux of no matching OS is handled by the docs (e. g. Arch-Linux isn´t mentioned at the Docs at all). So to compile Kodi on Ubuntu you have to use both guides in combination and also think a little bit of what you are doing (no offense).

I totally agree that offering a "standard"-script which simply builds and installs Kodi on any linux machine out there would be nice. But that´s simply not the case and it won´ t be in the very near future. As every machine out there is a little different and users have to adopt guides to their own machines.
Reply
#13
(2024-07-14, 01:05)DaVu Wrote: It might be confusing at some point, but on the other hand if should be clear that flatbuffers (used in Kodi <20.04) doesn´ t need to be compiled if libflatbuffers (used from >=20.04) is installed already. The "Linux"-docs are kind of "general" docs for compiling Kodi on Linux of no matching OS is handled by the docs (e. g. Arch-Linux isn´t mentioned at the Docs at all). So to compile Kodi on Ubuntu you have to use both guides in combination and also think a little bit of what you are doing (no offense).
Thanks for the tip. So I didn't need to build "wayland-protocols" and "waylandpp" either. Eureka, after that the build ran without errors.
Unfortunately the build does not start, I get the following error messages:
Console:
./kodi-wayland
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
libva info: VA-API version 1.20.0
Speicherzugriffsfehler (Speicherabzug geschrieben)
I suspect this might be related to my VM but I'm not sure. Any advice would be appreciated.
Reply
#14
(2024-07-14, 00:18)DaVu Wrote:
(2024-07-12, 00:35)graysky Wrote:
(2024-07-11, 19:47)SirBoss Wrote: sudo make -C tools/depends/target/flatbuffers PREFIX=/usr/local

Never compile as root!
Sorry, but I have to say, that those dependencies do have to be installed as root.
Is that the make step or the make install step?  In any case, I see your point about writing to /usr/local.
Need help programming a Streamzap remote?
Reply
#15
(2024-07-14, 20:06)graysky Wrote: Is that the make step or the make install step?

I haven't looked into it in detail. It's just simply the command which is used at our docs. Wink
Reply

Logout Mark Read Team Forum Stats Members Help
Error when building Kodi Omega0