Install gcc to mac via Terminal
You might be better off installing gcc from homebrew than Macports. 

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew update
brew search gcc


There're are about 6 versions of gcc available from this package manager. See http://brew.sh for more details on the homebrew tools. Also this thread has more details on gcc and homebrew: How do I install GCC via Homebrew? Lastly, the gcc error in your shell is similar to this thread: I installed Xcode but I still don&#39;t have gcc in my terminal