Linux Nexus - error: no matching function for call to ‘KODI::RETRO::Savestate::VerifyField<
#1
Exclamation 
Here is a clear and concise description of what the problem is:

While compile KODI 19.90 (Nexus) I have error with VerifyField<uint64_t> in file xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.cpp

On KODI Matrix 19.5 compilation runs fine with no errors.

Steps to reproduce the behavior:
terminal:
git clone -b Nexus https://github.com/xbmc/xbmc kodi
cd $HOME/kodi
sudo make -C tools/depends/target/crossguid PREFIX=/usr/local
sudo make -C tools/depends/target/flatbuffers PREFIX=/usr/local
sudo make -C tools/depends/target/fmt PREFIX=/usr/local
sudo make -C tools/depends/target/spdlog PREFIX=/usr/local
cd $HOME/kodi-build
cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=x11 -DAPP_RENDER_SYSTEM=gl
cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN) // I make this command without "VERBOSE=1"

Operating system version/name:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.10
Release: 22.10
Codename: kinetic

Kodi version:
APP_NAME Kodi
COMPANY_NAME XBMC Foundation
COPYRIGHT_YEARS 2005-2021
WEBSITE http://kodi.tv
VERSION_MAJOR 20
VERSION_MINOR 0
VERSION_TAG RC2
VERSION_CODE 19.90.905
ADDON_API 19.90.905
ADDON_REPOS repository.xbmc.org|https://mirrors.kodi.tv
APP_PACKAGE org.xbmc.kodi
PACKAGE_IDENTITY XBMCFoundation.Kodi
PACKAGE_PUBLISHER C62BD90A-CDD8-477F-96C3-B25992247B97
PACKAGE_DESCRIPTION Kodi is an open source (GPL) software media center for playing videos, music, pictures, games, and more.

Logs:
https://paste.kodi.tv/nayinizuze.kodi
Reply
#2
You'll need to show more logs for any help i would think.

Technically Nexus is built every second night for all platforms (including linux). These builds use a slightly different way to build the flatc compiler, but nothing that i would think would cause such an issue.
I would think you would be best to show the cmake generation step at a minimum (looking for flatc version in particular) as well as where the flatbuffers headers are coming from.

Maybe its pulling in an old set of flatbuffer headers that doesnt match what we use (flatbuffers 2.0.0)
Reply
#3
I found this answer:
https://stackoverflow.com/a/64561502/1891446

And compilation is succesfull.
Image


The answer by Olexandr is only for the flatc binary.

To build & install all of flatbuffers from source using cmake, follow the instructions here:

Clone the repo (https://github.com/google/flatbuffers.git)
Code:
cd flatbuffers
Generate build files for linux ubuntu
Code:
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
Compile
Code:
make
Install
Code:
sudo make install
Code:
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/include/flatbuffers
-- Installing: /usr/local/include/flatbuffers/stl_emulation.h
-- Installing: /usr/local/include/flatbuffers/flexbuffers.h
-- Installing: /usr/local/include/flatbuffers/minireflect.h
-- Installing: /usr/local/include/flatbuffers/flatbuffers.h
-- Installing: /usr/local/include/flatbuffers/pch
-- Installing: /usr/local/include/flatbuffers/pch/flatc_pch.h
-- Installing: /usr/local/include/flatbuffers/pch/pch.h
-- Installing: /usr/local/include/flatbuffers/flatc.h
-- Installing: /usr/local/include/flatbuffers/code_generators.h
-- Installing: /usr/local/include/flatbuffers/util.h
-- Installing: /usr/local/include/flatbuffers/grpc.h
-- Installing: /usr/local/include/flatbuffers/base.h
-- Installing: /usr/local/include/flatbuffers/registry.h
-- Installing: /usr/local/include/flatbuffers/hash.h
-- Installing: /usr/local/include/flatbuffers/reflection_generated.h
-- Installing: /usr/local/include/flatbuffers/idl.h
-- Installing: /usr/local/include/flatbuffers/reflection.h
-- Installing: /usr/local/lib/cmake/flatbuffers/FlatbuffersConfig.cmake
-- Installing: /usr/local/lib/cmake/flatbuffers/FlatbuffersConfigVersion.cmake
-- Installing: /usr/local/lib/libflatbuffers.a
-- Installing: /usr/local/lib/cmake/flatbuffers/FlatbuffersTargets.cmake
-- Installing: /usr/local/lib/cmake/flatbuffers/FlatbuffersTargets-release.cmake
-- Installing: /usr/local/bin/flatc
-- Installing: /usr/local/lib/cmake/flatbuffers/FlatcTargets.cmake
-- Installing: /usr/local/lib/cmake/flatbuffers/FlatcTargets-release.cmake
Reply
#4
Thanks for posting your solution! The problem happens when mixing versions between flatbuffers 1 (used in v19 Matrix) and flatbuffers 2 (used in V20 Nexus).

To avoid the need to manage system flatbuffer versions, I use the "-DENABLE_INTERNAL_FLATBUFFERS=ON" CMake option when building kodi:
 
Code:
cd kodi/build
cmake .. -DENABLE_INTERNAL_FLATBUFFERS=ON
Reply
#5
Because I need to reinstall ubuntu - I was having problems with bluetooth headphones, sound was stuttering and I messed up a lot with pulseaudo, alsa and wirepipe - I found in the command history that I couldn't install `flatbuffers-dev`. When trying to install, I got a message that no "candidate" for installation was found, so I skipped them.
Image
I think that was the cause of the whole problem. Hence, compiling these libraries on my system allowed them to install and solve the problem.
Reply
#6
I have been fighting this problem for the past day since I reinstalled my Ubuntu 22.10 system to fix a frequent crash problem/corrupted system yesterday. I am sure that a few things are not installed exactly like they were before.  I'll give the solution here a try.

The ENABLE_INTERNAL_FLATBUFFERS solution did not help.

I tried a few more build attempts with the flatbuffers from Kodi's repository. I built with the INTERNAL_FLAT_BUFFERS. I built using the old fashioned separate :make -C tools/depends...flatbuffers. I built with PREFIX=(not /usr/local, my normal way). I tried with it going to /usr/local/.

Only when I manually built flat buffers using instructions here and sending to /usr/local/include did it work. I have not bothered to compare the sources.
Reply
#7
Flatbuffers is available in kinetic it's called libflatbuffers-dev (v2.0.6)

https://packages.ubuntu.com/kinetic/arm6...v/filelist

This doesn't help me however (see https://forum.kodi.tv/showthread.php?tid...pid3132594)

I am getting the same compilation issue in Nexus:
Quote:In file included from /home/xbmc/kodi/xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.cpp:12:
/home/xbmc/kodi-build/build/cores/RetroPlayer/messages/savestate_generated.h: In member function ‘bool KODI::RETRO::Savestate::Verify(flatbuffers::Verifier&) const’:
/home/xbmc/kodi-build/build/cores/RetroPlayer/messages/savestate_generated.h:102:32: error: no matching function for call to ‘KODI::RETRO::Savestate::VerifyField<uint8_t>(flatbuffers::Verifier&, KODI::RETRO::Savestate::FlatBuffersVTableOffset, int) const’
  102 |            VerifyField<uint8_t>(verifier, VT_VERSION, 1) &&
      |            ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/xbmc/kodi/xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.h:15,
                 from /home/xbmc/kodi/xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.cpp:9:
/home/xbmc/opt/xbmc-deps/aarch64-linux-gnu-debug/include/flatbuffers/flatbuffers.h:2643:8: note: candidate: ‘template<class T> bool flatbuffers::Table::VerifyField(const flatbuffers::Verifier&, flatbuffers::voffset_t) const’
 2643 |   bool VerifyField(const Verifier &verifier, voffset_t field) const {
      |        ^~~~~~~~~~~
Reply
#8
I believe I have resolved this issue, however I cannot test it properly yet as I am unable to build/link kodi.

https://github.com/xbmc/xbmc/pull/22493
Reply
#9
(2023-01-16, 22:49)tutu Wrote: I believe I have resolved this issue, however I cannot test it properly yet as I am unable to build/link kodi.

https://github.com/xbmc/xbmc/pull/22493

This resolve work for me  Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Nexus - error: no matching function for call to ‘KODI::RETRO::Savestate::VerifyField<0