Error compiling GIMP GIT

pacman -Si

gives you, albeit in human readable form, the list of the dependencies of a package. With some script one could extract them from the output.