root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.64k stars 1.26k forks source link

cling error recovery issues #7970

Open Axel-Naumann opened 3 years ago

Axel-Naumann commented 3 years ago

Describe the bug

root [1] .rawInput
root [2] std::vector<short> getV() { return {42}; }
root [3] .rawInput
root [4] getV()[0].foo()

and that last line shows an error, good! But now:

root [5] getV()[0]
IncrementalExecutor::executeFunction: symbol '_ZSt8_DestroyIPssEvT_S1_RSaIT0_E' unresolved while linking [cling interface function]!
You are probably missing the definition of void std::_Destroy<short*, short>(short*, short*, std::allocator<short>&)
Maybe you need to load the corresponding shared library?

Expected behavior

To Reproduce

Setup

Additional context

jalopezg-git commented 3 years ago

Thanks for the report, @Axel-Naumann! We already have several issues with seemingly the same origin (removing symbols from the JIT that are not re-emitted, apparently because they came from a PCH/module).

I was taking a look into this last week, but still don't have a fix for it. I will continue working on it. :-)

Axel-Naumann commented 3 years ago

Those I know of - but here the specialization is not coming from the PCH/PCM. (You can try to MyClass if you don't believe me ;-) ) And: thanks for looking at it!

hahnjo commented 9 months ago

Still fails for me in master - probably because of my last commit to make the tests pass on macOS :neutral_face:

dpiparo commented 7 months ago

I cannot reproduce on (mac, linux)x(6.30.04,master). I close the issue, please do not hesitate to re-open if I am missing something (@hahnjo @devajithvs)

hahnjo commented 7 months ago

I still get exactly the error described in the summary with master:

   ----------------------------------------------------------------------------
  | Welcome to ROOT 6.31/01                                  https://root.cern |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers           |
  | Built for linuxx8664gcc on Feb 05 2024, 07:24:23                           |
  | From heads/ntuple-RPageNullSink@v6-31-01-913-gfdecca9b4d                   |
  | With clang version 16.0.6 (Red Hat 16.0.6-2.module_el8.9.0+3621+df7f7146)  |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'            |
   ----------------------------------------------------------------------------

root [0] .rawInput
Using raw input
root [1] std::vector<short> getV() { return {42}; }
root [2] .rawInput
Not using raw input
root [3] getV()[0].foo()
ROOT_prompt_3:1:10: error: member reference base type 'value_type' (aka 'short') is not a structure or union
getV()[0].foo()
~~~~~~~~~^~~~
root [4] getV()[0]
IncrementalExecutor::executeFunction: symbol '_ZSt8_DestroyIPssEvT_S1_RSaIT0_E' unresolved while linking [cling interface function]!
You are probably missing the definition of void std::_Destroy<short*, short>(short*, short*, std::allocator<short>&)
Maybe you need to load the corresponding shared library?