Closed gvozdetsky closed 6 years ago
This problem had surfaced already in #22 and was fixed by #27. I think you are on an old version of XCFun. Can you try with the current master
?
The problem is that the DIRAC code uses a relatively old version of XCFun. Might not be super simple to update since interfaces have changed a lot. What we can and possibly should do instead is to apply the fix on the DIRAC side (the code is statically copied, no submodule or external project).
Then the trick is to use double
instead of int
for that call to cbrt
. That is use 2.0
instead of 2
.
OK I will apply it to the DIRAC source code so that at least it gets into the soon to be released DIRAC17 and @gvozdetsky you can perhaps apply it locally until then?
Ok, thank you very much!
It is now fixed on the DIRAC side and will be part of DIRAC17, to be released a month from now. Thanks for reporting! Closing.
In file included from /Users/gvozdetsky/dirac/src/xcfun/src/functionals/ldaerfc.cpp:2: /Users/gvozdetsky/dirac/src/xcfun/src/functionals/pw92eps.h:21:13: error: call to 'cbrt' is ambiguous return (cbrt(2)/(cbrt(2)-1))(d.a_43+d.b_43)d.n_m13/d.n - 1/(cbrt(2)-1); ^~~~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1041:1: note: candidate function [with _A1 = int] cbrt(_A1 lcpp_x) _NOEXCEPT {return ::cbrt((double)lcpp_x);} ^ /Users/gvozdetsky/dirac/src/xcfun/src/taylor/taylor_math.h:261:10: note: candidate function [with T = int] inline T cbrt(T x) ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/math.h:435:15: note: candidate function extern double cbrt(double); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1035:46: note: candidate function inline _LIBCPP_INLINE_VISIBILITY float cbrt(float __lcpp_x) _NOEXCEPT {return ::cbr... ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:1036:46: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return ::cbr...