Compiling v1.14.0-beta1: signbit error

Hi dears,

I’m trying to compile v1.14.0-beta1 with make on MacOS Catalina 10.15.7 and I get an error using ::signbit from a code that I didn’t modify. I believe the compiler is trying to use an incorrect math library. However I don’t know how to fix it. Any suggestions?

-- PX4 version: v1.14.0-beta1
-- The CXX compiler identification is AppleClang
-- The C compiler identification is AppleClang
-- The ASM compiler identification is Clang with GNU-like command-line
[5/9] Building CXX object src/modules/simulatio...dules__simulation__gz_bridge.dir/GZBridge.cpp.o
FAILED: src/modules/simulation/gz_bridge/CMakeFiles/modules__simulation__gz_bridge.dir/GZBridge.cpp.o 
In file included from /Users/romain/Documents/PX4-Autopilot/src/lib/matrix/matrix/helper_functions.hpp:3:
/Applications/ fatal error: no member named 'signbit' in the global namespace
using ::signbit;
1 error generated.
ninja: build stopped: subcommand failed.
make: *** [px4_sitl_default] Error 1

Compiling the hardware make px4_fmu-v5 works fine. So it has to do with the C++ compiler for the SITL I think. I can fix this error by disabling the gz_bridge (gazebo bridge I guess), but in the long term it would be nice to be able to compile it too :slight_smile:

Thanks :pray:

Looks like Compilation error on MacOS 11.4 · Issue #769 · PX4/PX4-SITL_gazebo-classic · GitHub.