TMVA::Experimental::SOFIE::RModelParser_ONNX not recognized in namespace

I am trying to use TMVA::Experimental::SOFIE::RModelParser_ONNX to load in ONNX files into a program. To learn how it works i tried running the TMVA_SOFIE_ONNX.C file from the TMVA tutorial documentation, but I keep getting an error saying:

error: no type named 'RModelParser_ONNX' in namespace 'TMVA::Experimental::SOFIE'
TMVA::Experimental::SOFIE::RModelParser_ONNX parser;

I tried making a separate file that looks like this:

#include "TMVA/RModel.hxx"
#include <memory>
#include <functional>
#include <unordered_map>

TMVA::Experimental::SOFIE::RModelParser_ONNX parser;

I ended up getting the same exact error.

Before all of this I built ROOT with -Drmva-sofie=On as part of the cmake command. It seems like the compiler recognizes the TMVA::Experimental::SOFIE namespace, just not the specific object I want. Do I need to build more than just SOFIE when building root to get this to work?
I am working on Linux.


Thanks for the post.
I am sorry to read you are experiencing this issue with your setup.
What version of ROOT are you using installed how? Adding @moneta in the loop.



I am using ROOT version 6.32.00
I installed ROOT using the root_v6.32.00.source.tar.gz file and when it was time to build it with cmake, i used the command:
cmake ../root -Drmva-sofie=On ~/local/protobuf-3.19.4/src/.libs/libprotobuf.a
because I saw a post on this forum about needing to link the protobuf installation to the ROOT build, but this resulted in a warning saying:

CMake warning:
	Ignoring extra path from command line:

ROOT functions as normal, it’s just SOFIE I’m having problems with.


I just managed to install (on lxplus) the latest stable version of root from source with SOFIE support using this cmake command: cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src -Dtmva-sofie=ON. This short macro ran without complaining

#include <TMVA/RModelParser_ONNX.hxx>
TMVA::Experimental::SOFIE::RModelParser_ONNX parser;

I guess -Drmva-sofie=On is a typo and it should be “tmva” instead of “rmva”.