Ubuntu 16.04 fails because libgpgme-dev is not a package. libgpgme11-dev needs to be specified. On Ubuntu 18.04, python-gpgme and python3-gpgme fail.
This is not a Samba bug
The challenge is that the package list is not the same for all Debian and Ubuntu versions. The list is occasionally refreshed from the 'official' list (there isn't really an official list) used to build the Docker images and disk images for our CI and the .travis-ci.yml because that is a reliable correct set. However both of those target the almost-EOL Ubuntu 14.04. Then people fiddle with it based on what they are using, but usually don't say which they are using in their edit. see https://wiki.samba.org/index.php?title=Package_Dependencies_Required_to_Build_Samba&action=history Either way, we don't really host wiki content debates here. Perhaps the best option if you have tested all three is to add a clearer note on the version-specific differences. Long-term I would like to replace the list with a link to whatever the CI is using exactly from our build tree, so it can't be out of date (at least for master).