Standalone, statically-linked, executable with ROOT6

Hi,
I’m currently trying to build a standalone executable where all the dependencies are embedded via static linking except ROOT (v6.06/08) which is taken from cvmfs (this versino seems the last one built for slc6 machines, this is why I chose it). All of this is to test a local computing cluster: I have a user-interface machine where I compile the experiment and analysis code (generating 4 static libraries that are linked by the executable) and a series of barebone working nodes where the executable is deployed to be run.
On the user-interface the code runs without a hitch, and does what it’s supposed to do, but as soon as I check on the working nodes this is what I get in the stderr:

Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState: Missing FileEntry for ../include/pfunction.h requested to autoload type MTF1 Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState: Missing FileEntry for ../include/VCon_root.h requested to autoload type TkObject Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState: Missing FileEntry for ../include/VCon_root.h requested to autoload type TkPlane Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState: Missing FileEntry for ../include/VCon_root.h requested to autoload type TkLadder […] Warning in <TStreamerInfo::CompareContent>: The following data member of the in-memory layout version 6 of class 'AMSSetupR::TDVR' is missing from the on-file layout version 6: unsigned int Begin; // Warning in <TStreamerInfo::CompareContent>: The following data member of the in-memory layout version 6 of class 'AMSSetupR::TDVR' is missing from the on-file layout version 6: unsigned int End; // […] Warning in <TStreamerInfo::CompareContent>: The following data member of the in-memory layout version 2 of class 'AMSSetupR::DSPError' is missing from the on-file layout version 2: unsigned int TimeStart; // Warning in <TStreamerInfo::CompareContent>: The following data member of the in-memory layout version 2 of class 'AMSSetupR::DSPError' is missing from the on-file layout version 2: unsigned int TimeEnd; // […]

Now, searching the web I found this issue https://sft.its.cern.ch/jira/browse/ROOT-8699 where I learned that at runtime cling tries to access my headers of the experiment software, which are not available on the working nodes (and they should not be, being the executable designed to be run standalone). However in the comments it’s said the first set of these errors is not harmful and all compiled and I/O code should work fine, which is not what I’m seeing here: the class structure in memory is different from the one in the file being read. Also, it would be nice to have an option to disable this behaviour, especially if one doesn’t need to run interpreted code.
However I thought there might be something wrong with the dictionary, but then I can’t explain how the very same executable can run on the user-interface machine. It seems to depend on wether or not the source code is available on the host that runs the program or not, and this is puzzling.

All the machines are slc6 dockers, the software is compiled with gcc 4.9.3 against ROOT 6.06/08 from cvmfs.

Hi,

That’s https://sft.its.cern.ch/jira/browse/ROOT-6446

For now please use non-static builds, and provide your headers at runtime. You can alternatively build a PCH for all your headers, replacing ROOT’s PCH. Let us know if that’s something you want to try.

Axel.

Hi Axel. I went for the static build because we’re still prototyping the cluster so at the moment we have nothing on the working nodes and it’s planned to be like this for the current phase. Of course this will change in the future, but providing the headers would be a dirt and a bit painful workaround, that at this point I would like to keep as plan B. It might be interesting to try and build PCHs for the experiment software if this provides a more lightweight and easy solution to the problem.

Valerio

Hi,

That depends. It’s “clean” versus “dev time / more complex build” that you need to weigh against.

@Danilo - do you remember whether we have any doc on how to build an “experiment PCH”?

Axel.

Well I’m willing to give it a try, if it doesn’t work I still have the ugly plan B :wink:

Hi Valerio,

the instructions were put together for the 2013 release… They could be resurrected. On the other hand I am afraid that the gain will be marginal given the many, many upgrades we implemented in the ROOT type system, interpreter and IO in the last three years :slight_smile:

Cheers,
D

Hi Danilo,
I see how this is not a trivial task, I’ll go with plan B then. I’m just very surprised by how the current structure prohibits to have a static standalone application, it seems a bit odd.

Cheers,
Valerio

Hi Valerio,

ROOT was never really “just a static executable” - we always needed extra runtime files, specifically for the interpreter. But indeed, the current setup is too complex, and we’re working on reducing the amount of files that need to be installed.

Axel.

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