What versions of g++ and gcc come standard with RHEL 5.3
This is a little long, but I want to provide as much detail as possible, so please bear with me.
I ran into an issue that was written up here on LQ and/or on other sites, the one dealing with an error similar to the following one: error trying to exec 'cc1plus': execvp: No such file or directoryThe solution seems is to make g++ and gcc versions consistent. I've since remedied that, but am slightly confused with my findings and concerned with my solution. When I first looked in /usr/bin for all references to g++ and gcc, I saw that there were two version of gcc and one version of g++: $cd /usr/bin $ls -al | grep -e 'g++\|gcc' lrwxrwxrwx 1 root root 3 Jan 21 16:28 cc -> gcc (Note the "??? ?? ????" as date for gcc. I've since made some changes, but this was essentially the set of gcc and g++ files that existed before I started.) I'm told that the system I'm using is an "out of the box" installation, i.e. no modifications. As installed, gcc is the newer version and does not correspond to g++34: $gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) Confusion and concern: When I use makefiles from software I've adopted, I run into the cc1plus problem eluded to above. The cc1plus error occurred because the makefiles expected there to be a command named "g++," so I created a symbolic link, pointing /usr/bin/g++ -> /usr/bin/g++34. And in doing so, g++ was not consistent with gcc. I've since fixed that, i.e. copied the gcc34 version to gcc and my software builds fine. My question are: 1. Will copying the gcc34 version to gcc cause issues in the future, possibly related to upgrades and/or istallations of other packages that rely on "gcc"? Currently the files are as follows: lrwxrwxrwx 1 root root 3 Jan 21 16:28 cc -> gcc2. Were the g++ and gcc files in /usr/bin the "out of the box" versions? 3. How can I answer a question like this in the future, without posting to LQ, i.e. is there a reference to find this type of information? Thanks in advance. Mark |
Default versions : gcc / gcc-c++ (g++) version 4.1.2.
# yum install gcc-c++ : Will install the g++ compiler and update the may be corrupted /usr/bin/gcc. /usr/bin/gcc34, /usr/bin/g++34 : Please use 'rpm -qf /usr/bin/g++34' to know the package, that installed the file. ( compat-gcc-34 , compat-gcc-34-c++ : The old "3.4.6".) Quote:
if your files will work with the later gcc-4.1.2. Dependency : I don't think, any packages depend on gcc-4.1.2 : And a dependency check is not done in /usr/bin/, but in the rpm data base. I.e. Changing some files ( or deleting files ), the rpm data base will not know anything at all about that. .. |
All times are GMT -5. The time now is 09:14 AM. |