Second issue, the Audacity wiki instructions for installing cmake were wrong (now corrected).
After successfully installing cmake 3.18.1, I then precisely followed the instructions here: https://forum.audacityteam.org/t/building-audacity-2-4-2-on-ubuntu-20-04/57719/1
Success.
libavformat-dev version 7.4.16-1