Error Compile on Mac M1

Hey everyone I need some help on compiling Ardupilot on Mac M1. I work on this since 3 days including all instructions and what I found in the internet. I managed to fix already multiple problems but this one gives me a headache.

During compiling it tells me: “g++: fatal error: cannot read spec file ‘nano.specs’: No such file or directory compilation terminated.”

Last login: Fri Jun 28 17:14:12 on ttys000
christophbusch@MBPvonChristoph ~ % cd ardupilot
christophbusch@MBPvonChristoph ardupilot % CXX=g++ CC=gcc ./waf configure --board cubeorangeplus
Setting top to                           : /Users/christophbusch/ardupilot 
Setting out to                           : /Users/christophbusch/ardupilot/build 
Autoconfiguration                        : enabled 
Checking for program 'python'            : /Library/Developer/CommandLineTools/usr/bin/python3 
Checking for python version >= 3.6.9     : 3.9.6 
Setting board to                         : CubeOrangePlus 
Using toolchain                          : arm-none-eabi 
Checking for 'g++' (C++ compiler)        : g++ 
Checking for 'gcc' (C compiler)          : gcc 
Checking for program 'arm-none-eabi-nm'  : /opt/homebrew/bin/arm-none-eabi-nm 
Checking for c flags '-MMD'              : yes 
Checking for cxx flags '-MMD'            : yes 
CXX Compiler                             : g++ 14.1.0 
Checking for program 'make'              : /usr/bin/make 
Checking for program 'arm-none-eabi-objcopy' : /opt/homebrew/bin/arm-none-eabi-objcopy 
Including /Users/christophbusch/ardupilot/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.inc
Adding environment OPTIMIZE -O2
Including /Users/christophbusch/ardupilot/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/sdcard.inc
Removing AP_BATTERY_SMBUS_SOLO_ENABLED
Removing USB_STRING_PRODUCT
Removing USB_STRING_MANUFACTURER
Removing APJ_BOARD_ID
Removing USB_PRODUCT
Removing CHECK_ICM20602_EXT
Removing CHECK_IMU0_PRESENT
Removing CHECK_IMU1_PRESENT
Removing CHECK_IMU2_PRESENT
Removing CHECK_ICM20649
Removing BOARD_VALIDATE
Removing IMU
Removing I2C_ORDER
Adding environment BUILD_ABIN True
Setup for MCU STM32H757xx
Default parameters path from hwdef: /Users/christophbusch/ardupilot/libraries/AP_HAL_ChibiOS/hwdef/CubeOrangePlus/defaults.parm
Writing hwdef setup in /Users/christophbusch/ardupilot/build/CubeOrangePlus/hwdef.h
MCU Flags: cortex-m7 ['-mcpu=cortex-m7', '-mfpu=fpv5-d16', '-mfloat-abi=hard']
Writing DMA map
Setting up as normal
No change in hwdef.h
Generating ldscript.ld
Checking for env.py
env set OPTIMIZE=-O2
env set BUILD_ABIN=True
env set ENABLE_DFU_BOOT=1
env set WITH_FATFS=1
env set PROCESS_STACK=0x1C00
env set MAIN_STACK=0x600
env set IOMCU_FW=0
env set PERIPH_FW=0
env set HAL_NUM_CAN_IFACES=2
env set HAL_CANFD_SUPPORTED=8
env set BOARD_FLASH_SIZE=2048
env set EXT_FLASH_SIZE_MB=0
env set INT_FLASH_PRIMARY=False
env set ENABLE_CRASHDUMP=True
env set CPU_FLAGS=['-mcpu=cortex-m7', '-mfpu=fpv5-d16', '-mfloat-abi=hard', '-DARM_MATH_CM7', '-u_printf_float']
env set CORTEX=cortex-m7
env set APJ_BOARD_ID=1063
env set APJ_BOARD_TYPE=STM32H757xx
env set USBID=0x2dae/0x1058
env set FLASH_RESERVE_START_KB=128
env set EXT_FLASH_RESERVE_START_KB=0
env set FLASH_TOTAL=1966080
env set HAS_EXTERNAL_FLASH_SECTIONS=0
env set CHIBIOS_BUILD_FLAGS=USE_FATFS=yes CHIBIOS_STARTUP_MK=os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32h7xx.mk CHIBIOS_PLATFORM_MK=os/hal/ports/STM32/STM32H7xx/platform.mk MCU=cortex-m7 ENV_UDEFS=-DCHPRINTF_USE_FLOAT=1
Enabling ChibiOS asserts                     : no 
Disabling Watchdog                           : no 
Enabling malloc guard                        : no 
Enabling ChibiOS thread statistics           : no 
Enabling -Werror                             : no 
Checking for intelhex module:                : disabled 
Enabled OpenDroneID                          : no 
Enabled firmware ID checking                 : no 
GPS Debug Logging                            : no 
Enabled custom controller                    : no 
Checking for HAVE_CMATH_ISFINITE             : no 
Checking for HAVE_CMATH_ISINF                : no 
Checking for HAVE_CMATH_ISNAN                : no 
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : no 
Checking for NEED_CMATH_ISINF_STD_NAMESPACE    : no 
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE    : no 
Checking for header endian.h                   : not found 
Checking for header byteswap.h                 : not found 
Checking for HAVE_MEMRCHR                      : no 
Configured VSCode Intellisense:                : no 
DC_DSDL compiler                               : /Users/christophbusch/ardupilot/modules/DroneCAN/dronecan_dsdlc/dronecan_dsdlc.py 
Source is git repository                       : yes 
Update submodules                              : yes 
Checking for program 'git'                     : /usr/bin/git 
Gtest                                          : STM32 boards currently don't support compiling gtest 
Checking for program 'arm-none-eabi-size'      : /opt/homebrew/bin/arm-none-eabi-size 
Benchmarks                                     : disabled 
Unit tests                                     : disabled 
Scripting                                      : maybe 
Scripting runtime checks                       : enabled 
Debug build                                    : disabled 
Coverage build                                 : disabled 
Force 32-bit build                             : disabled 
Checking for program 'rsync'                   : /usr/bin/rsync 
Removing target_list file /Users/christophbusch/ardupilot/build/CubeOrangePlus/target_list
'configure' finished successfully (0.876s)
christophbusch@MBPvonChristoph ardupilot % CXX=g++ CC=gcc ./waf plane     
Waf: Entering directory `/Users/christophbusch/ardupilot/build/CubeOrangePlus'
Checking for env.py
env added OPTIMIZE=-O2
env added BUILD_ABIN=True
env added ENABLE_DFU_BOOT=1
env added WITH_FATFS=1
env added PROCESS_STACK=0x1C00
env added MAIN_STACK=0x600
env added IOMCU_FW=0
env added PERIPH_FW=0
env added HAL_NUM_CAN_IFACES=2
env added HAL_CANFD_SUPPORTED=8
env added BOARD_FLASH_SIZE=2048
env added EXT_FLASH_SIZE_MB=0
env added INT_FLASH_PRIMARY=False
env added ENABLE_CRASHDUMP=True
env appended CPU_FLAGS=['-mcpu=cortex-m7', '-mfpu=fpv5-d16', '-mfloat-abi=hard', '-DARM_MATH_CM7', '-u_printf_float']
env added CORTEX=cortex-m7
env added APJ_BOARD_ID=1063
env added APJ_BOARD_TYPE=STM32H757xx
env added USBID=0x2dae/0x1058
env added FLASH_RESERVE_START_KB=128
env added EXT_FLASH_RESERVE_START_KB=0
env added FLASH_TOTAL=1966080
env added HAS_EXTERNAL_FLASH_SECTIONS=0
env added CHIBIOS_BUILD_FLAGS=USE_FATFS=yes CHIBIOS_STARTUP_MK=os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32h7xx.mk CHIBIOS_PLATFORM_MK=os/hal/ports/STM32/STM32H7xx/platform.mk MCU=cortex-m7 ENV_UDEFS=-DCHPRINTF_USE_FLOAT=1
Embedding file bootloader.bin:/Users/christophbusch/ardupilot/Tools/bootloaders/CubeOrangePlus_bl.bin
Embedding file defaults.parm:/Users/christophbusch/ardupilot/build/CubeOrangePlus/processed_defaults.parm
Embedding file hwdef.dat:/Users/christophbusch/ardupilot/build/CubeOrangePlus/hw.dat
Embedding file io_firmware.bin:Tools/IO_Firmware/iofirmware_highpolh.bin
Embedding file io_firmware_dshot.bin:Tools/IO_Firmware/iofirmware_dshot_highpolh.bin
No target_list file found, creating
Generating compile_commands.json
Build commands will be stored in build/CubeOrangePlus/compile_commands.json
Generating compile_commands.json
Build commands will be stored in build/CubeOrangePlus/compile_commands.json
[  12/1202] Compiling libraries/AC_AttitudeControl/AC_PosControl_Logging.cpp
[  13/1202] Compiling libraries/AC_AttitudeControl/AC_AttitudeControl_Multi_6DoF.cpp
[  14/1202] Compiling libraries/AC_AttitudeControl/AC_AttitudeControl_Heli.cpp
[  15/1202] Compiling libraries/AC_AttitudeControl/AC_CommandModel.cpp
[  16/1202] Compiling libraries/AC_AttitudeControl/AC_AttitudeControl_TS.cpp
[  17/1202] Compiling libraries/AC_AttitudeControl/AC_AttitudeControl_Multi.cpp
[  18/1202] Compiling libraries/AC_AttitudeControl/ControlMonitor.cpp
[  19/1202] Compiling libraries/AC_AttitudeControl/AC_AttitudeControl_Sub.cpp
g++: fatal error: cannot read spec file 'nano.specs': No such file or directory
compilation terminated.

g++: fatal error: cannot read spec file 'nano.specs': No such file or directory
compilation terminated.

g++: fatal error: cannot read spec file 'nano.specs': No such file or directory
compilation terminated.

g++: fatal error: cannot read spec file 'nano.specs': No such file or directory
compilation terminated.

g++: fatal error: cannot read spec file 'nano.specs': No such file or directory
compilation terminated.

g++: fatal error: cannot read spec file 'nano.specs': No such file or directory
compilation terminated.

g++: fatal error: cannot read spec file 'nano.specs': No such file or directory
compilation terminated.

g++: fatal error: cannot read spec file 'nano.specs': No such file or directory
compilation terminated.

Waf: Leaving directory `/Users/christophbusch/ardupilot/build/CubeOrangePlus'
Build failed
 -> task in 'objs/AC_AttitudeControl' failed (exit status 1): 
	{task 4374545792: cxx AC_AttitudeControl_Heli.cpp -> AC_AttitudeControl_Heli.cpp.0.o}
 (run with -v to display more information)
 -> task in 'objs/AC_AttitudeControl' failed (exit status 1): 
	{task 4374546128: cxx AC_AttitudeControl_Sub.cpp -> AC_AttitudeControl_Sub.cpp.0.o}
 (run with -v to display more information)
 -> task in 'objs/AC_AttitudeControl' failed (exit status 1): 
	{task 4374546576: cxx ControlMonitor.cpp -> ControlMonitor.cpp.0.o}
 (run with -v to display more information)
 -> task in 'objs/AC_AttitudeControl' failed (exit status 1): 
	{task 4374546240: cxx AC_AttitudeControl_TS.cpp -> AC_AttitudeControl_TS.cpp.0.o}
 (run with -v to display more information)
 -> task in 'objs/AC_AttitudeControl' failed (exit status 1): 
	{task 4374546016: cxx AC_AttitudeControl_Multi_6DoF.cpp -> AC_AttitudeControl_Multi_6DoF.cpp.0.o}
 (run with -v to display more information)
 -> task in 'objs/AC_AttitudeControl' failed (exit status 1): 
	{task 4374546464: cxx AC_PosControl_Logging.cpp -> AC_PosControl_Logging.cpp.0.o}
 (run with -v to display more information)
 -> task in 'objs/AC_AttitudeControl' failed (exit status 1): 
	{task 4374545904: cxx AC_AttitudeControl_Multi.cpp -> AC_AttitudeControl_Multi.cpp.0.o}
 (run with -v to display more information)
 -> task in 'objs/AC_AttitudeControl' failed (exit status 1): 
	{task 4374546352: cxx AC_CommandModel.cpp -> AC_CommandModel.cpp.0.o}
 (run with -v to display more information)
christophbusch@MBPvonChristoph ardupilot %

I installed arm-none-eabi-gcc, but this doesn’t seem to be the problem. When I open the libraries in Cubeorgangeplus all folders are there, but they are empty. I assume that’s correct bc the complier is about to create them there?

When I run the ./waf with -v I get this (only and extract):

Calling ant_glob on build folders (/Users/christophbusch/ardupilot/build/CubeOrangePlus) is dangerous: add quiet=True / remove=False
Generating compile_commands.json
Build commands will be stored in build/CubeOrangePlus/compile_commands.json
Generating compile_commands.json
Build commands will be stored in build/CubeOrangePlus/compile_commands.json
[  12/1202] Compiling libraries/AC_AttitudeControl/AC_PosControl_Logging.cpp
17:31:31 runner ['g++', '-Werror=implicit-fallthrough', '-fsingle-precision-constant', '-Wno-psabi', '-std=gnu++11', '-fdata-sections', '-ffunction-sections', '-fno-exceptions', '-fsigned-char', '-Wall', '-Wextra', '-Wpointer-arith', '-Wno-unused-parameter', '-Wno-missing-field-initializers', '-Wno-reorder', '-Wno-redundant-decls', '-Wno-unknown-pragmas', '-Wno-expansion-to-defined', '-Werror=cast-align', '-Werror=attributes', '-Werror=format-security', '-Werror=format-extra-args', '-Werror=enum-compare', '-Werror=format', '-Werror=array-bounds', '-Werror=uninitialized', '-Werror=init-self', '-Werror=narrowing', '-Werror=return-type', '-Werror=switch', '-Werror=sign-compare', '-Werror=type-limits', '-Werror=undef', '-Werror=unused-result', '-Werror=shadow', '-Werror=unused-value', '-Werror=unused-variable', '-Werror=delete-non-virtual-dtor', '-Wfatal-errors', '-Wno-trigraphs', '-Werror=parentheses', '-DARDUPILOT_BUILD', '-Wuninitialized', '-Warray-bounds', '-Wno-format-contains-nul', '-Werror=unused-but-set-variable', '-Werror=suggest-override', '-Werror=implicit-fallthrough', '-Werror=maybe-uninitialized', '-Werror=duplicated-cond', '-Werror=sizeof-pointer-div', '-D__AP_LINE__=__LINE__', '-ffunction-sections', '-fdata-sections', '-fsigned-char', '-Wall', '-Wextra', '-Werror=format', '-Wpointer-arith', '-Wcast-align', '-Wno-missing-field-initializers', '-Wno-unused-parameter', '-Wno-redundant-decls', '-Wno-unknown-pragmas', '-Wno-trigraphs', '-Werror=shadow', '-Werror=return-type', '-Werror=unused-result', '-Werror=unused-variable', '-Werror=narrowing', '-Werror=attributes', '-Werror=overflow', '-Werror=parentheses', '-Werror=format-extra-args', '-Werror=ignored-qualifiers', '-Werror=undef', '-DARDUPILOT_BUILD', '-Wno-format-contains-nul', '-fsingle-precision-constant', '-mcpu=cortex-m7', '-mfpu=fpv5-d16', '-mfloat-abi=hard', '-DARM_MATH_CM7', '-u_printf_float', '-Wlogical-op', '-Wframe-larger-than=1300', '-Wno-attributes', '-fno-exceptions', '-Wall', '-Wextra', '-Wno-sign-compare', '-Wfloat-equal', '-Wpointer-arith', '-Wmissing-declarations', '-Wno-unused-parameter', '-Werror=array-bounds', '-Wfatal-errors', '-Werror=uninitialized', '-Werror=init-self', '-Werror=unused-but-set-variable', '-Wno-missing-field-initializers', '-Wno-trigraphs', '-fno-strict-aliasing', '-fomit-frame-pointer', '-falign-functions=16', '-ffunction-sections', '-fdata-sections', '-fno-strength-reduce', '-fno-builtin-printf', '-fno-builtin-fprintf', '-fno-builtin-vprintf', '-fno-builtin-vfprintf', '-fno-builtin-puts', '-mno-thumb-interwork', '-mthumb', '--specs=nano.specs', '--specs=nosys.specs', '-D__USE_CMSIS', '-Werror=deprecated-declarations', '-DNDEBUG=1', '-Wno-error=double-promotion', '-Wno-error=missing-declarations', '-Wno-error=float-equal', '-Wno-error=cpp', '-fno-rtti', '-fno-threadsafe-statics', '-DNEW_NOTHROW=new', '-fcheck-new', '-MMD', '-O2', '-include', 'ap_config.h', '-O2', '-DHAL_HAVE_AP_ROMFS_EMBEDDED_H', '-include', 'ap_config.h', '-Ilibraries', '-Ilibraries/GCS_MAVLink', '-Imodules/DroneCAN/libcanard/dsdlc_generated/include', '-I../../modules/DroneCAN/libcanard', '-I../../libraries/AP_DroneCAN/canard', '-I.', '-I../../libraries', '-I../../libraries/AP_Common/missing', '-I../../libraries/AP_GyroFFT/CMSIS_5/include', '-I../../modules/lwip/src/include/compat/posix', '-I../../modules/DroneCAN/libcanard', '-I../../modules/lwip/src/include', '-I../../libraries/AP_Networking/config', '-I../../libraries/AP_Networking/lwip_hal/include', '-I../../modules/ChibiOS/os/license', '-I../../modules/ChibiOS/os/various/cpp_wrappers', '-I../../modules/ChibiOS/ext/fatfs/source', '-I../../modules/ChibiOS/os/common/portability/GCC', '-I../../modules/ChibiOS/os/common/startup/ARMCMx/compilers/GCC', '-I../../modules/ChibiOS/os/common/startup/ARMCMx/devices/STM32H7xx', '-I../../modules/ChibiOS/os/common/ext/ARM/CMSIS/Core/Include', '-I../../modules/ChibiOS/os/common/ext/ST/STM32H7xx', '-I../../modules/ChibiOS/os/hal/include', '-I../../modules/ChibiOS/os/hal/ports/common/ARMCMx', '-I../../modules/ChibiOS/os/hal/ports/STM32/STM32H7xx', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/ADCv4', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/BDMAv1', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/CRYPv1', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/DACv1', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/DMAv2', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/EXTIv1', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/FDCANv1', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/GPIOv2', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/I2Cv3', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/MACv2', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/MDMAv1', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/OTGv1', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/QUADSPIv2', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/SDMMCv2', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/SPIv3', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/RNGv1', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/RTCv2', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/SYSTICKv1', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/TIMv1', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/USART', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/USARTv3', '-I../../modules/ChibiOS/os/hal/ports/STM32/LLD/xWDGv1', '-I../../modules/ChibiOS/os/hal/osal/rt-nil', '-I../../modules/ChibiOS/os/rt/include', '-I../../modules/ChibiOS/os/oslib/include', '-I../../modules/ChibiOS/os/common/ports/ARM-common', '-I../../modules/ChibiOS/os/common/ports/ARMv7-M', '-I../../modules/ChibiOS/os/hal/lib/streams', '-I../../libraries/AP_HAL_ChibiOS/hwdef/common', '-I../../modules/CrashDebug/CrashCatcher/include', '-DAP_CUSTOMCONTROL_ENABLED=0', '-DAP_DDS_ENABLED=0', '-DAP_SCRIPTING_CHECKS=1', '-DAP_SIM_ENABLED=0', '-DCANARD_ENABLE_CANFD=1', '-DCANARD_IFACE_ALL=3', '-DCONFIG_HAL_BOARD=HAL_BOARD_CHIBIOS', '-DENABLE_HEAP=1', '-DENABLE_ONVIF=0', '-DHAVE_STD_NULLPTR_T=0', '-DLUA_32BITS=1', '-DUSE_LIBC_REALLOC=0', '-DDRONECAN_CXX_WRAPPERS=1', '-DUSE_USER_HELPERS=1', '-DCANARD_ENABLE_DEADLINE=1', '-DCANARD_MULTI_IFACE=1', '-DCANARD_ALLOCATE_SEM=1', '../../libraries/AC_AttitudeControl/AC_PosControl_Logging.cpp', '-c', '-olibraries/AC_AttitudeControl/AC_PosControl_Logging.cpp.0.o']