Skip to content

Complete dictionary rootmaps with all public headers to fix generator macro crashes - #16206

Open
jackal1-66 wants to merge 3 commits into
AliceO2Group:devfrom
jackal1-66:fixfairroot
Open

jackal1-66 wants to merge 3 commits into
AliceO2Group:devfrom
jackal1-66:fixfairroot

Conversation

@jackal1-66

Copy link
Copy Markdown
Collaborator

Fix the external generator macros that crash or fail to compile since FairRoot moved into O2, by listing every public header in each O2 dictionary rootmap. The problem appeared after merging #16054 and two of the errors experienced after that are: unknown type name 'TMCProcess' and use of undeclared identifier 'info'. Previously, the FairRoot rootmap did not list FairGenerator.h, so ROOT parsed the entire FairRoot library, causing, as a side effect, the VMC types to be declared and FairLogger to be loaded automatically. The new O2 rootmap lists the header, so this no longer happens. This exposed an old issue in rootcling, which lists only a few headers in the rootmap. When a macro includes an unlisted header, cling parses the whole library from inside the half-read header and fails on types that are not defined yet. Now all the public headers are listed in the rootmaps. In addition, Generator.h now includes FairLogger (fixing the info error), and five headers that failed when included on their own got include guards or a missing include.

…gger in Generator.h

Since the FairRoot simulation infrastructure moved into O2 (805a3d7), some
external generator macros fail when o2-sim-dpl-eventgen compiles them with either: "unknown type name 'TMCProcess'" followed by a cling segfault or "use of undeclared identifier 'info'" in macros using LOG(...). before FairRoot rootmap had no FairGenerator.h, so including it made cling parse automatically the entire payload of the software, which caused accidentally to pull cleanly VMC types and FairLogger. Now libO2FairRootBase lists the header correctly causing the side effect to be gone, and this needed to be fixed.
This was exposed by the complete rootmaps of the previous commit. Basically with every public header listed now, cling parses a header directly before the macro includes run. Many headers worked only because cling had read them once.
sawenzel
sawenzel previously approved these changes Nov 26, 2026
…acros

In the other macros ROOT name lookups parse libraries that bring in the logger, but these macros are missing it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants