-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dictionary generation of some classes fails on gcc12 (at least in part due to the use of modules) #11329
Comments
A few observation:
If I dump the translation unit I see:
in the successful case. In the failing case I see:
several observations: a. They are all imported from a module except for std::vectorROOT::Internal::TSchemaHelper |
The backtrace of the traversal code that does not see the decl for
|
The problem reproduces on
I commented out the printing of the translation unit decl at the moment; the printed translation unit decl are in : rs.bad.04.log rs.good.04.log |
Does |
I think I understand what happens. gcc 12 has a template instantiation coming from the I am not sure what'd be the right fix, however, when we use a hidden declaration in a cling::Transaction we should probably make it visible even if we did not have a corresponding include. The alternative is to remove the |
One thing I don't understand is what does "invisible" mean in this context and/or why is the invisible decl hidding the visible decl (i.e. The header for vector is explicitly included in my example) and the header contains 2 different way to 'explicitly' instantiate the template). |
I think I added a fix in the build that you used and it might work around this issue. The warning is gone. Can you check if that fixes the issue? I don't think my fix is reliable in the general case but might be good enough... |
Yes, this seems to solve the immediate problem (but of course, not the underlying issue) |
…rt it. The C++ modules marks the std::vector<int> instantiation as not visible because it came from the `regex` header file which we did not explicitly include. root-project/root@a785402 introduces checks if certain declaration is visible in dictionary generation time which was intending to semantically improve the coherence by what the user "allowed" (or requested) rootcling to see vs what it can see globally. While this model works well it seems to not work for template instantiations as they won't be re-instantiated with visible modifier. This patch works around the current issue seen with libstdc++ 12 but a better solution would be to implement a finer grained control over the implicit template instatiations when generating a dictionary. Fixes root-project#11329
…rt it. The C++ modules marks the std::vector<int> instantiation as not visible because it came from the `regex` header file which we did not explicitly include. a785402 introduces checks if certain declaration is visible in dictionary generation time which was intending to semantically improve the coherence by what the user "allowed" (or requested) rootcling to see vs what it can see globally. While this model works well it seems to not work for template instantiations as they won't be re-instantiated with visible modifier. This patch works around the current issue seen with libstdc++ 12 but a better solution would be to implement a finer grained control over the implicit template instatiations when generating a dictionary. Fixes #11329
Did we open a new issue to keep track of the more general issue? |
…rt it. The C++ modules marks the std::vector<int> instantiation as not visible because it came from the `regex` header file which we did not explicitly include. root-project/root@a785402 introduces checks if certain declaration is visible in dictionary generation time which was intending to semantically improve the coherence by what the user "allowed" (or requested) rootcling to see vs what it can see globally. While this model works well it seems to not work for template instantiations as they won't be re-instantiated with visible modifier. This patch works around the current issue seen with libstdc++ 12 but a better solution would be to implement a finer grained control over the implicit template instatiations when generating a dictionary. Fixes root-project/root#11329
Please go ahead an open one it might be indeed necessary. |
Hi @vgvassilev, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
5 similar comments
Hi @vgvassilev, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
Hi @vgvassilev, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
Hi @vgvassilev, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
Hi @vgvassilev, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
Hi @vgvassilev, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
…rt it. The C++ modules marks the std::vector<int> instantiation as not visible because it came from the `regex` header file which we did not explicitly include. root-project/root@a785402 introduces checks if certain declaration is visible in dictionary generation time which was intending to semantically improve the coherence by what the user "allowed" (or requested) rootcling to see vs what it can see globally. While this model works well it seems to not work for template instantiations as they won't be re-instantiated with visible modifier. This patch works around the current issue seen with libstdc++ 12 but a better solution would be to implement a finer grained control over the implicit template instatiations when generating a dictionary. Fixes root-project#11329
Hi @vgvassilev, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
Hi @vgvassilev, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
…rt it. The C++ modules marks the std::vector<int> instantiation as not visible because it came from the `regex` header file which we did not explicitly include. root-project/root@a785402 introduces checks if certain declaration is visible in dictionary generation time which was intending to semantically improve the coherence by what the user "allowed" (or requested) rootcling to see vs what it can see globally. While this model works well it seems to not work for template instantiations as they won't be re-instantiated with visible modifier. This patch works around the current issue seen with libstdc++ 12 but a better solution would be to implement a finer grained control over the implicit template instatiations when generating a dictionary. Fixes root-project#11329
…rt it. The C++ modules marks the std::vector<int> instantiation as not visible because it came from the `regex` header file which we did not explicitly include. root-project/root@a785402 introduces checks if certain declaration is visible in dictionary generation time which was intending to semantically improve the coherence by what the user "allowed" (or requested) rootcling to see vs what it can see globally. While this model works well it seems to not work for template instantiations as they won't be re-instantiated with visible modifier. This patch works around the current issue seen with libstdc++ 12 but a better solution would be to implement a finer grained control over the implicit template instatiations when generating a dictionary. Fixes root-project#11329
…rt it. The C++ modules marks the std::vector<int> instantiation as not visible because it came from the `regex` header file which we did not explicitly include. a785402 introduces checks if certain declaration is visible in dictionary generation time which was intending to semantically improve the coherence by what the user "allowed" (or requested) rootcling to see vs what it can see globally. While this model works well it seems to not work for template instantiations as they won't be re-instantiated with visible modifier. This patch works around the current issue seen with libstdc++ 12 but a better solution would be to implement a finer grained control over the implicit template instatiations when generating a dictionary. Fixes #11329
Hi @vgvassilev, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
The Failure is visible on the GCC 12 / Fedora 36 build: https://lcgapp-services.cern.ch/root-jenkins/job/root-nightly-master/3285/LABEL=ROOT-fedora36,SPEC=default,V=master/testReport/junit/projectroot.roottest.root.tree/branches/roottest_root_tree_branches_make/
for example:
This indicates that the generation of the dictionary for
std::vector<int>
failed even-though it is explicitly requested as part of the G__Core.cxx dictionary.And indeed when inspecting the build log we see for
G__Core.cxx
:I narrowed down the problem to the presence of:
on the command line.
And it can easily be reproduce with the files:
and
and with
we get a proper dictionary for the vector. While with
we get an empty dictionary and the warning:
The text was updated successfully, but these errors were encountered: