Hot answers tagged gcc
There is one thing (thank you @kos): I definitely wouldn't remove gcc in general, but if I had to I wouldn't do it this way: this will remove also build-essential and hence make; for one, if you have the nVidia > drivers installed it will remove those as well, since they depend on make, plus who knows what other stuff. With other words, know what ...
/usr/bin/gcc is just a symbolic link, eg: $ ls -la /usr/bin/gcc lrwxrwxrwx 1 root root 7 Mär 12 17:28 /usr/bin/gcc -> gcc-4.9 Why the link on your system does not exist (anymore), we can only speculate about it. You have two options: Create the symbolic link sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc or Reinstall the package gcc sudo apt-get ...
use below command , --purge remove option is equivalent to purge sudo apt-get --purge remove gcc-4.9 according apt-get manual: --purge Use purge instead of remove for anything that would be removed. An asterisk ("*") will be displayed next to packages which are scheduled to be purged. remove --purge is equivalent to the purge command. ...
From the log: configure:3478: gcc -03 conftest.c >&5 gcc: error: unrecognized command line option '-03' The option is -O3 with the letter O, not the number 0. So, you should run, as given in the README: ./configure CFLAGS="-O3"
Looks like your CFLAGS has a zero instead of capital O. That is invalid, and causing the compilation to fail. You can fix it, but really, look for a later version of the package which has been fixed.
Answering my own question: The problem didn't really have anything to do with libtool (although it was revealed when building packages that used libtool). I had updated gcc and g++ to 4.8, but cpp was still at 4.6.3. After installing cpp-4.8 the problem is fixed. Just for the record, the following should work fine for upgrading gcc to 4.8 on ubuntu 12.04: ...
I found the problem. There was an old, corrupt installation of gcc-4.8, which doesn't get replaced when build-essential is installed. I used sudo apt-get remove gcc-4.8 sudo apt-get remove --purge sudo apt-get auto-remove sudo apt-get install build-essential Now the test runs fine.
My two cents: The file with the name /usr/lib/gcc/i686-linux-gnu/4.8/libgcc.a is part of the package libgcc-4.8-dev Therefore sudo apt-get install --reinstall libgcc-4.8-dev
I had to install g++. @steeldriver, thank you for pointing me in the right direction :) I specifically installed a version 4.7 of g++ because my gcc that matlab needed was only 4.7.x,and the mex compilations with my version of matlab were not compatible with the default 4.8 that ubuntu 14.04 runs.
My guess would be that you have the basic C compiler installed, but not the headers for the standard library. Try: sudo apt install libc6-dev [Edit: this produces similar symptoms, but wasn't the case here. The CFLAGS answers appear to be correct.]
Only top voted, non community-wiki answers of a minimum length are eligible