LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   upgrade gcc-c++ 2.96 to 3.2.1 (https://www.linuxquestions.org/questions/linux-software-2/upgrade-gcc-c-2-96-to-3-2-1-a-38220/)

pika 12-13-2002 07:06 AM

upgrade gcc-c++ 2.96 to 3.2.1
 
Hi,

When I came across the all-known 'c compiler cannot create executables..." configure error I found out that there was no more c++ compiler support since I updated gcc itself.
The logical thing to was to download and install a 3.2.1 gcc-c++ package and to install it. When I tried to do this the following dependency problems were found:

libstdc++ = 3.2.1 is needed by gcc-c++-3.2.1-1
...same for devel package

I checked if I could update the libstdc++ package.... but the whole system depends on it so that was out of the question.

Now my question is : Is it possible to add c++ compiler support to gcc on a system that was originally installed with all gcc 2.96 packages ?

Thanks in advance guys

pika

neo77777 12-13-2002 07:14 AM

No it is not possible b/c 2.96 is not concidered a stable gcc release, what you need to upgrade are libstdc++, libgcc, libc, possibly glibc and of course gcc, I don't think it is too much hussle, all is on rpmfind.net

pika 12-13-2002 07:27 AM

Thanks for your quick answer,

I already upgraded the packages you mentioned, except for the libstc++ package. Numerous gnome and kde applications depend on it, which is why I'm not able to upgrade that package. And I don't think '--force' would do any good to my system/core libs :)

neo77777 12-13-2002 07:45 AM

Well a little work around
Code:

ls -l /usr/lib/*stdc*
-rw-r--r--    1 root    root      420238 Apr 12  2002 libstdc++-3-libc6.2-2-2.10.0.a
-r-xr-xr-x    1 root    root      426442 Apr 12  2002 libstdc++-3-libc6.2-2-2.10.0.so
lrwxrwxrwx    1 root    root          33 Jun 24 14:05 libstdc++-libc6.1-1.so.2 -> /usr/lib/libstdc++-libc6.2-2.so.3
lrwxrwxrwx    1 root    root          30 Jun 19 11:48 libstdc++-libc6.2-2.a.3 -> libstdc++-3-libc6.2-2-2.10.0.a
lrwxrwxrwx    1 root    root          31 Jun 19 11:22 libstdc++-libc6.2-2.so.3 -> libstdc++-3-libc6.2-2-2.10.0.so

this is before upgrade, now back up the most important lib to which everything is symlinked in this particular case it is libstdc++-3-libc6.2-2-2.10.0.so and libstdc++-3-libc6.2-2-2.10.0.a, put their copies away, now upgrade with --force and when the work is done put the libs back and symlink them appropriately.
I just remembered that RH ships with gcc-3.x.x which is called awkward gcc3, it should be on your installation CD's, if you haven't installed them yet install it (don't upgrade but install) it will create /usr/bin/gcc3 executable what you need to do is just
cp /usr/bin/gcc /usr/bin/gcc296 && ln -sf /usr/bin/gcc3 /usr/bin/gcc

pika 12-13-2002 08:44 AM

I love workarounds ;-) , as long as everything keeps working afterwards, I'll give it a try as soon as I get the chance. Thanks for your answer.


All times are GMT -5. The time now is 12:04 AM.