-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
Description
Describe the bug
Multiples build errors on macOS 15.5
To Reproduce
- pull main branch
- follow this [Docs] macOS Dev environment installation #25204
- run
make px4_sitl gz_x500
- The errors below should pop up:
- I disabled OpticalFlow for this:
[5/13] Performing configure step for 'OpticalFlow'
FAILED: [code=1] OpticalFlow/src/OpticalFlow-stamp/OpticalFlow-configure /Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/OpticalFlow/src/OpticalFlow-stamp/OpticalFlow-configure
cd /Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/OpticalFlow/src/OpticalFlow-build && /opt/homebrew/bin/cmake -DCMAKE_INSTALL_PREFIX=/Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/OpticalFlow/install -GNinja -S /Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/OpticalFlow/src/OpticalFlow -B /Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/OpticalFlow/src/OpticalFlow-build && /opt/homebrew/bin/cmake -E touch /Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/OpticalFlow/src/OpticalFlow-stamp/OpticalFlow-configure
CMake Error at CMakeLists.txt:34 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
-- Configuring incomplete, errors occurred!
ninja: build stopped: subcommand failed.
make: *** [px4_sitl] Error 1
- Additionally, I changed
-Wdouble-promotion -Wno-double-promotion
- Also
Line 243 in 84cdc05
_force += feedback_force * gz::math::Vector3d(scaling, scaling, 1.);
_force += feedback_force * gz::math::Vector3d(static_cast<double>(scaling), static_cast<double>(scaling), 1.0);
for the error below:
[1067/1078] Building CXX object src/modules/simulation/gz_bridge/CMakeFiles/modules__simulation__gz_bridge.dir/GZMixingInterfaceServo.cpp.o
FAILED: [code=1] src/modules/simulation/gz_bridge/CMakeFiles/modules__simulation__gz_bridge.dir/GZMixingInterfaceServo.cpp.o
/opt/homebrew/bin/ccache /usr/bin/c++ -DCONFIG_ARCH_BOARD_PX4_SITL -DENABLE_LOCKSTEP_SCHEDULER -DMODULE_NAME=\"gz_bridge\" -DPROTOBUF_USE_DLLS -DPX4_MAIN=gz_bridge_app_main -D__CUSTOM_FILE_IO__ -D__PX4_DARWIN -D__PX4_POSIX -D__STDC_FORMAT_MACROS -Dnoreturn_function="__attribute__((noreturn))" -I/Users/farhang/px4_main/PX4-Autopilot/boards/px4/sitl/src -I/Users/farhang/px4_main/PX4-Autopilot/platforms/posix/src/px4/common/include -I/Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default -I/Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/src/lib -I/Users/farhang/px4_main/PX4-Autopilot/platforms/posix/src/px4/generic/generic/include -I/Users/farhang/px4_main/PX4-Autopilot/platforms/common -I/Users/farhang/px4_main/PX4-Autopilot/platforms/common/include -I/Users/farhang/px4_main/PX4-Autopilot/src -I/Users/farhang/px4_main/PX4-Autopilot/src/include -I/Users/farhang/px4_main/PX4-Autopilot/src/lib -I/Users/farhang/px4_main/PX4-Autopilot/src/lib/matrix -I/Users/farhang/px4_main/PX4-Autopilot/src/modules -I/Users/farhang/px4_main/PX4-Autopilot/platforms/posix/include -I/Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/external/Install/include -I/Users/farhang/px4_main/PX4-Autopilot/src/modules/simulation/gz_bridge/px4_gz_msgs -I/Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/src/modules/simulation/gz_msgs -isystem /opt/homebrew/include/gz/transport13 -isystem /opt/homebrew/include -isystem /opt/homebrew/include/gz/utils2 -isystem /opt/homebrew/include/gz/msgs10 -isystem /opt/homebrew/include/gz/math7 -isystem /opt/homebrew/Cellar/tinyxml2/11.0.0/include -Wno-double-promotion -O2 -g -DNDEBUG -std=gnu++17 -arch arm64 -fPIC -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fcolor-diagnostics -fdiagnostics-absolute-paths -Qunused-arguments -Wno-c99-designator -Wno-unknown-warning-option -Wno-unused-const-variable -Wno-varargs -Wno-vla-cxx-extension -Wreorder -Wno-overloaded-virtual -O2 -I/opt/homebrew/Cellar/tinyxml2/11.0.0/include -MD -MT src/modules/simulation/gz_bridge/CMakeFiles/modules__simulation__gz_bridge.dir/GZMixingInterfaceServo.cpp.o -MF src/modules/simulation/gz_bridge/CMakeFiles/modules__simulation__gz_bridge.dir/GZMixingInterfaceServo.cpp.o.d -o src/modules/simulation/gz_bridge/CMakeFiles/modules__simulation__gz_bridge.dir/GZMixingInterfaceServo.cpp.o -c /Users/farhang/px4_main/PX4-Autopilot/src/modules/simulation/gz_bridge/GZMixingInterfaceServo.cpp
/Users/farhang/px4_main/PX4-Autopilot/src/modules/simulation/gz_bridge/GZMixingInterfaceServo.cpp:118:20: fatal error: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion]
118 | double min_val = get_servo_angle_min(i);
| ~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[1069/1078] Building CXX object src/modules/simulation/gz_bridge/CMakeFiles/modules__simulation__gz_bridge.dir/GZGimbal.cpp.o
FAILED: [code=1] src/modules/simulation/gz_bridge/CMakeFiles/modules__simulation__gz_bridge.dir/GZGimbal.cpp.o
/opt/homebrew/bin/ccache /usr/bin/c++ -DCONFIG_ARCH_BOARD_PX4_SITL -DENABLE_LOCKSTEP_SCHEDULER -DMODULE_NAME=\"gz_bridge\" -DPROTOBUF_USE_DLLS -DPX4_MAIN=gz_bridge_app_main -D__CUSTOM_FILE_IO__ -D__PX4_DARWIN -D__PX4_POSIX -D__STDC_FORMAT_MACROS -Dnoreturn_function="__attribute__((noreturn))" -I/Users/farhang/px4_main/PX4-Autopilot/boards/px4/sitl/src -I/Users/farhang/px4_main/PX4-Autopilot/platforms/posix/src/px4/common/include -I/Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default -I/Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/src/lib -I/Users/farhang/px4_main/PX4-Autopilot/platforms/posix/src/px4/generic/generic/include -I/Users/farhang/px4_main/PX4-Autopilot/platforms/common -I/Users/farhang/px4_main/PX4-Autopilot/platforms/common/include -I/Users/farhang/px4_main/PX4-Autopilot/src -I/Users/farhang/px4_main/PX4-Autopilot/src/include -I/Users/farhang/px4_main/PX4-Autopilot/src/lib -I/Users/farhang/px4_main/PX4-Autopilot/src/lib/matrix -I/Users/farhang/px4_main/PX4-Autopilot/src/modules -I/Users/farhang/px4_main/PX4-Autopilot/platforms/posix/include -I/Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/external/Install/include -I/Users/farhang/px4_main/PX4-Autopilot/src/modules/simulation/gz_bridge/px4_gz_msgs -I/Users/farhang/px4_main/PX4-Autopilot/build/px4_sitl_default/src/modules/simulation/gz_msgs -isystem /opt/homebrew/include/gz/transport13 -isystem /opt/homebrew/include -isystem /opt/homebrew/include/gz/utils2 -isystem /opt/homebrew/include/gz/msgs10 -isystem /opt/homebrew/include/gz/math7 -isystem /opt/homebrew/Cellar/tinyxml2/11.0.0/include -Wno-double-promotion -O2 -g -DNDEBUG -std=gnu++17 -arch arm64 -fPIC -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fcolor-diagnostics -fdiagnostics-absolute-paths -Qunused-arguments -Wno-c99-designator -Wno-unknown-warning-option -Wno-unused-const-variable -Wno-varargs -Wno-vla-cxx-extension -Wreorder -Wno-overloaded-virtual -O2 -I/opt/homebrew/Cellar/tinyxml2/11.0.0/include -MD -MT src/modules/simulation/gz_bridge/CMakeFiles/modules__simulation__gz_bridge.dir/GZGimbal.cpp.o -MF src/modules/simulation/gz_bridge/CMakeFiles/modules__simulation__gz_bridge.dir/GZGimbal.cpp.o.d -o src/modules/simulation/gz_bridge/CMakeFiles/modules__simulation__gz_bridge.dir/GZGimbal.cpp.o -c /Users/farhang/px4_main/PX4-Autopilot/src/modules/simulation/gz_bridge/GZGimbal.cpp
/Users/farhang/px4_main/PX4-Autopilot/src/modules/simulation/gz_bridge/GZGimbal.cpp:234:15: fatal error: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion]
234 | msg.set_data(new_stp);
| ~~~~~~~~ ^~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
Expected behavior
No response
Screenshot / Media
No response
Flight Log
No response
Software Version
main PX4 branch
GZ- Hrmonic
cmake 4.0.3
python 3.10 or 3.12
Flight controller
No response
Vehicle type
None
How are the different components wired up (including port information)
No response
Additional context
No response