Can't build properly,report error-"libuavcan_dsdlc: error: the following arguments are required: source_dir"

after i cloning the code to my local with WSL,and configuring the Build Enviroment.i execute “./waf copter”.it occurs some errors.

error info as follows:
[ 4/10] Creating build/CubeBlack/modules/ChibiOS/include_dirs
[ 7/10] Running uavcangen
usage: libuavcan_dsdlc [-h] [–verbose] [–outdir OUTDIR] [–incdir INCDIR]
source_dir [source_dir …]
libuavcan_dsdlc: error: the following arguments are required: source_dir

uavcangen returned 2 error code
/root/workspace/01_code/01_ardupilot/ardupilot/libraries/AP_HAL_ChibiOS/hwdef/common/chibios_board.mk:109: …/.y
make: *** No rule to make target ‘…/…/modules/ChibiOS/os/various/fatfs_bindings/fatfs.mk’. Stop.
/root/workspace/01_code/01_ardupilot/ardupilot/libraries/AP_HAL_ChibiOS/hwdef/common/chibios_board.mk:109: …/.y
make: *** No rule to make target ‘…/…/modules/ChibiOS/os/various/fatfs_bindings/fatfs.mk’. Stop.

Waf: Leaving directory `/root/workspace/01_code/01_ardupilot/ardupilot/build/CubeBlack’
Build failed
→ task in ‘uavcan’ failed (exit status 2):
{task 140667792504640: uavcangen → }
(run with -v to display more information)
→ task in ‘/root/workspace/01_code/01_ardupilot/ardupilot/build/CubeBlack/modules/ChibiOS/include_dirs’ faile
{task 140667791797152: /root/workspace/01_code/01_ardupilot/ardupilot/build/CubeBlack/modules/ChibiOS/i
(run with -v to display more information)

by the way ,i did"git subomdule update --init --recursive" and “Tools/environment_install/install-prereqs-ubuntu.sh -y”

this is my fisrt time build the code.

any give some suggestions?

anyone gives some suggestions?

i check branch to Copter-4.1 with comand “git checkout Copter-4.1”,then execute “./waf configure --board CubeBlack” and “./waf copter” again.
it occurs dronecan.dsdl.common.DsdlException: OS error in [/root/workspace/01_code/01_ardupilot/ardupilot/modules/uavcan/ libuavcan/dsdl_compiler/pyuavcan/dronecan/…/…/…/…/…/DroneCAN/DSDL/uavcan]: [Errno 2] No such file or directory: ‘/root/workspace/01_code/01_ardupilot/ardupilot/modules/uavcan/libuavcan/dsdl_compiler/pyuavcan/dronecan/…/…/…/…/…/DroneCAN/DSDL/uavcan’

but when i execute “git submodule update --init --recursive”, nothing happens.

You forgot to do ./waf clean. This is the correct order:

git checkout Copter-4.1
git submodule update --init --recursive
./waf clean
./waf configure --board CubeBlack
./waf copter
1 Like

yes,it’s works.tks a lot.