Peter Kadau noted that if you are building a program such as XFree86 and it complains about not being able to find a particular library that you know exists on your system, you can use cpdup to move it (between, for instance, /usr/local/lib and /usr/X11R6/lib).
This is a temporary fix. However, if you are experiencing this right now, it’s probably because of an out-of-date dfports. Delete all packages, update, and reinstall packages, and you should be OK.