Custom compile Copter 4.1.2 specific version

I want to custom compile the 4.1.2 version of Ardupilot for Copter. I’m new to using github.
when i did “git clone --recursive GitHub - ArduPilot/ardupilot: ArduPlane, ArduCopter, ArduRover, ArduSub source” and build the code in ubuntu its works.
But i need 4.1.2 version so i tried to use “git checkout Copter-4.1.2” this command after download. But it didnt worked i get eror when im using configure code. Can you help

root@DESKTOP-G4Q82DL:/mnt/c/ardupilot_deneme5/ardupilot# python3 ./waf configure --board CubeOrange
Setting top to : /mnt/c/ardupilot_deneme5/ardupilot
Setting out to : /mnt/c/ardupilot_deneme5/ardupilot/build
Autoconfiguration : enabled
Setting board to : CubeOrange
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
CXX Compiler : g++ 10.3.1
Checking for program ‘make’ : /usr/bin/make
Checking for program ‘arm-none-eabi-objcopy’ : /usr/bin/arm-none-eabi-objcopy
Adding environment OPTIMIZE -O2
Setup for MCU STM32H743xx
Writing hwdef setup in /mnt/c/ardupilot_deneme5/ardupilot/build/CubeOrange/hwdef.h
MCU Flags: cortex-m7 [‘-mcpu=cortex-m7’, ‘-mfpu=fpv5-d16’, ‘-mfloat-abi=hard’]
Writing DMA map
Generating ldscript.ld
Default parameters path from hwdef: /mnt/c/ardupilot_deneme5/ardupilot/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/defaults.parm
Checking for env.py
env set OPTIMIZE=-O2
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 BOARD_FLASH_SIZE=2048
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=140
env set APJ_BOARD_TYPE=STM32H743xx
env set USBID=0x2dae/0x1016
env set BOOTLOADER_EMBED=1
env set FLASH_RESERVE_START_KB=128
env set FLASH_TOTAL=1966080
env set DEFAULT_PARAMETERS=/mnt/c/ardupilot_deneme5/ardupilot/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/defaults.parm
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
Traceback (most recent call last):
File “/mnt/c/ardupilot_deneme5/ardupilot/modules/waf/waflib/Scripting.py”, line 158, in waf_entry_point
run_commands()
File “/mnt/c/ardupilot_deneme5/ardupilot/modules/waf/waflib/Scripting.py”, line 251, in run_commands
ctx = run_command(cmd_name)
File “/mnt/c/ardupilot_deneme5/ardupilot/modules/waf/waflib/Scripting.py”, line 235, in run_command
ctx.execute()
File “/mnt/c/ardupilot_deneme5/ardupilot/modules/waf/waflib/Configure.py”, line 159, in execute
super(ConfigurationContext, self).execute()
File “/mnt/c/ardupilot_deneme5/ardupilot/modules/waf/waflib/Context.py”, line 204, in execute
self.recurse([os.path.dirname(g_module.root_path)])
File “/mnt/c/ardupilot_deneme5/ardupilot/modules/waf/waflib/Context.py”, line 286, in recurse
user_function(self)
File “/mnt/c/ardupilot_deneme5/ardupilot/wscript”, line 335, in configure
cfg.get_board().configure(cfg)
File “/mnt/c/ardupilot_deneme5/ardupilot/Tools/ardupilotwaf/boards.py”, line 45, in configure
self.configure_env(cfg, env)
File “/mnt/c/ardupilot_deneme5/ardupilot/Tools/ardupilotwaf/boards.py”, line 605, in configure_env
cfg.load(‘chibios’)
File “/mnt/c/ardupilot_deneme5/ardupilot/modules/waf/waflib/Configure.py”, line 270, in load
func(self)
File “/mnt/c/ardupilot_deneme5/ardupilot/Tools/ardupilotwaf/chibios.py”, line 367, in configure
setup_canmgr_build(cfg)
File “/mnt/c/ardupilot_deneme5/ardupilot/Tools/ardupilotwaf/chibios.py”, line 262, in setup_canmgr_build
cfg.srcnode.find_dir(‘modules/uavcan/libuavcan/include’).abspath(),
AttributeError: ‘NoneType’ object has no attribute ‘abspath’

I think you need to update submodules for v4.1.2 using submodule update command.