RTPS compile errors with macOS

Hi, everyone.
I try to compile rtps for my FC with my macOS. However, it fails since the lackness of some files which should come with the standard installation of PX4 for Mac.
And here is the full output of the command: %make px4_fmu-v5_rtps

Last login: Tue Nov 16 12:00:42 on console

/Users/kevin/.zshrc:3: no such file or directory: export PATH="/usr/local/sbin:$PATH"

kevin@chenqirongdeMacBook-Pro ~ % cd PX4-Autopilot

kevin@chenqirongdeMacBook-Pro PX4-Autopilot % make px4_fmu-v5_rtps

[0/1452] git submodule platforms/nuttx/NuttX/nuttx

[14/1452] Generating RTPS topic bridge

Traceback (most recent call last):

File “/Users/kevin/PX4-Autopilot/msg/tools/generate_microRTPS_bridge.py”, line 206, in

fastrtps_version = subprocess.check_output(

File “/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py”, line 424, in check_output

return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,

File “/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py”, line 528, in run

raise CalledProcessError(retcode, process.args,

subprocess.CalledProcessError: Command ‘ldconfig -v 2>/dev/null | grep libfastrtps’ returned non-zero exit status 1.

[15/1452] git submodule platforms/nuttx/NuttX/apps

[16/1452] git submodule src/drivers/gps/devices

[20/1452] git submodule src/drivers/uavcan/libuavcan

[22/1452] git submodule src/modules/mavlink/mavlink

[24/1452] git submodule src/modules/micrortps_bridge/micro-CDR

[25/1452] Generating Mavlink developme…ssage_definitions/v1.0/development.xml

Validating /Users/kevin/PX4-Autopilot/src/modules/mavlink/mavlink/message_definitions/v1.0/development.xml

Parsing /Users/kevin/PX4-Autopilot/src/modules/mavlink/mavlink/message_definitions/v1.0/development.xml

Validating /Users/kevin/PX4-Autopilot/src/modules/mavlink/mavlink/message_definitions/v1.0/standard.xml

Parsing /Users/kevin/PX4-Autopilot/src/modules/mavlink/mavlink/message_definitions/v1.0/standard.xml

Validating /Users/kevin/PX4-Autopilot/src/modules/mavlink/mavlink/message_definitions/v1.0/common.xml

Parsing /Users/kevin/PX4-Autopilot/src/modules/mavlink/mavlink/message_definitions/v1.0/common.xml

Validating /Users/kevin/PX4-Autopilot/src/modules/mavlink/mavlink/message_definitions/v1.0/minimal.xml

Parsing /Users/kevin/PX4-Autopilot/src/modules/mavlink/mavlink/message_definitions/v1.0/minimal.xml

Merged enum MAV_CMD

Merged enum MAV_CMD

Found 222 MAVLink message types in 4 XML files

Generating C implementation in directory /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/mavlink/development

Generating C implementation in directory /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/mavlink/standard

Generating C implementation in directory /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/mavlink/common

Generating C implementation in directory /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/mavlink/minimal

Copying fixed headers for protocol 2.0 to /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/mavlink

[30/1452] Copying NuttX/nuttx to build/px4_fmu-v5_rtps/NuttX

skipping non-regular file “nuttx/boards/arm/stm32/emw3162/src/stm32_wlan_firmware.c”

[33/1452] Performing configure step for ‘px4io_firmware’

– PX4 version: v1.13.0-alpha1-3016-g6a60fba96d

– PX4 config file: /Users/kevin/PX4-Autopilot/boards/px4/io-v2/default.px4board

– PLATFORM nuttx

– TOOLCHAIN arm-none-eabi

– ARCHITECTURE cortex-m3

– CONSTRAINED_FLASH y

– PX4 config: px4_io-v2_default

– PX4 platform: nuttx

– cmake build type: MinSizeRel

– ccache enabled (export CCACHE_DISABLE=1 to disable)

– Configuring done

– Generating done

– Build files have been written to: /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/external/Build/px4io_firmware

[33/1452] Performing build step for ‘px4io_firmware’

[3/5] Linking CXX executable px4_io-v2_default.elf

Memory region Used Size Region Size %age Used

flash: 39388 B 60 KB 64.11%

sram: 2952 B 8 KB 36.04%

[5/5] Creating /Users/kevin/PX4-Autopi…d/px4io_firmware/px4_io-v2_default.px4

[1408/1452] Building CXX object src/mo…client.dir/microRTPS_transport.cpp.obj

FAILED: src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_transport.cpp.obj

/usr/local/bin/ccache /usr/local/bin/arm-none-eabi-g++ -DBOARD_WITH_IO -DCONFIG_ARCH_BOARD_PX4_FMU_V5 -DMODULE_NAME=“micrortps_client” -DPX4_MAIN=micrortps_client_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I/Users/kevin/PX4-Autopilot/boards/px4/fmu-v5/src -I/Users/kevin/PX4-Autopilot/platforms/nuttx/src/px4/common/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/lib -I/Users/kevin/PX4-Autopilot/platforms/nuttx/src/px4/stm/stm32f7/include -I/Users/kevin/PX4-Autopilot/platforms/common -I/Users/kevin/PX4-Autopilot/platforms/common/include -I/Users/kevin/PX4-Autopilot/src -I/Users/kevin/PX4-Autopilot/src/include -I/Users/kevin/PX4-Autopilot/src/lib -I/Users/kevin/PX4-Autopilot/src/lib/matrix -I/Users/kevin/PX4-Autopilot/src/modules -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/arch/arm/src/armv7-m -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/arch/arm/src/chip -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/arch/arm/src/common -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/apps/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/external/Install/include -I/Users/kevin/PX4-Autopilot/src/modules/micrortps_bridge/micrortps_client -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micrortps_client -I/Users/kevin/PX4-Autopilot/src/modules/micrortps_bridge/micro-CDR/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micro-CDR/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micro-CDR/include/microcdr -isystem /Users/kevin/PX4-Autopilot/platforms/nuttx/NuttX/include/cxx -isystem /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/include/cxx -isystem /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -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 -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -fno-exceptions -fno-rtti -fno-threadsafe-statics -Wreorder -Wno-overloaded-virtual -nostdinc++ -fno-sized-deallocation -Wframe-larger-than=4096 -std=gnu++14 -MD -MT src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_transport.cpp.obj -MF src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_transport.cpp.obj.d -o src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_transport.cpp.obj -c /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micrortps_client/microRTPS_transport.cpp

arm-none-eabi-g++: error: /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micrortps_client/microRTPS_transport.cpp: No such file or directory

arm-none-eabi-g++: fatal error: no input files

compilation terminated.

[1409/1452] Building CXX object src/mo…ps_client.dir/microRTPS_client.cpp.obj

FAILED: src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_client.cpp.obj

/usr/local/bin/ccache /usr/local/bin/arm-none-eabi-g++ -DBOARD_WITH_IO -DCONFIG_ARCH_BOARD_PX4_FMU_V5 -DMODULE_NAME=“micrortps_client” -DPX4_MAIN=micrortps_client_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I/Users/kevin/PX4-Autopilot/boards/px4/fmu-v5/src -I/Users/kevin/PX4-Autopilot/platforms/nuttx/src/px4/common/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/lib -I/Users/kevin/PX4-Autopilot/platforms/nuttx/src/px4/stm/stm32f7/include -I/Users/kevin/PX4-Autopilot/platforms/common -I/Users/kevin/PX4-Autopilot/platforms/common/include -I/Users/kevin/PX4-Autopilot/src -I/Users/kevin/PX4-Autopilot/src/include -I/Users/kevin/PX4-Autopilot/src/lib -I/Users/kevin/PX4-Autopilot/src/lib/matrix -I/Users/kevin/PX4-Autopilot/src/modules -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/arch/arm/src/armv7-m -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/arch/arm/src/chip -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/arch/arm/src/common -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/apps/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/external/Install/include -I/Users/kevin/PX4-Autopilot/src/modules/micrortps_bridge/micrortps_client -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micrortps_client -I/Users/kevin/PX4-Autopilot/src/modules/micrortps_bridge/micro-CDR/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micro-CDR/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micro-CDR/include/microcdr -isystem /Users/kevin/PX4-Autopilot/platforms/nuttx/NuttX/include/cxx -isystem /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/include/cxx -isystem /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -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 -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -fno-exceptions -fno-rtti -fno-threadsafe-statics -Wreorder -Wno-overloaded-virtual -nostdinc++ -fno-sized-deallocation -Wframe-larger-than=4096 -std=gnu++14 -MD -MT src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_client.cpp.obj -MF src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_client.cpp.obj.d -o src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_client.cpp.obj -c /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micrortps_client/microRTPS_client.cpp

arm-none-eabi-g++: error: /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micrortps_client/microRTPS_client.cpp: No such file or directory

arm-none-eabi-g++: fatal error: no input files

compilation terminated.

[1410/1452] Building CXX object src/mo…ient.dir/microRTPS_client_main.cpp.obj

FAILED: src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_client_main.cpp.obj

/usr/local/bin/ccache /usr/local/bin/arm-none-eabi-g++ -DBOARD_WITH_IO -DCONFIG_ARCH_BOARD_PX4_FMU_V5 -DMODULE_NAME=“micrortps_client” -DPX4_MAIN=micrortps_client_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I/Users/kevin/PX4-Autopilot/boards/px4/fmu-v5/src -I/Users/kevin/PX4-Autopilot/platforms/nuttx/src/px4/common/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/lib -I/Users/kevin/PX4-Autopilot/platforms/nuttx/src/px4/stm/stm32f7/include -I/Users/kevin/PX4-Autopilot/platforms/common -I/Users/kevin/PX4-Autopilot/platforms/common/include -I/Users/kevin/PX4-Autopilot/src -I/Users/kevin/PX4-Autopilot/src/include -I/Users/kevin/PX4-Autopilot/src/lib -I/Users/kevin/PX4-Autopilot/src/lib/matrix -I/Users/kevin/PX4-Autopilot/src/modules -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/arch/arm/src/armv7-m -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/arch/arm/src/chip -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/arch/arm/src/common -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/apps/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/external/Install/include -I/Users/kevin/PX4-Autopilot/src/modules/micrortps_bridge/micrortps_client -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micrortps_client -I/Users/kevin/PX4-Autopilot/src/modules/micrortps_bridge/micro-CDR/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micro-CDR/include -I/Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/src/modules/micrortps_bridge/micro-CDR/include/microcdr -isystem /Users/kevin/PX4-Autopilot/platforms/nuttx/NuttX/include/cxx -isystem /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/include/cxx -isystem /Users/kevin/PX4-Autopilot/build/px4_fmu-v5_rtps/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -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 -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -fno-exceptions -fno-rtti -fno-threadsafe-statics -Wreorder -Wno-overloaded-virtual -nostdinc++ -fno-sized-deallocation -Wframe-larger-than=4096 -std=gnu++14 -MD -MT src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_client_main.cpp.obj -MF src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_client_main.cpp.obj.d -o src/modules/micrortps_bridge/micrortps_client/CMakeFiles/modules__micrortps_bridge__micrortps_client.dir/microRTPS_client_main.cpp.obj -c /Users/kevin/PX4-Autopilot/src/modules/micrortps_bridge/micrortps_client/microRTPS_client_main.cpp

/Users/kevin/PX4-Autopilot/src/modules/micrortps_bridge/micrortps_client/microRTPS_client_main.cpp:34:10: fatal error: microRTPS_transport.h: No such file or directory

34 | #include <microRTPS_transport.h>

| **^~~~~~~~~~~~~~~~~~~~~~~**

compilation terminated.

[1412/1452] Generating px4 event json file from source

ninja: build stopped: subcommand failed.

make: *** [px4_fmu-v5_rtps] Error 1