RHEL 5.5 Upgrade gcc from 4.1.2 to gcc 4.4
I am working on a legacy RHEL 5.5 embedded system, and in order to link with a third party library I need to upgrade compiler to gcc 4.4.
Yum tells me the packages are available
root$ yum list all | grep gcc
gcc.x86_64 4.1.2-50.el5 installed
gcc-c++.x86_64 4.1.2-50.el5 installed
gcc44.x86_64 4.4.7-11.el5_11 installed
libgcc.i386 4.1.2-50.el5 installed
libgcc.x86_64 4.1.2-50.el5 installed
gcc.x86_64 4.1.2-55.el5 res5-x86_64
gcc-c++.x86_64 4.1.2-55.el5 res5-x86_64
gcc-debuginfo.i386 4.1.2-55.el5 res5-x86_64
gcc-debuginfo.x86_64 4.1.2-55.el5 res5-x86_64
gcc-gfortran.x86_64 4.1.2-55.el5 res5-x86_64
gcc-gnat.x86_64 4.1.2-55.el5 res5-x86_64
gcc-java.x86_64 4.1.2-55.el5 res5-x86_64
gcc-libraries-debuginfo.i386 4.8.0-5.1.1.el5 res5-x86_64
gcc-libraries-debuginfo.x86_64 4.8.0-5.1.1.el5 res5-x86_64
gcc-objc.x86_64 4.1.2-55.el5 res5-x86_64
gcc-objc++.x86_64 4.1.2-55.el5 res5-x86_64
gcc43.x86_64 4.3.2-7.nv5.3 res5-x86_64
gcc43-c++.x86_64 4.3.2-7.nv5.3 res5-x86_64
gcc43-gfortran.x86_64 4.3.2-7.nv5.3 res5-x86_64
gcc44-c++.x86_64 4.4.7-11.el5_11 res5-x86_64
gcc44-debuginfo.i386 4.4.7-11.el5_11 res5-x86_64
gcc44-debuginfo.x86_64 4.4.7-11.el5_11 res5-x86_64
gcc44-gfortran.x86_64 4.4.7-11.el5_11 res5-x86_64
libgcc.i386 4.1.2-55.el5 res5-x86_64
libgcc.x86_64 4.1.2-55.el5 res5-x86_64
And so I installed them
root$ yum install gcc44.x86_64 gcc44-c++.x86_6
but my gcc version is still 4.1.2
root$ gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
What did I miss?
Responses
Try rpm -ql gcc44 and see where the binary is.
It's likely this package doesn't override the gcc in PATH so you have to call it directly, or use it explicitly in Makefiles with the $(CC) variable.
That's a good thing, because overriding the default compiler may break anything else which is depending on known gcc 4.1.2 behaviour.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
