I tried to build Clazy on Ubuntu where libz-dev and libxml2-dev packages were not installed. Clazy build failed only during linking. I think it'll be good idea to detect libraries availability during CMake configuration.
Clazy doesn't use those libraries in its code. One of the many LLVM libraries do though, so it's a packaging bug, the llvm-dev packages should depend on libz-dev and libxml2-dev. If you open a bug report in Ubuntu you'll probably get lucky, as libz and libxml2 are such core libraries, that many others need.