Open
Description
Moved from the following JIRA issue:
The reason I moved this issue to our GitHub was that like this I can also cross-link it from the corresponding clang-repl
issue:
In some cases, the interpreter doesn't recover correctly from input errors, resulting in a state where unexpected linker errors can happen in correct statements given afterwards.
It seems that this kind of error occurs only with "pow".
Reproducer with ROOT master
:
------------------------------------------------------------------
| Welcome to ROOT 6.37.01 https://root.cern |
| (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Jan 01 1980, 00:00:00 |
| From heads/master@v6-37-01-7256-geaa43c05ef9 |
| With g++ (GCC) 14.3.0 |
| Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
root [0] (10-)*std::pow(2,2)
ROOT_prompt_0:1:5: error: expected expression
(10-)*std::pow(2,2)
^
root [1] (10-1)*std::pow(2,2)
IncrementalExecutor::executeFunction: symbol '_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_' unresolved while linking [cling interface function]!
You are probably missing the definition of __gnu_cxx::__promote<decltype (((__gnu_cxx::__promote<int, std::__is_integer<int>::__value>::__type)(0))+((__gnu_cxx::__promote<int, std::__is_integer<int>::__value>::__type)(0))), std::__is_integer<decltype (((__gnu_cxx::__promote<int, std::__is_integer<int>::__value>::__type)(0))+((__gnu_cxx::__promote<int, std::__is_integer<int>::__value>::__type)(0)))>::__value>::__type std::pow<int, int>(int, int)
Maybe you need to load the corresponding shared library?
root [2]