/usr/bin/ld: skipping incompatible /usr/lib/somelib.so when searching for -lsomelib
it means that you have both 32-bit and 64-bit libraries. The configure script in php is finding the 32-bit versions, which don't work with your system. As to why your system has 32-bit versions that don't work is beyond me at this time.
New solution, use the --with-libdir=lib64, eg in the configure/ap2/configure.php5:
Another solution, probably the "cleanest" solution (reported, but untested by us)
yum remove \*.i\?86
old solution (not pretty):
Here are some of the occurances we've seen, along with what we've typed out to repair it.
Keep in mind, if you're going to attempt to run any of these forced re-links.. be *Positive* that the 64-bit version of the library exists, as pointed to in the path first path of the command. If you link to a file that doesn't exist, your entire system may grind to a halt.
#/usr/bin/ld: skipping incompatible /usr/lib/libgssapi_krb5.so when searching for -lgssapi_krb5
#/usr/bin/ld: skipping incompatible /usr/lib/libgssapi_krb5.a when searching for -lgssapi_krb5