Go to `/usr/ports/databases/mysql51-client/work/mysql-5.1.23-rc/libmysql_r' and look for some of the object files that seem to be missing.
You might try cleaning and updating the ports tree:
# (cd /usr/ports/databases/mysql51-client && make distclean)
# portsnap fetch && portsnap update
then remake the port you were building.
You should of course use csup or portsnap as you usually do.
Use portsnap extract rather then portsnap update if you wish to start with a clean unmodified ports tree rather then an updated one.
If it makes any difference, my PC-BSD system has mysql-client-5.0.x installed as a depend of KOffice (although I pkg_add'd it manually, instead of from cd#2)