Compile problem STM32

Hi,
Does someone know how to fix this:

ardupilot@89c18e6905b4:/ardupilot/ardupilot$ ./waf configure --board Pixhawk1
ardupilot@89c18e6905b4:/ardupilot/ardupilot$ ./waf copter
Waf: Entering directory /ardupilot/ardupilot/build/Pixhawk1' Embedding file bootloader.bin:/ardupilot/ardupilot/Tools/bootloaders/Pixhawk1_bl.bin Embedding file io_firmware.bin:Tools/IO_Firmware/iofirmware_lowpolh.bin Embedding file sandbox.lua:libraries/AP_Scripting/scripts/sandbox.lua 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', '-DARM_MATH_CM4', '-u_printf_float'] env added CORTEX=cortex-m4 env added APJ_BOARD_ID=9 env added APJ_BOARD_TYPE=STM32F427xx env added USBID=0x1209/0x5741 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 Waf: Leaving directory /ardupilot/ardupilot/build/Pixhawk1’
Build failed
Traceback (most recent call last):
File “/ardupilot/ardupilot/modules/waf/waflib/Runner.py”, line 395, in task_status
return tsk.runnable_status()
File “/ardupilot/ardupilot/Tools/ardupilotwaf/git_submodule.py”, line 90, in runnable_status
if not self.is_fast_forward(path):
File “/ardupilot/ardupilot/Tools/ardupilotwaf/git_submodule.py”, line 68, in is_fast_forward
out = bld.cmd_and_log(cmd, quiet=Context.BOTH, cwd=cwd)
File “/ardupilot/ardupilot/modules/waf/waflib/Context.py”, line 461, in cmd_and_log
raise e
waflib.Errors.WafError: Command (‘/usr/bin/git’, ‘merge-base’, ‘66e5de0d4221666cfa7db7e7247f53de9be7fedc’, ‘d4fce84ef74b051f488a05dcee38f2bec52a4e15’) returned 1

I don’t know whether what I did will work for other people, and i don’t have a complete understanding of the situation, but I had a similar error message and I’ll describe how I got past it.

My situation is that I forked Ardupilot 3.6 a few years ago and have been developing. Recently I migrated from a Mac to a PC and had to set up my development environment again. What I found is that the git hash numbers at the bottom of the output were in a particular submodule; waf is struggling with git commits in a submodule. To get past it I went into the submodule in question, I think it was Chibios, and checked out the commit I had been using on the Mac.

If this is your first time compiling I’d suggest checking that your submodules are set up.