With too little information about the environment and the failure, it is hard to guess what's going on.
Unless you want to install GCC from the source, let pkg-get tool of Blastwave, do it for you. Instructions are here:
http://technopark02.blogspot.com/200...ages-with.html