I would like to acquire a very old version of gcc: 4.4.3 and set it up in such a way that I can use the
update-alternatives
command to switch between my current version and the older version. I believe I may have found a website where I can download 4.4.3 from. However, I am not sure what all I need from that website or where exactly I should be installing too. If I search my kernel for gcc it would seem my current version is a symbolic link located @
/usr/lib/gcc/x86_64-linux-gnu/7.3.0
and is linked to Folder
inode/directory
There are actually three folders in that directory: 7, 7.3.0 and 8 (empty folder).
So I am hoping someone might be able to help me understand both what I should be downloading and where I should be unpacking it such that I can run the command:
sudo update-alternatives --config gcc
to select which version of gcc I want my computer to default to for a compilation. Also, if this is not the right website to download from, then where would be the correct place to download gcc version 4.4.3 from. I would start tinkering but I certainly dont want to break anything.
The usual problem is that this "update-alternatives" command may not have existed when 4.4.3 was being used and hence nobody has integrated it into your distro that way.
What is your distribution?
The version of update-alternatives is 1.19.0.5 and my distribution is Ubuntu 18.04. If I can't use the update-alternatives command maybe I could just make a symbolic link for gcc and switch them manually in a terminal? I also have another distribution on this computer: Ubuntu 16.04.
Depends on your build process. A lot of things using "configure", etc will let you do CC=/path/to/gcc CXX=/path/to/g++ ./configure
Any idea on which of those downloads I am looking for in that link I provided? My guess would be:
https://ftp.gnu.org/icons/unknown.gifgcc-4.4.3.tar.bz22010-01-21 08:32 60M https://ftp.gnu.org/icons/unknown.gifgcc-4.4.3.tar.bz2.sig2010-01-21 08:32 72 https://ftp.gnu.org/icons/compressed.gifgcc-4.4.3.tar.gz2010-01-21 08:32 78M https://ftp.gnu.org/icons/unknown.gifgcc-4.4.3.tar.gz.sig2010-01-21 08:33 72
The two large files are functionally equivalent, using different methods of compression.
The two small ones are just checksums for the big ones.
1 Like
Be sure its prefix is /usr/local when you compile it, not /usr, so as to avoid overwriting your existing gcc and include files.