I followed steps from here:
Where I got to these steps:
brew unlink tbb
brew install tbb@2020
brew link tbb@2020
tbb@2020 is recently disabled. I was not able to force install. They had a 2021 version, but I got the same errors as below. I eventually just went back to ābrew install tbbā since I donāt see any other options.
I continued on with the steps, and eventually got to the āBuilding the codeā page where I was to run
make px4_sitl jmavsim
I received these errors:
make px4_sitl jmavsim
-- PX4 version: v1.14.0-beta2-196-gebe152fc22 (1.14.0)
-- Found PythonInterp: /usr/local/Caskroom/miniconda/base/bin/python3 (found suitable version "3.9.7", minimum required is "3")
-- PX4 config file: /Users/bousborn/px4/Firmware/boards/px4/sitl/default.px4board
-- PLATFORM posix
-- ROMFSROOT px4fmu_common
-- ROOTFSDIR .
-- TESTING y
-- ETHERNET y
-- PX4 config: px4_sitl_default
-- PX4 platform: posix
-- PX4 lockstep: enabled
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- cmake build type: RelWithDebInfo
-- ccache enabled (export CCACHE_DISABLE=1 to disable)
-- Could NOT find gz-transport (missing: gz-transport_DIR)
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'bullet>=2.82'
-- Found bullet, version 3.25
-- Found assimp: /usr/local/Cellar/assimp/5.2.5/include (found version "5.2.4")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found DART: /usr/local/include (Required is at least version "6.6") found components: dart
-- Found Boost: /usr/local/lib/cmake/Boost-1.81.0/BoostConfig.cmake (found suitable version "1.81.0", minimum required is "1.40.0") found components: thread system filesystem program_options regex iostreams date_time
-- Found Protobuf: /usr/local/lib/libprotobuf.dylib (found version "3.21.12")
-- Looking for ignition-math6 -- found version 6.14.0
-- Searching for dependencies of ignition-math6
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Checking for module 'OGRE'
-- Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreMain.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreMain.dylib
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgrePaging.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgrePaging.dylib
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreTerrain.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreTerrain.dylib
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreProperty.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreProperty.dylib
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreRTShaderSystem.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreRTShaderSystem.dylib
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreVolume.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreVolume.dylib
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreOverlay.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_10/lib/libOgreOverlay.dylib
-- Looking for ignition-math6 -- found version 6.14.0
-- Looking for ignition-transport8 -- found version 8.4.0
-- Searching for dependencies of ignition-transport8
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libz.tbd (found version "1.2.11")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
-- Found libzmq , version 4.3.4
-- Found ZeroMQ: TRUE (Required is at least version "4")
-- Found UUID: TRUE
-- Looking for ignition-msgs5 -- found version 5.11.0
-- Searching for dependencies of ignition-msgs5
-- Looking for ignition-math6 -- found version 6.14.0
-- Checking for module 'tinyxml2'
-- Found tinyxml2, version 9.0.0
-- Looking for ignition-msgs5 -- found version 5.11.0
-- Looking for ignition-common3 -- found version 3.15.1
-- Searching for dependencies of ignition-common3
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE
-- Searching for <ignition-common3> component [graphics]
-- Looking for ignition-common3-graphics -- found version 3.15.1
-- Searching for dependencies of ignition-common3-graphics
-- Looking for ignition-math6 -- found version 6.14.0
-- Looking for ignition-fuel_tools4 -- found version 4.9.0
-- Searching for dependencies of ignition-fuel_tools4
-- Found CURL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libcurl.tbd (found version "7.87.0")
-- Checking for module 'jsoncpp'
-- Found jsoncpp, version 1.9.4
-- Found JSONCPP: TRUE
-- Checking for module 'yaml-0.1'
-- Found yaml-0.1, version 0.2.5
-- Found YAML: TRUE
-- Checking for module 'libzip'
-- Found libzip, version 1.9.2
-- Found ZIP: TRUE
-- Looking for ignition-common3 -- found version 3.15.1
-- Looking for ignition-math6 -- found version 6.14.0
-- Looking for ignition-msgs5 -- found version 5.11.0
-- Found gazebo-classic 11.13.0, including sitl_gazebo-classic simulator and gazebo-classic targets
-- Found Java: /Library/Java/JavaVirtualMachines/temurin-20.jdk/Contents/Home/bin/java (found version "20.0.1")
-- ROMFS: ROMFS/px4fmu_common
-- Configuring done (39.7s)
-- Generating done (1.6s)
-- Build files have been written to: /Users/bousborn/px4/Firmware/build/px4_sitl_default
[0/900] git submodule src/drivers/gps/devices
[6/900] git submodule src/modules/mavlink/mavlink
[7/900] Building C object boards/px4/sitl/src/CMakeFiles/drivers_board.dir/sitl_led.c.o
FAILED: boards/px4/sitl/src/CMakeFiles/drivers_board.dir/sitl_led.c.o
/usr/local/bin/ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DCONFIG_ARCH_BOARD_PX4_SITL -DENABLE_LOCKSTEP_SCHEDULER -D__CUSTOM_FILE_IO__ -D__PX4_DARWIN -D__PX4_POSIX -D__STDC_FORMAT_MACROS -Dnoreturn_function="__attribute__((noreturn))" -I/Users/bousborn/px4/Firmware/boards/px4/sitl/src -I/Users/bousborn/px4/Firmware/platforms/posix/src/px4/common/include -I/Users/bousborn/px4/Firmware/build/px4_sitl_default -I/Users/bousborn/px4/Firmware/build/px4_sitl_default/src/lib -I/Users/bousborn/px4/Firmware/platforms/posix/src/px4/generic/generic/include -I/Users/bousborn/px4/Firmware/platforms/common -I/Users/bousborn/px4/Firmware/platforms/common/include -I/Users/bousborn/px4/Firmware/src -I/Users/bousborn/px4/Firmware/src/include -I/Users/bousborn/px4/Firmware/src/lib -I/Users/bousborn/px4/Firmware/src/lib/matrix -I/Users/bousborn/px4/Firmware/src/modules -I/Users/bousborn/px4/Firmware/platforms/posix/include -I/Users/bousborn/px4/Firmware/build/px4_sitl_default/external/Install/include -O2 -g -DNDEBUG -std=gnu11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -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 -fno-common -Wnested-externs -Wstrict-prototypes -Wbad-function-cast -MD -MT boards/px4/sitl/src/CMakeFiles/drivers_board.dir/sitl_led.c.o -MF boards/px4/sitl/src/CMakeFiles/drivers_board.dir/sitl_led.c.o.d -o boards/px4/sitl/src/CMakeFiles/drivers_board.dir/sitl_led.c.o -c /Users/bousborn/px4/Firmware/boards/px4/sitl/src/sitl_led.c
/Users/bousborn/px4/Firmware/boards/px4/sitl/src/sitl_led.c:53:23: fatal error: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
__EXPORT void led_init()
^
void
1 error generated.
[15/900] Generating uORB topic ucdr headers
ninja: build stopped: subcommand failed.
make: *** [px4_sitl] Error 1
I tried adding the following to the Makefile but with no changes:
CFLAGS += -Wno-error=strict-prototypes -Wno-error=deprecated-declarations -Wno-error=deprecated-non-prototype
CFLAGS += -Wno-error=missing-parameter-type -Wno-error=unused-but-set-variable
CXXFLAGS += -Wno-error=strict-prototypes -Wno-error=deprecated-declarations
CXXFLAGS += -Wno-error=unused-but-set-variable
I also tried gazebo instead of jmavsim:
make px4_sitl gazebo
but got a bunch of similar strict prototypes errors.
I am building this on a Mac (NOT M1), running Ventura 13.4.
Does anyone know how to suppress these warning/errors to build? I believe the issue is that I have newer gcc/g++ versions, but Iād rather not change the gcc versions on my machine and I currently canāt install docker on this machine due to some restrictions of the network I am on.
I do see CMake files in the build, but the directions said to use make. Is it recommended to use cmake instead? If so, how do I pass it the parameters āpx4_sitlā and ājmavsimā?