Your computer is having trouble compiling things if you read the first error there.
ld: warning: ignoring file /usr/local/lib/libpq.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libpq.dylib
Undefined symbols for architecture i386:
"_PQconnectdb", referenced from:
_t in conftest-79115b.o
ld: symbol(s) not found for architecture i386
Try searching in Google for the relevant error, above.