Ambiguous use of "abs" is failing on Ubuntu
ruaridhw opened this issue · comments
Ruaridh Williamson commented
Build is currently failing on Ubuntu 16.10
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.10
gcc -std=c++11 -I/usr/share/R/include -DNDEBUG `pkg-config --cflags mono-2 glib-2.0` -g -D MONO_CLR -D MONO_INST -fpic -g -O2 -fdebug-prefix-map=/build/r-base-uDrdxB/r-base-3.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c rClr.cpp -o rClrMono.o -lsupc++
In file included from rClr.cpp:1:0:
rClr.h: In function ‘double oleautdate_to_linear(double)’:
rClr.h:233:33: error: call of overloaded ‘abs(double&)’ is ambiguous
double absval = abs(oleaut_date);
^
As per your comments against the release of 0.7-4 this could be related to the Linux compiler used?
Explicitly referring to the correct abs
namespace resolves this issue (see serhatcevikel/rClr@03f65ef)