Error building secured firmware

I am trying to build a secured firmware for CubeOrangePlus.

I run a command: Tools/scripts/build_bootloaders.py CubeOrangePlus --signing-key=NAME_public_key.dat

error:

…/…/libraries/AP_HAL_ChibiOS/GPIO.cpp: In function ‘void __static_initialization_and_destruction_0(int, int)’:
…/…/libraries/AP_HAL_ChibiOS/GPIO.cpp:54:3: error: statement has no effect [-Werror=unused-value]
54 | } _gpio_tab = HAL_GPIO_PINS;
| ^~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors

Waf: Leaving directory `/home/sajal_indowings/ardupilot/build/CubeOrangePlus’
Build failed
→ task in ‘objs/AP_HAL_ChibiOS/AP_Bootloader’ failed (exit status 1):
{task 140014587991808: cxx GPIO.cpp → GPIO.cpp.8.o}
(run with -v to display more information)
Build failed: ./waf bootloader
Failed boards: [‘CubeOrangePlus’]

@amilcarlucas can you please help

Welcome to the community,

Which Linux version? Have you checked out the code properly?

Hi @amilcarlucas , I am using Ubuntu 22.04 version(using virtual box).

Code I cloned from GitHub repo GitHub - ArduPilot/ardupilot: ArduPlane, ArduCopter, ArduRover, ArduSub source
I followed all the steps as mentioned in https://github.com/ArduPilot/ardupilot/tree/Rover-4.4/Tools/scripts/signing#readme.