Today I was doing some testing with po-util and encountered a strange error when building one of my ported libraries.
Only on Linux, even though I have
#include <math.h>, I get this error about
In file included from /home/nrobinson/particle/testing/BNO/firmware/main.cpp:1:0: /home/nrobinson/particle/testing/BNO/firmware/particle-BNO055/particle-BNO055.h: In member function 'void imu::Vector<N>::normalize()': /home/nrobinson/particle/testing/BNO/firmware/particle-BNO055/particle-BNO055.h:228:22: error: there are no arguments to 'isnan' that depend on a template parameter, so a declaration of 'isnan' must be available [-fpermissive] if (isnan(mag) || mag == 0.0) ^ /home/nrobinson/particle/testing/BNO/firmware/particle-BNO055/particle-BNO055.h:228:22: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) ../build/module.mk:267: recipe for target '../build/target/user/platform-6-m/firmware/main.o' failed make: *** [../build/target/user/platform-6-m/firmware/main.o] Error 1 ../../../build/recurse.mk:11: recipe for target 'user' failed make: *** [user] Error 2 ../build/recurse.mk:11: recipe for target 'modules/photon/user-part' failed make: *** [modules/photon/user-part] Error 2
On macOS I do not get this error and my library compiles perfectly.