I have an issue loading a macro file with several functions. The script includes headers that belong to a ROOT-based library called H5root. Furthermore, the library itself uses HDF5.
When trying to load the macro, I first load the libraries, i.e.
In this case it returns an error message that some base class of the H5root library has incomplete type. If I instead also include the header in the command line, i.e.
while parsing DatasetBase.h, ROOT automatically loads the library containing the dictionary for TMDataset. That triggers parsing of TMDataset.h which fails because that header needs DatasetBase.
I’d simply put R__LOADL_LIBRARY(libContainingTH5MainDict) at the top of Track_inBField.C - that should do.
I’ve just put R_LOAD_LIBRARY(libh5root) at the top. Unfortunately, it returns the same error. Isn’t it anyway loaded if I perform gSystem->Load("libh5root"); before calling the macro?
The rootcling command in a previous post of mine creates the TH5MainDict.cc that is part of libh5root. It contains the TMDataset and DatasetBase. We used libh5root the same way already with ROOT5. There, it worked fine.
In case of including the header file in the command prompt of ROOT (as initially stated), it loads the macro file fine. There, it does not matter if the header file is also included in the macro file or not.
I’m afraid I won’t be able to solve that without being able to reproduce it… Do you think you can come up with a stripped-down example exhibiting this issue?
I can give you a link where you can download a binary that you can use. We already tested the binary on another system (Ubuntu/16.04) and could reproduce the error there. Additionally, we can send you a tarball of the source. However, we would like to send you all these instructions and files via e-mail since we don’t want to put it into the tracker. Is this ok for you?
In this case we’re missing the rootmap file. Can you create one for libh5root.so, using rootcling, and place it next to the library? See rootcling -h - the flags you want are -rmf and -rml.
I tried the case “load the libraries then .L the script” and a rootmap file fixed that.