I wish to install gcc 4.7 so that I can use some c++11 features.
I downloaded the source, ran ./configure
and was told I needed GMP. Downloaded the code for that, hit ./configure
and was told I needed m4. But I already have m4 (least that is what synamptic tells me).
What is going on and how can I fix it?
You can try this PPA for installing gcc 4.7. Do note that it has packages only for 12.04 and not for 11.10.
Run the following commands in a terminal:
Or, if you prefer a graphical way of installing a PPA, take a look at What are PPAs and how do I use them?.
NOTE!!
You also most likely need to take care of g++-4.7
So the full commands list will be:
Also, don't forget to update-alternatives, as suggested here
This is confirmed to work in Ubuntu 12.04
Search the build directory for
config.log
files, and search those for the error message. That should give some clues.BTW, if you don't need 4.7 precisely, you could try installing the gcc-snapshot package. That should have the features you need. It doesn't get installed in the standard place though, if I remember correctly.
This is a complete guide of how to build from sources gcc-4.7 on Ubuntu 12.04 64 bits:
http://solarianprogrammer.com/2012/04/13/building-gcc-4-7-on-ubuntu-12-04/