I am also having this issue.
For context, I perform my compilation with the help of AstroPi 3 script on a Raspberry Pi 4. Running Raspberry OS Buster.
Today I saw this error during the KStars compile
CMake Error at CMakeLists.txt:70 (find_package):
Could not find a configuration file for package "ECM" that is compatible
with requested version "5.68.0".
The following configuration files were considered but not accepted:
/usr/share/ECM/cmake/ECMConfig.cmake, version: 5.54.0
I attempted to update it, but am told I have the latest version already.
The result is I am now getting a similar error but for QT5
CMake Error at CMakeLists.txt:108 (find_package):
Could not find a configuration file for package "Qt5" that is compatible
with requested version "5.12.8".
The following configuration files were considered but not accepted:
/usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake, version: 5.11.3
Again I can not upgrade QT5, as I am told it is also the latest version.