You don't need to build calibre from source. Instead you "run from source". See
Linux development environment where it says "You have two choices in setting up the development environment. You can install the calibre binary as normal and use that as a runtime environment to do your development. This approach is similar to that used in Windows and macOS." Do this first choice. It is easy.