Version of XCode
Which compiler did you use? MacPorts or the one from XCode? Because the latter caused some problems (not for me. I use the MacPorts-compilers)
I used the MacPorts compiler: g++ (MacPorts gcc46 4.6.4_3) 4.6.4
Why does the installation of MacPorts require the xcode command line tools? Do you have an idea why I was not able to install rpm via MacPorts on Mavericks? (Since I downgraded back to Mountain Lion, I cannot reproduce error messages right now... you might still have a clue, though :)
I guess MacPorts requires the command line tools because although they deliver binary packages nowadays technically it is a "source only"-distro and even if it would use its own compiler it would need some compiler to bootstrap the compilation of that. Which happens to be the XCode-compiler. Plus there may be other utilities that are MacOS-X specific and for which no OpenSource-alternative exists (the linker?)
About rpm: without the error message it is hard