There are places where cairo links to /usr/lib/libfreetype.so *AND* /usr/local/lib/libfreetype.so. If the former is installed by default for "system" software, and the latter "just" for a local compilation, then cairo gets confused and does not build. Manual hacking of .la files and build scripts sorts it out.
Build problem on your side most probably. Cairo uses pkg-config to find what to link to. Do you have .la files installed for the system libraries? What distro is it? Gentoo?
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.