I faced the same issue after upgrading gcc to 4.8 sudo apt-get install gcc-4.8 (mind the package name)
Then I manually changed the g++ link to a renamed copy of gcc-4.8
My fix was a proper g++ installation sudo apt-get install g++-4.8
For clarity you should use g++-4.8 instead of gcc-4.8