Results 1 to 3 of 3
A lot of time I read in some packages that they need to be compiled with some version of GCC, MAKE, etc. How does somebody keep multiple versions of GCC, ...
- 11-19-2007 #1
Having multiple versions of GCC
A lot of time I read in some packages that they need to be compiled with some version of GCC, MAKE, etc. How does somebody keep multiple versions of GCC, MAKE and so on its computer? What has to be done when changing GCC version? Making new symbolic links to /bin folder that points to different GCC version? Not to mention all other tools like linker, archiver, nm, readelf, etc. Is there some easy way to do this?
That goes the same for using different version of libstdc++, etc. What is the easiest way of keeping multiple versions of some library on the computer and easily changing between them.
As a developer I'm coming from windows world so I'm having a lot of difficulties with this stuff.
Best regards,
- 11-20-2007 #2
Things are not as crazy as they seem.
- I have never heard of a situation where an ordinary user actually kept different versions of the compiler around to compile different packages. There may be such situations, but I image they're rare.
- The gnu folks are pretty careful about keeping compilers as backward compatible as possible. So if you see a package that requires a particular version of gcc, any version after that ought to be ok also.
- If I were developing a package, I'd see what version of gcc I'd used to compile and test, and specify that one as the version of gcc to use. I wouldn't bother to research all the version of gcc before it to see what the earliest usable one is. I'm guessing that any version of gcc that was released after computers stopped running on steam ought to be ok for almost all applications.
- If this does not reassure you, know that you can keep various version of gcc around; each one has configured into it where various auxiliary files are. The only thing you need to do is specify which version you wish to use (by specifying the proper "name" of gcc) when you want to run a particular version of gcc, and set the symbolic link from gcc to whichever one you want to use most often, so you don't have to specify the version number as part of the name of that one.
To see what I mean, as an experiment, try this at the command line:
Code:which gcc ls -l $(which gcc) file $(which gcc) file -L $(which gcc)
Hope this helps.--
Bill
Old age and treachery will overcome youth and skill.
- 11-20-2007 #3


Reply With Quote