In ROOT 6.18 and earlier, for each “${ROOTSYS}/lib/lib*.so” library, there existed a corresponding “${ROOTSYS}/lib/lib*.rootmap” text file.
This allowed e.g. to easily find which library was needed for a class (when linking errors appeared).
In ROOT 6.19 and newer, there exist only “${ROOTSYS}/lib/*.pcm” binary files.
What is the command which dumps the contents of these files in a human readable (ASCII) form?
I guess I would like to get (ASCII) text output which kind of “resembles” what was contained in the old “.rootmap” files.
Unfortunately, that is the only supported option for the moment. Alternatively, you could do strings some.pcm | grep identifier. What was your exact workflow with the rootmap files?
I need a way that unmistakenly works for the three “real life examples” shown below (i.e. it uniquely and easily identifies the missing library), but with “ .pcm ” files, and it should work for a “casual” / “novice” user who is not familiar with parsing “nm” nor “strings” output (which return multiple “possible” entries in multiple files):
They are not expected to work and be learnt. Those are expert-level features which are untested, undocumented and most of the time do not do what they are expected to do.
For example, if you pass rootcling bare-cling -Xclang -ast-dump it won’t do what clang would do because cling does not go entirely via the clang driver and requires scaffolding on the cling side (which is an inheritant design problem which I think I should be able to solve in midterm).
Some of the clang flags have no meaning for interactive use or our infrastructure (think cross compilation).
Please don’t use any of those in production of elsewhere as they will break and change
The -module-file-info was the only option that actually works. It is only used by me to detect suboptimal header duplication across modules. So I misspoke about experts – I meant implementers but I agree we should have an expert cheatsheet page.
Maybe one more thing … can you add another parameter to the TInterpreter::GetSharedLibDeps method … e.g. “bool recursive = false” … which (when “true”) could recursively go through and then list all dependent libraries.
For example, for “libGui”, it now returns “libGui libGpad.so libGraf.so” (note that “libGui” is returned without “.so”), so it then should find dependencies for “libGpad” and “libGraf” and then for their dependencies, and so on … in the end, one could run “uniq” on this full list.
Well, rootcling bare-cling -module-file-info Core.pcm doesn’t list “gROOT” nor “gStyle”, even though strings Core.pcm shows them.
So, can I easily get the information which library is needed for some global?
Note: in general it is not necessarily the same library which provides the corresponding class.
Assume I want to find which #include is needed for some class (e.g “TMatrixTBase<float>” or “TRotation”) or global (e.g. “gROOT” or “gStyle”).
Is it possible to easily get this information?
What about getting the information which library is needed for some global (e.g. “gROOT” or “gStyle”), which is not necessarily the same library that provides the corresponding class?