ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.91k stars 17.4k forks source link

Fresh ardupilot checkouts unable to build stable / old stable releases #19523

Closed peterbarker closed 2 years ago

peterbarker commented 2 years ago

Bug report

Issue details

A fresh clone of the ardupilot repo doesn't allow building of either Plane or Copter stable releases (or the 4.0.x releases)

Version Plane-4.0.9 Copter-4.1.2

Platform [X] All [ ] AntennaTracker [ ] Copter [ ] Plane [ ] Rover [ ] Submarine

Airframe type n/a

Hardware type n/a

Logs

Reproduction:

git clone --recursive https://github.com/ardupilot/ardupilot
cd ardupilot
git checkout Copter-4.1.2
git submodule update --init --recursive

The last command fails with:

Submodule path 'modules/uavcan': checked out '3ef4b88d96466bbcf886f74d0ae169a4c8c1bdb0'
fatal: remote error: upload-pack: not our ref 192295c4f9b67f4a20b0eabf74757b6597415f2b
fatal: The remote end hung up unexpectedly
Fetched in submodule path 'modules/uavcan/dsdl', but it did not contain 192295c4f9b67f4a20b0eabf74757b6597415f2b. Direct fetching of that commit failed.
Failed to recurse into submodule path 'modules/uavcan'

That git hash does not exist in the submodule checked out:

pbarker@bluebottle:/tmp/ardupilot/modules/uavcan/dsdl((HEAD detached at 409a69d))$ git remote -v
origin  https://github.com/dronecan/DSDL (fetch)
origin  https://github.com/dronecan/DSDL (push)
pbarker@bluebottle:/tmp/ardupilot/modules/uavcan/dsdl((HEAD detached at 409a69d))$ 

It does exist at https://github.com/UAVCAN/dsdl/commit/192295c4f9b67f4a20b0eabf74757b6597415f2b

Work-around is to add https://github.com/UAVCAN/dsdl as a remote to modules/uavcan/dsdl and doing a git fetch.

tridge commented 2 years ago

I have added a stable-4.1 branch to the dsdl repo to fix this