Failed to build an old commit of master branch @15601e4 and cannot install the missing module

My co-worker forked the ardupilot repo on May 15, 2023, and we made some modifications to it based on the master branch (commit @15601e413982d6f362a870d67586e1510c5ad2b1). The code goes well on our lab computer, but when I recently try to build on a new computer to make it open source, the compilation failed.

I tried our repo (GitHub - Sheng-Cheng/ardupilot at ACRL-master-L1AC) at the last official commit @15601e4, and also tried the official ardupilot and git checkout to the commit @15601e4, both resulting in the same error. However, when I tried an old version of branch Copter-4.4 @74c790cfc2d601548dc7005c2ab135bd9cb6a4ab, it builds successfully after ./waf clean.

Both the working lab computer and the new computer are using Ubuntu 20.04 with the default python 3.8.

My steps are as follows:
First clone the official ardupilot, go to the old commit, update submodule and prepare for testing.

$ git clone https://github.com/ArduPilot/ardupilot
$ cd ardupilot
$ git checkout 15601e413982d6f362a870d67586e1510c5ad2b1
$ git submodule update --init --recursive
$ Tools/environment_install/install-prereqs-ubuntu.sh -y
$ . ~/.profile

Then test SITL.

$ cd Tools/autotest/
$ python3 sim_vehicle.py --console -A "--uartF=sim:vicon:" --map -v ArduCopter -f X

The output shows:

cy45@cy45-OptiPlex-SFF-Plus-7010:~/Downloads/ardupilot/Tools/autotest$ python3 sim_vehicle.py --console -A "--uartF=sim:vicon:" --map -v ArduCopter -f X
SIM_VEHICLE: Start
SIM_VEHICLE: Killing tasks
SIM_VEHICLE: Starting up at SITL location
SIM_VEHICLE: WAF build
SIM_VEHICLE: Configure waf
SIM_VEHICLE: "/home/cy45/Downloads/ardupilot/modules/waf/waf-light" "configure" "--board" "sitl"
Setting top to                           : /home/cy45/Downloads/ardupilot 
Setting out to                           : /home/cy45/Downloads/ardupilot/build 
Autoconfiguration                        : enabled 
Checking for program 'python'            : /usr/bin/python 
Checking for python version >= 3.6.9     : 3.8.10 
Setting board to                         : sitl 
Using toolchain                          : native 
Checking for 'g++' (C++ compiler)        : /usr/lib/ccache/g++ 
Checking for 'gcc' (C compiler)          : /usr/lib/ccache/gcc 
Checking for c flags '-MMD'              : yes 
Checking for cxx flags '-MMD'            : yes 
CXX Compiler                             : g++ 10.5.0 
Checking for need to link with librt     : not necessary 
Checking for feenableexcept              : yes 
Enabled OpenDroneID                      : no 
Enabled firmware ID checking             : no 
GPS Debug Logging                        : no 
Enabled custom controller                : yes 
Checking for HAVE_CMATH_ISFINITE         : yes 
Checking for HAVE_CMATH_ISINF            : yes 
Checking for HAVE_CMATH_ISNAN            : yes 
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes 
Checking for NEED_CMATH_ISINF_STD_NAMESPACE    : yes 
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE    : yes 
Checking for header endian.h                   : yes 
Checking for header byteswap.h                 : yes 
Checking for HAVE_MEMRCHR                      : yes 
Configured VSCode Intellisense:                : no 
DC_DSDL compiler                               : /home/cy45/Downloads/ardupilot/modules/DroneCAN/dronecan_dsdlc/dronecan_dsdlc.py 
Source is git repository                       : yes 
Update submodules                              : yes 
Checking for program 'git'                     : /usr/bin/git 
Checking for program 'size'                    : /usr/bin/size 
Benchmarks                                     : disabled 
Unit tests                                     : enabled 
Scripting                                      : enabled 
Scripting runtime checks                       : enabled 
Debug build                                    : disabled 
Coverage build                                 : disabled 
Force 32-bit build                             : disabled 
Checking for program 'rsync'                   : /usr/bin/rsync 
'configure' finished successfully (0.372s)
{'waf_target': 'bin/arducopter', 'default_params_filename': 'default_params/copter.parm', 'extra_mavlink_cmds': 'param fetch frame; param set FRAME 1;', 'model': 'X', 'sitl-port': True}
SIM_VEHICLE: Building
SIM_VEHICLE: "/home/cy45/Downloads/ardupilot/modules/waf/waf-light" "build" "--target" "bin/arducopter"
Waf: Entering directory `/home/cy45/Downloads/ardupilot/build/sitl'
Embedding file locations.txt:Tools/autotest/locations.txt
Embedding file models/Callisto.json:Tools/autotest/models/Callisto.json
Embedding file models/plane-3d.parm:Tools/autotest/models/plane-3d.parm
Embedding file models/plane.parm:Tools/autotest/models/plane.parm
Embedding file models/xplane_heli.json:Tools/autotest/models/xplane_heli.json
Embedding file models/xplane_plane.json:Tools/autotest/models/xplane_plane.json
[3/7] Compiling libraries/AP_Scripting/generator/src/main.c
[4/7] Processing modules/mavlink/message_definitions/v1.0/all.xml
[5/7] Processing dronecangen: modules/DroneCAN/DSDL/ardupilot modules/DroneCAN/DSDL/com modules/DroneCAN/DSDL/cuav modules/DroneCAN/DSDL/dronecan modules/DroneCAN/DSDL/mppt modules/DroneCAN/DSDL/uavcan
[6/7] Creating build/sitl/ap_version.h
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/all.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/all.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/ardupilotmega.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/ardupilotmega.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/ASLUAV.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/ASLUAV.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/common.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/common.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/development.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/development.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/icarous.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/icarous.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/minimal.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/minimal.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/python_array_test.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/python_array_test.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/standard.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/standard.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/test.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/test.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/ualberta.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/ualberta.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/uAvionix.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/uAvionix.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/loweheiser.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/loweheiser.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/storm32.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/storm32.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/AVSSUAS.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/AVSSUAS.xml
Validation skipped for /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/cubepilot.xml.
Parsing /home/cy45/Downloads/ardupilot/modules/mavlink/message_definitions/v1.0/cubepilot.xml
Merged enum MAV_CMD
Merged enum MAV_CMD
Merged enum MAV_CMD
Merged enum MAV_CMD
Merged enum MAV_CMD
Found 332 MAVLink message types in 16 XML files
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/all
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/ardupilotmega
[7/7] Processing /home/cy45/Downloads/ardupilot/build/sitl/libraries/AP_Scripting/lua_generated_bindings.cpp,/home/cy45/Downloads/ardupilot/build/sitl/libraries/AP_Scripting/lua_generated_bindings.h: libraries/AP_Scripting/generator/description/bindings.desc build/sitl/gen-bindings -> build/sitl/libraries/AP_Scripting/lua_generated_bindings.cpp build/sitl/libraries/AP_Scripting/lua_generated_bindings.h
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/ASLUAV
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/common
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/development
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/icarous
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/minimal
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/python_array_test
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/standard
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/test
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/ualberta
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/uAvionix
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/loweheiser
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/storm32
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/AVSSUAS
Generating C implementation in directory /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0/cubepilot
Copying fixed headers for protocol 2.0 to /home/cy45/Downloads/ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0
expanding ardupilot.gnss.MovingBaselineData
expanding ardupilot.gnss.Heading
expanding ardupilot.gnss.RelPosHeading
expanding ardupilot.equipment.proximity_sensor.Proximity
expanding ardupilot.gnss.Status
expanding ardupilot.equipment.power.BatteryInfoAux
expanding ardupilot.indication.NotifyState
expanding ardupilot.indication.Button
expanding ardupilot.indication.SafetyState
expanding dronecan.sensors.hygrometer.Hygrometer
expanding com.hex.equipment.flow.Measurement
expanding com.volz.servo.ActuatorStatus
expanding dronecan.remoteid.SelfID
expanding ardupilot.equipment.trafficmonitor.TrafficReport
expanding com.himark.servo.ServoCmd
expanding dronecan.remoteid.ArmStatus
expanding dronecan.remoteid.OperatorID
expanding dronecan.remoteid.SecureCommand
expanding dronecan.remoteid.BasicID
expanding dronecan.remoteid.System
expanding cuav.equipment.power.CBAT
expanding com.himark.servo.ServoInfo
expanding dronecan.remoteid.Location
expanding uavcan.Timestamp
expanding mppt.OutputEnable
expanding uavcan.CoarseOrientation
expanding uavcan.protocol.Panic
expanding uavcan.protocol.RestartNode
expanding uavcan.protocol.HardwareVersion
expanding uavcan.protocol.GetDataTypeInfo
expanding mppt.Stream
expanding uavcan.protocol.GetTransportStats
expanding uavcan.protocol.CANIfaceStats
expanding uavcan.protocol.GlobalTimeSync
expanding uavcan.protocol.DataTypeKind
expanding uavcan.protocol.debug.LogLevel
expanding uavcan.protocol.SoftwareVersion
expanding uavcan.protocol.debug.KeyValue
expanding uavcan.protocol.debug.LogMessage
expanding uavcan.protocol.NodeStatus
expanding uavcan.protocol.GetNodeInfo
expanding uavcan.protocol.AccessCommandShell
expanding uavcan.protocol.enumeration.Begin
expanding uavcan.protocol.enumeration.Indication
expanding uavcan.protocol.dynamic_node_id.Allocation
expanding uavcan.protocol.dynamic_node_id.server.RequestVote
expanding uavcan.protocol.dynamic_node_id.server.Entry
expanding uavcan.protocol.dynamic_node_id.server.Discovery
expanding uavcan.protocol.dynamic_node_id.server.AppendEntries
expanding uavcan.protocol.param.ExecuteOpcode
expanding uavcan.protocol.param.Empty
expanding uavcan.protocol.file.Path
expanding uavcan.protocol.param.NumericValue
expanding uavcan.equipment.air_data.IndicatedAirspeed
expanding uavcan.protocol.param.Value
expanding uavcan.protocol.file.GetInfo
expanding uavcan.protocol.file.Delete
expanding uavcan.protocol.file.EntryType
expanding uavcan.protocol.file.Read
expanding uavcan.protocol.file.GetDirectoryEntryInfo
expanding uavcan.protocol.file.Write
expanding uavcan.protocol.file.BeginFirmwareUpdate
expanding uavcan.protocol.param.GetSet
expanding uavcan.equipment.hardpoint.Status
expanding uavcan.equipment.hardpoint.Command
expanding uavcan.navigation.GlobalNavigationSolution
expanding uavcan.equipment.air_data.StaticTemperature
expanding uavcan.equipment.air_data.Sideslip
expanding uavcan.equipment.esc.RPMCommand
expanding uavcan.equipment.air_data.RawAirData
expanding uavcan.equipment.air_data.TrueAirspeed
expanding uavcan.equipment.safety.ArmingStatus
expanding uavcan.equipment.air_data.StaticPressure
expanding uavcan.equipment.esc.RawCommand
expanding uavcan.equipment.ahrs.MagneticFieldStrength
expanding uavcan.equipment.air_data.AngleOfAttack
expanding uavcan.equipment.esc.Status
expanding uavcan.equipment.ahrs.MagneticFieldStrength2
expanding uavcan.equipment.power.CircuitStatus
expanding uavcan.equipment.ahrs.RawIMU
expanding uavcan.equipment.power.PrimaryPowerSupplyStatus
expanding uavcan.equipment.power.BatteryInfo
expanding uavcan.protocol.file.Error
expanding uavcan.equipment.gnss.ECEFPositionVelocity
expanding uavcan.equipment.ahrs.Solution
expanding uavcan.equipment.gnss.Fix2
expanding uavcan.equipment.gnss.Auxiliary
expanding uavcan.equipment.gnss.RTCMStream
expanding uavcan.equipment.camera_gimbal.Mode
expanding uavcan.equipment.indication.LightsCommand
expanding uavcan.equipment.indication.RGB565
expanding uavcan.equipment.device.Temperature
expanding uavcan.equipment.camera_gimbal.AngularCommand
expanding uavcan.equipment.camera_gimbal.GEOPOICommand
expanding uavcan.equipment.ice.FuelTankStatus
expanding uavcan.equipment.ice.reciprocating.CylinderStatus
expanding uavcan.equipment.range_sensor.Measurement
expanding uavcan.equipment.camera_gimbal.Status
expanding uavcan.equipment.indication.BeepCommand
expanding uavcan.equipment.indication.SingleLightCommand
expanding uavcan.equipment.actuator.Command
expanding uavcan.equipment.actuator.ArrayCommand
expanding uavcan.equipment.gnss.Fix
expanding uavcan.tunnel.Call
expanding uavcan.equipment.actuator.Status
expanding uavcan.tunnel.Protocol
expanding uavcan.equipment.ice.reciprocating.Status
expanding uavcan.tunnel.Broadcast
expanding uavcan.tunnel.SerialConfig

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/cy45/Downloads/ardupilot/modules/DroneCAN/dronecan_dsdlc/dronecan_dsdlc.py", line 111, in expand_message
    output = em.expand(msg_header_template, get_empy_env_broadcast(msg))
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 5606, in expand
    result = interpreter.expand(data, locals, name, dispatcher=None)
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 4403, in expand
    self.string(data, locals, dispatcher)
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 4552, in string
    while not self.safe(scanner, True, locals, dispatcher):
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 4584, in safe
    if dispatcher():
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 4565, in safe
    return self.parse(scanner, locals)
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 4592, in parse
    token = scanner.one()
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 3893, in one
    token.scan(self)
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 2597, in scan
    self.subscan(scanner, self.type)
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 2613, in subscan
    token = scanner.one()
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 3893, in one
    token.scan(self)
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 2597, in scan
    self.subscan(scanner, self.type)
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 2613, in subscan
    token = scanner.one()
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 3893, in one
    token.scan(self)
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 2597, in scan
    self.subscan(scanner, self.type)
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 2613, in subscan
    token = scanner.one()
  File "/home/cy45/.local/lib/python3.8/site-packages/em.py", line 3889, in one
    raise ParseError("unknown markup sequence: %s%s%s" % (self.config.prefix, first, self.factory.warn(first)))
em.ParseError: unknown markup sequence: @); the `@)` markup has been removed; just use `)` instead
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/cy45/Downloads/ardupilot/modules/DroneCAN/dronecan_dsdlc/dronecan_dsdlc.py", line 187, in <module>
    x = result.get()
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 771, in get
    raise self._value
em.ParseError: unknown markup sequence: @); the `@)` markup has been removed; just use `)` instead

dronecangen returned 1 error code
Waf: Leaving directory `/home/cy45/Downloads/ardupilot/build/sitl'
Build failed
 -> task in 'dronecan' failed (exit status 1): 
        {task 139649002989600: dronecangen ardupilot,com,cuav,dronecan,mppt,uavcan -> }
 (run with -v to display more information)
SIM_VEHICLE: Build failed
SIM_VEHICLE: Killing tasks

I checked both the lab computer and the new computer and find that both of them have the same submodule commits, which also fit the commits listed on the github website.

cy45@cy45-OptiPlex-SFF-Plus-7010:~/Downloads/ardupilot/Tools/autotest$ git status
HEAD detached at 15601e4139
nothing to commit, working tree clean
cy45@cy45-OptiPlex-SFF-Plus-7010:~/Downloads/ardupilot/Tools/autotest$ git submodule status
 a287e67d8b1652025cd0fe9ffa806aeaabd3ec6d ../../modules/ChibiOS (remotes/origin/pr-stable-21.11.3-17-ga287e67d8)
 599965086437137ec0fe66e185611f43f335f889 ../../modules/CrashDebug (heads/master)
 94ea1e98ffbb9d24b6717905e092dba2f211d1a1 ../../modules/DroneCAN/DSDL (94ea1e9)
 ebaf96860a11a4cc43c01df6b651df143c6cde2d ../../modules/DroneCAN/dronecan_dsdlc (remotes/origin/pr-cxx-wrappers-1-gebaf968)
 f9c584fe844af71a840d9b8d915b7a448c394ff6 ../../modules/DroneCAN/libcanard (f9c584f)
 19fdf2e5b383243ccdb1094edae0603cf11469e8 ../../modules/DroneCAN/pydronecan (1.0.16-2-g19fdf2e)
 3d1b17703c7cf4f22def2910bc845bdb5152d7b5 ../../modules/Micro-CDR (heads/master)
 a2937bc5af606b2434e9a841adbf5c003fc1ec38 ../../modules/Micro-XRCE-DDS-Client (remotes/origin/develop-7-ga2937bc)
 d572f4777349d43653b21d6c2fc63020ab326db2 ../../modules/gbenchmark (v1.7.1)
 e1f690585d4803402584962bfaa8240ecaf1db30 ../../modules/gsoap (heads/master)
 c5fed93f941865a0e912e9baf46ded713506590a ../../modules/gtest (release-1.8.0-2268-gc5fed93f)
 9c39822c0f6bef4e7ecb5c4f95979f06c23f763d ../../modules/mavlink (1.0.12-331-g9c39822c)
 1b1625b8e7da6e1307d73335cb995fa8813d5950 ../../modules/waf (waf-1.9.2-731-g1b1625b8)

This confused me a lot. Another thing is that, when I do ./waf clean directly after the above steps, it can be done quickly, but when I try another commit which can work and then switch back to this branch, ./waf clean will tell me a module uavcangen is missing, and I cannot install it.

cy45@cy45-OptiPlex-SFF-Plus-7010:~/Downloads/ardupilot$ ./waf clean
'clean' finished successfully (0.399s)

For example, checkout to the newest Copter-4.4:

$ git checkout Copter-4.4
$ git submodule update --init --recursive
$ cd Tools/autotest/
$ python3 sim_vehicle.py --console -A "--uartF=sim:vicon:" --map -v ArduCopter -f X

The SITL test goes smoothly, and then switch back:

$ git checkout 15601e413982d6f362a870d67586e1510c5ad2b1
$ git submodule update --init --recursive

and then run:

$ ./waf clean

it shows:

cy45@cy45-OptiPlex-SFF-Plus-7010:~/Downloads/ardupilot$ git checkout 15601e413982d6f362a870d67586e1510c5ad2b1
warning: unable to rmdir 'modules/uavcan': Directory not empty
M       modules/ChibiOS
M       modules/DroneCAN/DSDL
M       modules/DroneCAN/dronecan_dsdlc
M       modules/DroneCAN/libcanard
M       modules/mavlink
M       modules/waf
Note: switching to '15601e413982d6f362a870d67586e1510c5ad2b1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 15601e4139 Tools: Web: FilterReview: add notch tracking overlay
cy45@cy45-OptiPlex-SFF-Plus-7010:~/Downloads/ardupilot$ git submodule update --init --recursive
Submodule path 'modules/ChibiOS': checked out 'a287e67d8b1652025cd0fe9ffa806aeaabd3ec6d'
Submodule path 'modules/DroneCAN/DSDL': checked out '94ea1e98ffbb9d24b6717905e092dba2f211d1a1'
Submodule path 'modules/DroneCAN/dronecan_dsdlc': checked out 'ebaf96860a11a4cc43c01df6b651df143c6cde2d'
warning: unable to rmdir 'dsdl_compiler/pyuavcan': Directory not empty
Submodule path 'modules/DroneCAN/libcanard': checked out 'f9c584fe844af71a840d9b8d915b7a448c394ff6'
Submodule path 'modules/mavlink': checked out '9c39822c0f6bef4e7ecb5c4f95979f06c23f763d'
Submodule path 'modules/waf': checked out '1b1625b8e7da6e1307d73335cb995fa8813d5950'
cy45@cy45-OptiPlex-SFF-Plus-7010:~/Downloads/ardupilot$ ./waf clean
Traceback (most recent call last):
  File "/home/cy45/Downloads/ardupilot/modules/waf/waflib/Scripting.py", line 158, in waf_entry_point
    run_commands()
  File "/home/cy45/Downloads/ardupilot/modules/waf/waflib/Scripting.py", line 251, in run_commands
    ctx = run_command(cmd_name)
  File "/home/cy45/Downloads/ardupilot/modules/waf/waflib/Scripting.py", line 235, in run_command
    ctx.execute()
  File "/home/cy45/Downloads/ardupilot/modules/waf/waflib/Build.py", line 1268, in execute
    self.restore()
  File "/home/cy45/Downloads/ardupilot/modules/waf/waflib/Build.py", line 278, in restore
    self.setup(**t)
  File "/home/cy45/Downloads/ardupilot/modules/waf/waflib/Build.py", line 381, in setup
    module = Context.load_tool(tool, tooldir)
  File "/home/cy45/Downloads/ardupilot/modules/waf/waflib/Context.py", line 724, in load_tool
    __import__(tool)
ModuleNotFoundError: No module named 'uavcangen'
cy45@cy45-OptiPlex-SFF-Plus-7010:~/Downloads/ardupilot$ 

I tried to install it, but failed:

cy45@cy45-OptiPlex-SFF-Plus-7010:~/Downloads/ardupilot$ pip install uavcangen
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement uavcangen (from versions: none)
ERROR: No matching distribution found for uavcangen

After the trial to build,

$ cd Tools/autotest/
$ python3 sim_vehicle.py --console -A "--uartF=sim:vicon:" --map -v ArduCopter -f X

the ./waf clean works again, so Iā€™m not sure whether this module matters.

em.ParseError: unknown markup sequence: @); the @) markup has been removed; just use ) instead

I ran into this trying to build ArduPilot on a new machine. In my case, this was caused by installing python empy version 4.x, switching to empy 3.3.4. I did this by first removing empy with pip3 uninstall empy then installing 3.3.4 with pip3 install empy==3.3.4.

2 Likes

Thanks for trying, but my empy version is 3.3.2. I used the newest Copter-4.4 branch of ardupilot instead, hopefully this branch is more stable than master.