Skip to content
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

[cling] A failed compilation unloads more decls than strictly neccesary #10049

Open
jalopezg-git opened this issue Mar 4, 2022 · 5 comments · Fixed by #13534 or #13565
Open

[cling] A failed compilation unloads more decls than strictly neccesary #10049

jalopezg-git opened this issue Mar 4, 2022 · 5 comments · Fixed by #13534 or #13565

Comments

@jalopezg-git
Copy link
Collaborator

jalopezg-git commented Mar 4, 2022

Describe the bug

A reverted transaction due to a failed compilation ends up removing decls / JITed symbols that should be left untouched.

Related issues: #6439, #7970, ROOT-10848, ROOT-6254, ROOT-8084, and ROOT-8245.

Expected behavior

Clean unload. Reverting a transaction should probably not touch template instantiations / emitted symbols that correspond to deserialized decls.

To Reproduce

root [1] foo.size()
ROOT_prompt_1:1:4: error: no member named 'size' in 'std::unique_ptr<std::__cxx11::basic_string<char>, std::default_delete<std::__cxx11::basic_string<char> > >'; did you mean to use '->' instead of '.'?
foo.size()
   ^
   ->
root [2] foo->size()
ROOT_prompt_2:1:4: error: member reference type 'std::unique_ptr<std::string>' (aka 'unique_ptr<basic_string<char> >') is not a pointer; did you mean to use '.'?
foo->size()
~~~^~

or

root [0] std::unique_ptr<TFile> foo{TFile::Open("foo.root", "RECREATE")};
root [1] foo.GetName()
ROOT_prompt_1:1:4: error: no member named 'GetName' in 'std::unique_ptr<TFile, std::default_delete<TFile> >'; did you mean to use '->' instead of '.'?
foo.GetName()
   ^
   ->
root [2] foo->GetName()
IncrementalExecutor::executeFunction: symbol '_ZSt3getILm0EJP5TFileSt14default_deleteIS0_EEERKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERKS8_' unresolved while linking [cling interface function]!
You are probably missing the definition of std::tuple_element<0ul, std::tuple<TFile*, std::default_delete<TFile> > >::type const& std::get<0ul, TFile*, std::default_delete<TFile> >(std::tuple<TFile*, std::default_delete<TFile> > const&)
Maybe you need to load the corresponding shared library?

Setup

ROOT master, Arch Linux x86_64

@github-actions
Copy link

Hi @jalopezg-git,

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,
🤖

1 similar comment
@github-actions
Copy link

Hi @jalopezg-git,

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,
🤖

@hahnjo
Copy link
Member

hahnjo commented Dec 13, 2023

Unfortunately the second reproducer still fails for me in master - probably because of my last commit to make the tests pass on macOS 😐

@dpiparo
Copy link
Member

dpiparo commented Feb 4, 2024

I re-tested master. What I could see is that the reproducer still fails on linux but works fine on macos. I could also add that on lxplus with a large installation such as CMSSW or a LCG release the error needs several seconds to appear. Adding more eyes to the ticket...

@dpiparo dpiparo assigned devajithvs and unassigned Axel-Naumann Feb 4, 2024
@devajithvs
Copy link
Contributor

devajithvs commented Apr 29, 2024

I'm not able to reproduce the second example in the current master branch:

image

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