Xcode build errors

If you have built libpng and installed it into /usr/local/lib, you may see the following when trying to build a universal binary:

Line Location Tool:0: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not of required architecture

This is because /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib is actually a symlink. This is probably a mistake, so delete it and make it an empty directory instead. /usr/local is supposed to be for us - users, so Apple shouldn't include our custom build files by default.

sudo rm /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib
sudo mkdir /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib

See Also

http://www.cocoabuilder.com/archive/message/cocoa/2008/2/8/198301