Cling not recognizing __sincospif on MacOS (from math.h)
Check duplicate issues.
- [ ] Checked for duplicates
Description
Cling is not seeing of the content of math.h on MacOS.
Reproducer
With the file header.h
#include <math.h>
void func()
{
float a = 0, b = 0, c = 0;
__sincospif(a, &b, &c);
}
the file compiles:
clang++ -c header.h
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
but fails to be parsed by Cling (well rootcling)
rootcling -f dict.cxx header.h
In file included from input_line_8:3:
header.h:6:4: error: use of undeclared identifier '__sincospif'
__sincospif(a, &b, &c);
^
Error: rootcling: compilation failure (dict51adc8b8cb_dictUmbrella.h)
ROOT version
Tested on master likely also on older releases.
Installation method
manual build and/or spack
Operating system
MacOS
Additional context
No response
adding @devajithvs , maybe he has ideas.
It works on master and 6.34 on macOS 15. It's likely that the evolution of the interpreter fixed it - at this point, once a test is added, the issue can be closed.
Hi @dpiparo @devajithvs @pcanal @vgvassilev I was thinking on this, if we will add a test for this, the CI would run it on all the operating systems, so would it not fail for all of them and just pass on Mac OS?
Some online resources state that __sincospif is macOS specific and some state that it is provided by CUDA, and some state that is just a function which is called to improve performance... I Would love to know more about this!
I also tried compiling this on Ubuntu 24.04.2 LTS, and got this error