Cling repl std::abs(double) unresolved while linking [cling interface function]!

Hi, there is following strange behaviour which I can’t explain. If you know what is the cause, please tell me :slight_smile:

1st scenario, works fine:

  • starting cling
  • #include<cmath>
  • std::abs(.5) prints (double) 0.5

2nd scenario, does not work:

  • creating file ~/.clangrc with content
#include<cmath>
  • start cling -include ~/.clingrc
  • std::abs(.5) prints
IncrementalExecutor::executeFunction: symbol '_ZSt3absd' unresolved while linking [cling interface function]!
You are probably missing the definition of std::abs(double)
Maybe you need to load the corresponding shared library?

Maybe related to cling::printValue(void const**) unresolved while linking [cling interface function]!

Further links:
http://www.cplusplus.com/reference/cmath/abs/

and

cling downloaded from https://root.cern.ch/download/cling/
cling --version : 0.6~dev
cling -print-libgcc-file-name : /usr/lib/gcc/x86_64-linux-gnu/5.4.0/libgcc.a
cat /etc/lsb-release : Ubuntu 16.04.2 LTS

Maybe @Axel has an idea…

I need to actually debug this - and I don’t have the time for the moment. Is this urgent? Could you open a Jira ticket with this at https://root.cern/bugs ? It is a bug!

It’s not urgent at all, I think. When I googled for it, I didn’t find any question with this specific issue. So there may be only few other people affected. Personally, I’m ok with never “fixing” this.

I don’t have an account to open a ticket at https://root.cern/bugs , else I’d have done it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

That’s finally https://sft.its.cern.ch/jira/browse/ROOT-9278

Thanks for your report!