can be a chore. To cut to the chase, you definitely want the “Command Line Tools” to be installed in addition to the XCode download from the App Store.
I just upgraded my XCode installation to the latest Mac App Store version and naturally macports broke. So I updated it to the currently latest version available (2.04) that is known to work with the latest XCode. Whenever you migrate your macports installation to a major release change you probably want to reinstall your installation tree. But this failed big time for me. As I said before, there is a little more to just downloading the app from the App store…
After XCode successfully installed, open preferences, go to Downloads tab and select at least Command Line Tools. You need to enter your Apple Developer Id in order to proceed.
The next thing you want to do is a sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
It might work now but I had to link the /Developers directory as well sudo ln -s /Applications/Xcode.app/Contents/Developer /Developer
ln -s llvm-gcc-4.2 clang