The above compilation log contains line about missied gmp.h header file:

...
fatal error: gmp.h: No such file or directory
   612 | #include "gmp.h"
       |          ^~~~~~~
 compilation terminated.
...

You can find the package for it and install it with

sudo apt-get install libgmp-dev