Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcc 4.8.1 will not make

I have a new installation of Ubuntu linux and I am trying to update my gcc complier. The latest gcc compiler depends on gmp, mpfr, and mpc, so I downloaded those and placed the source into the gcc 4.8.1 source folder, as instructed.

configure seems to have run just fine. I did not include any options, because none seemed appropriate. I just ran with the defaults.

When I run make, I get the following error:

configure: error: C++ compiler missing or inoperational

make[2]: \*** [configure-stage1-libcpp] Error 1    
make[2]: Leaving directory `/home/clay/programming/C++/gcc-4.8.1'    
make[1]: \*** [stage1-bubble] Error 2    
make[1]: Leaving directory `/home/clay/programming/C++/gcc-4.8.1'    
make: \*** [all] Error 2

I am running out of a terminal window as root, and I did a make distclean and tried a second time, but no dice. I know it can find both gcc and cc because it says so in the make output.

Any ideas?

like image 841
cassius Avatar asked Aug 14 '13 21:08

cassius


2 Answers

You need a C++ compiler to build GCC. On Ubuntu, the C++ compiler is in the package g++, separate from gcc (which is a C compiler, not a C++ compiler), so be sure to:

sudo apt-get install g++
like image 62
MadScientist Avatar answered Oct 05 '22 15:10

MadScientist


first you should ensure a C++ compiler to build on your machine

yum install gcc-c++  
like image 39
Low Power Avatar answered Oct 05 '22 15:10

Low Power