Build Error [ task in 'ChibiOS_lib' failed (exit status 2): ]

I am using Manjaro to build ArduCopter 3.6.1. I am able to build successfully using SITL board option. But when I tried to build for FMUV3 I get the following error.

Output of
'./waf configure --board fmuv3 ’

[jose@jose ardupilot]$ ./waf configure --board fmuv3
Setting top to                           : /home/jose/Marian/Personal/Drone/Code/UAV/Projects/NPNT/ardupilot 
Setting out to                           : /home/jose/Marian/Personal/Drone/Code/UAV/Projects/NPNT/ardupilot/build 
Autoconfiguration                        : enabled 
Setting board to                         : fmuv3 
Using toolchain                          : arm-none-eabi 
Checking for 'g++' (C++ compiler)        : /usr/bin/arm-none-eabi-g++ 
Checking for 'gcc' (C compiler)          : /usr/bin/arm-none-eabi-gcc 
Checking for c flags '-MMD'              : yes 
Checking for cxx flags '-MMD'            : yes 
Checking for program 'make'              : /usr/bin/make 
Checking for program 'arm-none-eabi-objcopy' : /usr/bin/arm-none-eabi-objcopy 
Setup for MCU STM32F427xx
Writing hwdef setup in /home/jose/Marian/Personal/Drone/Code/UAV/Projects/NPNT/ardupilot/build/fmuv3/hwdef.h
Writing DMA map
Generating ldscript.ld
Checking for env.py
env set HAL_WITH_UAVCAN=1
env set PROCESS_STACK=0x2000
env set MAIN_STACK=0x400
env set IOMCU_FW=0
env set PERIPH_FW=0
env set BOARD_FLASH_SIZE=2048
env set CPU_FLAGS=['-mcpu=cortex-m4', '-mfpu=fpv4-sp-d16', '-mfloat-abi=hard', '-u_printf_float']
env set APJ_BOARD_ID=9
env set APJ_BOARD_TYPE=STM32F427xx
env set USBID=0x0483/0x5740
env set FLASH_RESERVE_START_KB=16
env set CHIBIOS_BUILD_FLAGS=USE_FATFS=yes CHIBIOS_STARTUP_MK=os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk CHIBIOS_PLATFORM_MK=os/hal/ports/STM32/STM32F4xx/platform.mk MCU=cortex-m4 ENV_UDEFS=-DCHPRINTF_USE_FLOAT=1
Enabling ChibiOS asserts                     : no 
Checking for intelhex module:                : disabled 
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 
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 3.8.1 
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 3.8.1 
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'      : /usr/bin/arm-none-eabi-size 
Benchmarks                                     : disabled 
Unit tests                                     : disabled 
Scripting                                      : enabled 
Scripting runtime checks                       : enabled 
Checking for program 'rsync'                   : /usr/bin/rsync 
'configure' finished successfully (0.368s)

Output of
‘./waf copter’

Waf: Entering directory `/home/jose/Marian/Personal/Drone/Code/UAV/Projects/NPNT/ardupilot/build/fmuv3'
Embedding file sandbox.lua:libraries/AP_Scripting/scripts/sandbox.lua
Embedding file io_firmware.bin:Tools/IO_Firmware/iofirmware_lowpolh.bin
Embedding file bootloader.bin:/home/jose/Marian/Personal/Drone/Code/UAV/Projects/NPNT/ardupilot/Tools/bootloaders/fmuv3_bl.bin
Checking for env.py
env added HAL_WITH_UAVCAN=1
env added PROCESS_STACK=0x2000
env added MAIN_STACK=0x400
env added IOMCU_FW=0
env added PERIPH_FW=0
env added BOARD_FLASH_SIZE=2048
env appended CPU_FLAGS=['-mcpu=cortex-m4', '-mfpu=fpv4-sp-d16', '-mfloat-abi=hard', '-u_printf_float']
env added APJ_BOARD_ID=9
env added APJ_BOARD_TYPE=STM32F427xx
env added USBID=0x0483/0x5740
env added FLASH_RESERVE_START_KB=16
env added CHIBIOS_BUILD_FLAGS=USE_FATFS=yes CHIBIOS_STARTUP_MK=os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk CHIBIOS_PLATFORM_MK=os/hal/ports/STM32/STM32F4xx/platform.mk MCU=cortex-m4 ENV_UDEFS=-DCHPRINTF_USE_FLOAT=1
[8/8] Linking build/fmuv3/modules/ChibiOS/libch.a
[1/102] ChibiOS: Compiling vectors.S
[2/102] ChibiOS: Compiling chcoreasm_v7m.S
[3/102] ChibiOS: Compiling ff.c
[4/102] ChibiOS: Compiling ffunicode.c
[5/102] ChibiOS: Compiling chcore.c
[6/102] ChibiOS: Compiling chcore_v7m.c
[7/102] ChibiOS: Compiling crt1.c
[8/102] ChibiOS: Compiling chprintf.c
[9/102] ChibiOS: Compiling memstreams.c
[10/102] ChibiOS: Compiling nullstreams.c
[11/102] ChibiOS: Compiling osal.c
[12/102] ChibiOS: Compiling hal_adc_lld.c

In file included from ../../modules/ChibiOS/os/common/ports/ARMCMx/compilers/GCC/chtypes.h:32,
                 from ../../modules/ChibiOS/os/rt/include/ch.h:105,
                 from ../../libraries/AP_HAL_ChibiOS/hwdef/common/ffconf.h:4,
                 from ../../modules/ChibiOS/ext/fatfs/src/ff.h:30,
                 from ../../modules/ChibiOS/ext/fatfs/src/ff.c:22:
/usr/lib/gcc/arm-none-eabi/9.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
make: *** [../../libraries/AP_HAL_ChibiOS/hwdef/common/chibios_common.mk:233: modules/ChibiOS/obj/ff.o] Error 1
make: *** Waiting for unfinished jobs....
../../modules/ChibiOS/os/hal/lib/streams/memstreams.c:26:10: fatal error: string.h: No such file or directory
   26 | #include <string.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from ../../modules/ChibiOS/os/common/ports/ARMCMx/compilers/GCC/chtypes.h:32,
                 from ../../modules/ChibiOS/os/rt/include/ch.h:105,
                 from ../../modules/ChibiOS/os/common/ports/ARMCMx/chcore_v7m.c:28:
/usr/lib/gcc/arm-none-eabi/9.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
make: *** [../../libraries/AP_HAL_ChibiOS/hwdef/common/chibios_common.mk:233: modules/ChibiOS/obj/memstreams.o] Error 1
make: *** [../../libraries/AP_HAL_ChibiOS/hwdef/common/chibios_common.mk:233: modules/ChibiOS/obj/chcore_v7m.o] Error 1
In file included from ../../modules/ChibiOS/os/common/ports/ARMCMx/compilers/GCC/chtypes.h:32,
                 from ../../modules/ChibiOS/os/rt/include/ch.h:105,
                 from ../../modules/ChibiOS/os/common/ports/ARMCMx/chcore.c:28:
/usr/lib/gcc/arm-none-eabi/9.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
In file included from ../../modules/ChibiOS/os/common/startup/ARMCMx/compilers/GCC/crt1.c:25:
/usr/lib/gcc/arm-none-eabi/9.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
make: *** [../../libraries/AP_HAL_ChibiOS/hwdef/common/chibios_common.mk:234: modules/ChibiOS/obj/chcore.o] Error 1
make: *** [../../libraries/AP_HAL_ChibiOS/hwdef/common/chibios_common.mk:234: modules/ChibiOS/obj/crt1.o] Error 1
In file included from ../../modules/ChibiOS/os/common/ports/ARMCMx/compilers/GCC/chtypes.h:32,
                 from ../../modules/ChibiOS/os/rt/include/ch.h:105,
                 from ../../libraries/AP_HAL_ChibiOS/hwdef/common/ffconf.h:4,
                 from ../../modules/ChibiOS/ext/fatfs/src/ff.h:30,
                 from ../../modules/ChibiOS/ext/fatfs/src/ffunicode.c:26:
/usr/lib/gcc/arm-none-eabi/9.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
make: *** [../../libraries/AP_HAL_ChibiOS/hwdef/common/chibios_common.mk:234: modules/ChibiOS/obj/ffunicode.o] Error 1
In file included from ../../modules/ChibiOS/os/hal/osal/rt/osal.h:29,
                 from ../../modules/ChibiOS/os/hal/include/hal.h:28,
                 from ../../modules/ChibiOS/os/hal/lib/streams/chprintf.c:31:
/usr/lib/gcc/arm-none-eabi/9.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
make: *** [../../libraries/AP_HAL_ChibiOS/hwdef/common/chibios_common.mk:234: modules/ChibiOS/obj/chprintf.o] Error 1
In file included from ../../modules/ChibiOS/os/hal/osal/rt/osal.h:29,
                 from ../../modules/ChibiOS/os/hal/osal/rt/osal.c:25:
/usr/lib/gcc/arm-none-eabi/9.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
make: *** [../../libraries/AP_HAL_ChibiOS/hwdef/common/chibios_common.mk:234: modules/ChibiOS/obj/osal.o] Error 1
In file included from ../../modules/ChibiOS/os/hal/osal/rt/osal.h:29,
                 from ../../modules/ChibiOS/os/hal/include/hal.h:28,
                 from ../../modules/ChibiOS/os/hal/lib/streams/nullstreams.c:26:
/usr/lib/gcc/arm-none-eabi/9.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
make: *** [../../libraries/AP_HAL_ChibiOS/hwdef/common/chibios_common.mk:234: modules/ChibiOS/obj/nullstreams.o] Error 1
In file included from ../../modules/ChibiOS/os/hal/osal/rt/osal.h:29,
                 from ../../modules/ChibiOS/os/hal/include/hal.h:28,
                 from ../../modules/ChibiOS/os/hal/ports/STM32/LLD/ADCv2/hal_adc_lld.c:25:
/usr/lib/gcc/arm-none-eabi/9.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
make: *** [../../libraries/AP_HAL_ChibiOS/hwdef/common/chibios_common.mk:234: modules/ChibiOS/obj/hal_adc_lld.o] Error 1

Waf: Leaving directory `/home/jose/Marian/Personal/Drone/Code/UAV/Projects/NPNT/ardupilot/build/fmuv3'
Build failed
 -> task in 'ChibiOS_lib' failed (exit status 2): 
	{task 139692471087504: ChibiOS_lib hwdef.h,include_dirs,board.c,board.h,bouncebuffer.c,bouncebuffer.h,chconf.h,ffconf.h,flash.c,flash.h,halconf.h,hrt.c,hrt.h,malloc.c,mcuconf.h,ppm.h,spi_hook.h,stdio.h,stm32_util.c,stm32_util.h,stm32f1_mcuconf.h,stm32f3_mcuconf.h,stm32f47_mcuconf.h,stm32h7_mcuconf.h,stubs.c,usbcfg.c,usbcfg.h,usbcfg_common.c,usbcfg_dualcdc.c,watchdog.c,watchdog.h,chibios_board.mk,chibios_common.mk,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,hwdef.h,stm32h7_mcuconf.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,buzzer.c,buzzer.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,board.c,board.h,hal.h,hal_adc.h,hal_buffers.h,hal_can.h,hal_channels.h,hal_crypto.h,hal_dac.h,hal_eicu.h,hal_files.h,hal_gpt.h,hal_i2c.h,hal_i2s.h,hal_icu.h,hal_ioblock.h,hal_mac.h,hal_mii.h,hal_mmc_spi.h,hal_mmcsd.h,hal_objects.h,hal_pal.h,hal_persistent.h,hal_pwm.h,hal_queues.h,hal_rtc.h,hal_sdc.h,hal_serial.h,hal_serial_usb.h,hal_sio.h,hal_spi.h,hal_st.h,hal_streams.h,hal_trng.h,hal_uart.h,hal_usb.h,hal_usb_cdc.h,hal_wdg.h,hal_wspi.h,hal_mfs.c,hal_mfs.h,hal_flash_device.c,hal_flash_device.h,hal_flash_device.c,hal_flash_device.h,hal_serial_nor.c,hal_serial_nor.h,hal_i2c_lld.c,hal_i2c_lld.h,hal_displays.h,hal_flash.c,hal_flash.h,hal_accelerometer.h,hal_barometer.h,hal_compass.h,hal_gyroscope.h,hal_hygrometer.h,hal_sensors.h,hal_thermometer.h,chprintf.c,chprintf.h,memstreams.c,memstreams.h,nullstreams.c,nullstreams.h,osal_vt.c,osal_vt.h,osal.c,osal.h,osal.c,osal.h,osal.c,osal.h,osal.c,osal.h,avr_pins.h,avr_timers.h,hal_lld.c,hal_lld.h,hal_adc_lld.c,hal_adc_lld.h,hal_ext_lld.c,hal_ext_lld.h,hal_pal_lld.c,hal_pal_lld.h,hal_i2c_lld.c,hal_i2c_lld.h,hal_spi_lld.c,hal_spi_lld.h,hal_gpt_lld.c,hal_gpt_lld.h,hal_icu_lld.c,hal_icu_lld.h,hal_pwm_lld.c,hal_pwm_lld.h,hal_st_lld.c,hal_st_lld.h,hal_serial_lld.c,hal_serial_lld.h,hal_usb_lld.c,hal_usb_lld.h,hal_lld.c,hal_lld.h,hal_pal_lld.c,hal_pal_lld.h,hal_st_lld.c,hal_st_lld.h,hal_uart_lld.c,hal_uart_lld.h,avr_pins.h,avr_timers.h,hal_lld.c,hal_lld.h,hal_crypto_lld.c,hal_crypto_lld.h,hal_dac_lld.c,hal_dac_lld.h,xmega_dma_lld.c,xmega_dma_lld.h,hal_pal_lld.c,hal_pal_lld.h,hal_spi_lld.c,hal_spi_lld.h,hal_st_lld.c,hal_st_lld.h,hal_serial_lld.c,hal_serial_lld.h,hal_uart_lld.c,hal_uart_lld.h,hal_wdg_lld.c,hal_wdg_lld.h,hal_lld.c,hal_lld.h,hal_pal_lld.c,hal_pal_lld.h,hal_serial_lld.c,hal_serial_lld.h,hal_spi_lld.c,hal_spi_lld.h,hal_st_lld.c,hal_st_lld.h,vic.c,vic.h,sama_aes_lld.c,sama_aes_lld.h,sama_crypto_lld.c,sama_crypto_lld.h,sama_gcm_lld.c,sama_gcm_lld.h,sama_sha_lld.c,sama_sha_lld.h,sama_tdes_lld.c,sama_tdes_lld.h,sama_xdmac.c,sama_xdmac.h,hal_i2c_lld.c,hal_i2c_lld.h,hal_mac_lld.c,hal_mac_lld.h,hal_pal_lld.c,hal_pal_lld.h,hal_trng_lld.c,hal_trng_lld.h,hal_rtc_lld.c,hal_rtc_lld.h,ch_sdmmc.c,ch_sdmmc.h,ch_sdmmc_cmds.c,ch_sdmmc_cmds.h,ch_sdmmc_device.c,ch_sdmmc_device.h,ch_sdmmc_macros.h,ch_sdmmc_mmc.c,ch_sdmmc_mmc.h,ch_sdmmc_sama5d2.h,ch_sdmmc_sd.c,ch_sdmmc_sd.h,ch_sdmmc_sdio.c,ch_sdmmc_sdio.h,ch_sdmmc_trace.h,sama_sdmmc_conf.h,sama_sdmmc_lld.c,sama_sdmmc_lld.h,hal_spi_lld.c,hal_spi_lld.h,hal_serial_lld.c,hal_serial_lld.h,hal_uart_lld.c,hal_uart_lld.h,hal_wdg_lld.c,hal_wdg_lld.h,hal_crypto_lld.c,hal_crypto_lld.h,hal_lld.c,hal_lld.h,hal_st_lld.c,hal_st_lld.h,hal_tc_lld.c,hal_tc_lld.h,sama_aic.c,sama_aic.h,sama_cache.c,sama_cache.h,sama_classd.c,sama_classd.h,sama_lcdc.c,sama_lcdc.h,sama_matrix.c,sama_matrix.h,sama_onewire.c,sama_onewire.h,sama_pmc.h,sama_registry.h,sama_rstc.h,sama_secumod.c,sama_secumod.h,sama_tc_lld.c,sama_tc_lld.h,hal_spi_lld.c,hal_spi_lld.h,spc5_dspi.h,spc5_edma.c,spc5_edma.h,hal_serial_lld.c,hal_serial_lld.h,hal_serial_lld.c,hal_serial_lld.h,spc5_linflex.h,hal_pal_lld.c,hal_pal_lld.h,hal_pal_lld.c,hal_pal_lld.h,hal_st_lld.c,hal_st_lld.h,hal_lld.c,hal_lld.h,registers.h,spc5_registry.h,typedefs.h,xpc560bc.h,hal_lld.c,hal_lld.h,registers.h,spc5_registry.h,typedefs.h,xpc560b.h,hal_lld.c,hal_lld.h,registers.h,spc5_registry.h,typedefs.h,xpc560d.h,hal_lld.c,hal_lld.h,registers.h,spc5_registry.h,typedefs.h,xpc560p.h,hal_lld.c,hal_lld.h,registers.h,spc5_registry.h,typedefs.h,xpc563m.h,hal_lld.c,hal_lld.h,registers.h,spc5_registry.h,typedefs.h,xpc564a.h,hal_lld.c,hal_lld.h,registers.h,spc5_registry.h,typedefs.h,xpc56ec.h,hal_lld.c,hal_lld.h,registers.h,spc5_registry.h,typedefs.h,xpc56el.h,hal_adc_lld.c,hal_adc_lld.h,hal_adc_lld.c,hal_adc_lld.h,hal_adc_lld.c,hal_adc_lld.h,hal_adc_lld.c,hal_adc_lld.h,stm32_bdma.c,stm32_bdma.h,hal_can_lld.c,hal_can_lld.h,hal_crypto_lld.c,hal_crypto_lld.h,hal_dac_lld.c,hal_dac_lld.h,stm32_dma.c,stm32_dma.h,stm32_dma.c,stm32_dma.h,stm32_exti.c,stm32_exti.h,hal_pal_lld.c,hal_pal_lld.h,hal_pal_lld.c,hal_pal_lld.h,stm32_gpio.h,hal_pal_lld.c,hal_pal_lld.h,stm32_gpio.h,hal_i2c_lld.c,hal_i2c_lld.h,hal_i2c_lld.c,hal_i2c_lld.h,hal_i2c_lld.c,hal_i2c_lld.h,hal_mac_lld.c,hal_mac_lld.h,hal_wspi_lld.c,hal_wspi_lld.h,hal_usb_lld.c,hal_usb_lld.h,stm32_otg.h,hal_wspi_lld.c,hal_wspi_lld.h,hal_trng_lld.c,hal_trng_lld.h,hal_rtc_lld.c,hal_rtc_lld.h,hal_rtc_lld.c,hal_rtc_lld.h,hal_sdc_lld.c,hal_sdc_lld.h,hal_sdc_lld.c,hal_sdc_lld.h,hal_sdc_lld.c,hal_sdc_lld.h,hal_i2s_lld.c,hal_i2s_lld.h,hal_spi_lld.c,hal_spi_lld.h,hal_i2s_lld.c,hal_i2s_lld.h,hal_spi_lld.c,hal_spi_lld.h,hal_spi_lld.c,hal_spi_lld.h,hal_eicu_lld.c,hal_eicu_lld.h,hal_gpt_lld.c,hal_gpt_lld.h,hal_icu_lld.c,hal_icu_lld.h,hal_pwm_lld.c,hal_pwm_lld.h,hal_st_lld.c,hal_st_lld.h,stm32_tim.h,hal_serial_lld.c,hal_serial_lld.h,hal_uart_lld.c,hal_uart_lld.h,hal_serial_lld.c,hal_serial_lld.h,hal_uart_lld.c,hal_uart_lld.h,hal_usb_lld.c,hal_usb_lld.h,stm32_usb.h,hal_wdg_lld.c,hal_wdg_lld.h,hal_lld.c,hal_lld.h,stm32_isr.c,stm32_isr.h,stm32_rcc.h,stm32_registry.h,hal_adc_lld.c,hal_adc_lld.h,hal_lld.c,hal_lld.h,hal_lld_f100.h,hal_lld_f103.h,hal_lld_f105_f107.h,stm32_isr.c,stm32_isr.h,stm32_rcc.h,stm32_registry.h,hal_adc_lld.c,hal_adc_lld.h,hal_lld.c,hal_lld.h,stm32_isr.c,stm32_isr.h,stm32_rcc.h,stm32_registry.h,hal_lld.c,hal_lld.h,stm32_isr.c,stm32_isr.h,stm32_rcc.h,stm32_registry.h,hal_lld.c,hal_lld.h,hal_lld_type1.h,hal_lld_type2.h,stm32_isr.c,stm32_isr.h,stm32_rcc.h,stm32_registry.h,hal_lld.c,hal_lld.h,stm32_isr.c,stm32_isr.h,stm32_rcc.h,stm32_registry.h,hal_lld.c,hal_lld.h,stm32_dmamux.h,stm32_isr.c,stm32_isr.h,stm32_rcc.h,stm32_registry.h,hal_lld.c,hal_lld.h,stm32_isr.c,stm32_isr.h,stm32_rcc.h,stm32_registry.h,hal_adc_lld.c,hal_adc_lld.h,hal_lld.c,hal_lld.h,stm32_isr.c,stm32_isr.h,stm32_rcc.h,stm32_registry.h,hal_lld.c,hal_lld.h,stm32_isr.c,stm32_isr.h,stm32_rcc.h,stm32_registry.h,hal_lld.c,hal_lld.h,stm32_dmamux.h,stm32_isr.c,stm32_isr.h,stm32_rcc.h,stm32_registry.h,cache.h,mpu_v7m.h,nvic.c,nvic.h,console.c,console.h,hal_pal_lld.c,hal_pal_lld.h,hal_st_lld.c,hal_st_lld.h,hal_lld.c,hal_lld.h,hal_serial_lld.c,hal_serial_lld.h,hal_lld.c,hal_lld.h,hal_serial_lld.c,hal_serial_lld.h,hal.c,hal_adc.c,hal_buffers.c,hal_can.c,hal_crypto.c,hal_dac.c,hal_eicu.c,hal_gpt.c,hal_i2c.c,hal_i2s.c,hal_icu.c,hal_mac.c,hal_mmc_spi.c,hal_mmcsd.c,hal_pal.c,hal_pwm.c,hal_queues.c,hal_rtc.c,hal_sdc.c,hal_serial.c,hal_serial_usb.c,hal_sio.c,hal_spi.c,hal_st.c,hal_trng.c,hal_uart.c,hal_usb.c,hal_wdg.c,hal_wspi.c,board.c,board.h,hal_adc_lld.c,hal_adc_lld.h,hal_can_lld.c,hal_can_lld.h,hal_crypto_lld.c,hal_crypto_lld.h,hal_dac_lld.c,hal_dac_lld.h,hal_gpt_lld.c,hal_gpt_lld.h,hal_i2c_lld.c,hal_i2c_lld.h,hal_i2s_lld.c,hal_i2s_lld.h,hal_icu_lld.c,hal_icu_lld.h,hal_lld.c,hal_lld.h,hal_mac_lld.c,hal_mac_lld.h,hal_pal_lld.c,hal_pal_lld.h,hal_pwm_lld.c,hal_pwm_lld.h,hal_rtc_lld.c,hal_rtc_lld.h,hal_sdc_lld.c,hal_sdc_lld.h,hal_serial_lld.c,hal_serial_lld.h,hal_sio_lld.c,hal_sio_lld.h,hal_spi_lld.c,hal_spi_lld.h,hal_st_lld.c,hal_st_lld.h,hal_trng_lld.c,hal_trng_lld.h,hal_uart_lld.c,hal_uart_lld.h,hal_usb_lld.c,hal_usb_lld.h,hal_wdg_lld.c,hal_wdg_lld.h,hal_wspi_lld.c,hal_wspi_lld.h,halconf.h,mcuconf.h,osal.c,osal.h,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,board.mk,hal.mk,hal_mfs.mk,hal_flash_device.mk,hal_flash_device.mk,streams.mk,osal.mk,osal.mk,osal.mk,osal.mk,platform.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,platform.mk,driver.mk,driver.mk,driver.mk,platform.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,platform.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,platform.mk,platform.mk,platform.mk,platform.mk,platform.mk,platform.mk,platform.mk,platform.mk,platform.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,driver.mk,platform.mk,platform.mk,platform_f105_f107.mk,platform.mk,platform.mk,platform.mk,platform.mk,platform.mk,platform.mk,platform.mk,platform.mk,platform_l432.mk,platform.mk,platform.mk,platform.mk,board.mk,osal.mk,platform.mk,ap_romfs_embedded.h -> libch.a}
 (run with -v to display more information)

I followed the tutorial on the ardupilot developer’s page and install the mentioned gcc-arm libraries, but still no luck.

Any help is much appreciated.

That is a know issue with gcc 9.2.0 and ardupilot.
There are 2 solutions:

  1. Do not compile ardcopter 3.6.1. It is very old, compile Arducopter 4.0.0 instead.
  2. Do not use gcc 9.2.0. Downgrade to gcc 6.3.1 and compile arducopter 3.6.12 instead
1 Like

Apologies for the delayed reply.

I switched to Copter-4.0 branch and the above issue got solved. I also just discovered that there is an install script meant specifically for Arch Linux.

./Tools/environment_install/install-prereqs-arch.sh

and by running that I was able to work with both Copter-4.0 and master.

Thank you @amilcarlucas

I got the similar error on ubuntu, I think this error because of the complier, for copter 3.6.x need gcc-arm-none-eabi-4_9-2015q3, for copter 4.0 or higher need gcc-arm-none-eabi-6-2017-q2-update. check your $PATH configure in ~/.profile. chose the right compiler. hope this will help.