Hello @willus,
I am a happy user of k2pdfopt. Recently I tried to compile the program on my own, but due to some incompatibilities with mupdf 1.16 and some header files the build with cmake failed.
I created some patches that update the CMakeList.txt file and fix the mupdf version problems.
https://pastebin.com/wvAGYw24
https://pastebin.com/ZJrb8TWB
https://pastebin.com/VUKhjANT
https://pastebin.com/jJwK6UvU
https://pastebin.com/Xdz5c2CU
https://pastebin.com/rrRZ2uSK
You can apply them with patch -p1 <patchfile>. I hope that is somewhat helpful.
Greetings,
richbridger