'CheckedHash & RegisterModule not a member' when compiling dictionaries with Root 6.14.04

Good day.
I’ve been trying to compile some code using Root today, and while the dictionaries are created without issues, I am getting a couple of errors when Root attempts to compile said Dictionaries.


ROOT Version: 6.14.04
Platform: Debian 9
Compiler: g++ 6.3.0 20170516


Here are the errors:

g++ -O2 -Wall -Wno-cpp -Wno-comment -fPIC -pthread -m64 -DUSE_STDIO=1 -D__GCC_POSIX__=1 -fmessage-length=0 -I/usr/include/ -I/usr/include/root/ `pkg-config --cflags --libs playerc++` `pkg-config --libs --cflags opencv` -L/usr/local/lib64/   -c -o UserFuncDict.o UserFuncDict.C

In file included from /usr/local/include/TDictAttributeMap.h:26:0,
                 from UserFuncDict.C:14:
/usr/local/include/THashTable.h: In member function ‘Int_t THashTable::GetCheckedHashValue(TObject*) const’:
/usr/local/include/THashTable.h:94:25: error: ‘class TObject’ has no member named ‘CheckedHash’
    Int_t i = Int_t(obj->CheckedHash() % fSize); // need intermediary i for Linux g++
                         ^~~~~~~~~~~
UserFuncDict.C: In function ‘void {anonymous}::TriggerDictionaryInitialization_UserFuncDict_Impl()’:
UserFuncDict.C:79:7: error: ‘RegisterModule’ is not a member of ‘TROOT’
       TROOT::RegisterModule("UserFuncDict",
       ^~~~~
<builtin>: recipe for target 'UserFuncDict.o' failed
make: *** [UserFuncDict.o] Error 1

I am unsure why I am getting the CheckHash and RegisterModule not found as members of TObject and TROOT respectively.

Any kind of help would be greatly appreciated!
Thanks in advance.

Looks like you have a mismatch of ROOT versions. I recommend you do not install in /usr/local/include, but simply build and use ROOT from your build directory (after source bin/thisroot.sh from your build area). Like that it’s self-contained and does not interfere with other ROOT installations or the system.

Tried using the directory inside root-6.14.04/build/include instead, and it seemed to work fine so far.
I changed the -I/usr/local/include and replaced it with the directory in which the build for Root was done, which was something like /home/user/root-6.14.04/build/include (and …/include/ROOT too), and it compiled fine now, generated the .so just fine.

Thanks, Axel! Much appreciated!

Though I’d like to know exactly what can I do to effectively fix the Root build from /usr/local/include, or better yet, the whole system itself instead of relying on the /build/ directory.
Any suggestions on doing so?

I would remove the ROOT install from /usr/local; it seems to be broken.

Then download ROOT binaries, or build yourself!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.