The only versions of dependencies calibre is guaranteed to work with are those listed in sources.json. As for how to get them, download them from qt. And if you are going to build calibre on an outdated distro like debian, do it in a container, using
https://github.com/kovidgoyal/bypy