Redefinition of 'y1'

In the process of grabbing some coordinates I discovered this little bug in ROOT 6.08/06 and 6.09/02 on MAC OSX:

root [0] double y1
ROOT_prompt_0:1:8: error: redefinition of 'y1' as different kind of symbol
double y1
       ^
/usr/include/math.h:691:15: note: previous definition is here
extern double y1(double) __OSX_AVAILABLE_STARTING(__MAC_10_0,__IPHONE_3_2);
              ^

Is this a problem with ROOT, my install or something different all together?

1 Like

Looks like they com from math.h

The y0(), y1(), and yn() functions shall compute Bessel functions of x of the second kind of orders 0, 1, and n, respectively.

In addition, some j variables are already declared.

The j0(), j1(), and jn() functions shall compute Bessel functions of x of the first kind of orders 0, 1, and n, respectively.

I assume this is problematic in the ROOT environment as math.h is preloaded.

This is well known. In ROOT 6 some functions defined in math.h clashes with simple variable names. May be @Axel can tell you more. I am facing this all the time … well … now I know more or less which names are clashing …

Yes, both your diagnoses are correct. This happens on the prompt; it does not happen in named functions.

Axel

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