Amazon Linux recently required gcc72 as a dependency of the kernel-devel package as of kernel-devel 4.14. This broke pHash builds on x64 Amazon Linux:
checking for uint64_t... no
configure: error:
*** Required type uint64_t not found.
pHash requires 64-bit integers for video and image hashes.
As a workaround, remove gcc72, libgcc72, and kernel-devel to get pHash to build.