I found that more and more open source libraries will use C++11 features, and my Ubuntu Desktop 12.04 just has gcc 4.6, I want to use the update-alternatives to change the default gcc version into 4.7 or 4.8. I wonder that, if the libraries in the /usr/local/lib compiled by gcc 4.6 will need to be recompiled by the new gcc 4.7/4.8. In my opinion, if the dependency libraries are still in the system, there is no need to recompile. But, If one dependency library compiled by the new gcc 4.7, is the dependency among libraries still right? Sorry for my poor English. Thanks.
Asked
Active
Viewed 339 times
1 Answers
0
Just update to 13.04 (and soon 13.10). From my 13.04 development box:
edd@max:~$ ls -1 /usr/bin/g*-4.*
/usr/bin/g++-4.4
/usr/bin/g++-4.5
/usr/bin/g++-4.6
/usr/bin/g++-4.7
/usr/bin/gcc-4.4
/usr/bin/gcc-4.5
/usr/bin/gcc-4.6
/usr/bin/gcc-4.7
/usr/bin/gcc-ar-4.7
/usr/bin/gcc-nm-4.7
/usr/bin/gcc-ranlib-4.7
/usr/bin/gcov-4.4
/usr/bin/gcov-4.5
/usr/bin/gcov-4.6
/usr/bin/gcov-4.7
/usr/bin/gfortran-4.4
/usr/bin/gfortran-4.5
/usr/bin/gfortran-4.6
/usr/bin/gfortran-4.7
edd@max:~$
Make sure you upgrade one-by-one and not in jumps. It usually a very smooth process.

Dirk Eddelbuettel
- 360,940
- 56
- 644
- 725
-
I want to update the 12.04 to latest version, but I'm not sure whether the libraries built in the older system can still use, or I will recompile them, that's boring. Could you give me some advice, please? – mining Oct 02 '13 at 02:28
-
Not really: C, C++ and Fortran. I don't even install the gcc frontends for Ada, D, ObjC, ... But yes, it gives you four versions concurrently. – Dirk Eddelbuettel Oct 02 '13 at 02:30
-
Things in `/usr` (ie Ubuntu) will continue to work, for `/usr/local` they usually do but one cannot guarantee that. Worst case you may have to rebuild some. – Dirk Eddelbuettel Oct 02 '13 at 02:32